Leo's Technical Blog

My New Django/Jython Developer Workflow

Introduction

user

Leo Soto


jython, django

My New Django/Jython Developer Workflow

Posted by Leo Soto on .
Featured

jython, django

My New Django/Jython Developer Workflow

Posted by Leo Soto on .

Both Django and Jython project are fast moving targets these days. That's a good thing, both projects are rapidly approaching big milestones: Django 1.0 and Jython 2.5. But that also means that if you are trying to patch both codebases to integrate them, your task gets a little more complicated.

So I don't have private mercurial branches of both projects anymore, because it makes quite hard to update patches and keep them as separate units. The new solution is two new mercurial repositories: django.patches and jython.patches. They contain mercurial queues and correspond to the .hg/patches directory you put inside the repositories containing the mercurial mirror of each project.

Translated to command line, this is what you have to do in order to get the current code for Django on Jython:

$ hg pull https://hg.leosoto.com/django.svn.trunk
$ hg pull https://hg.leosoto.com/jython.svn.asm
$ hg pull https://hg.leosoto.com/django.patches django.svn.trunk/.hg/patches
$ hg pull https://hg.leosoto.com/jython.patches jython.svn.asm/.hg/patches
$ hg --cwd django.svn.trunk qpush -a
$ hg --cwd jython.svn.trunk qpush -a

This way, I always try to keep my patches updated to apply cleanly to each project latest svn version.

I also have a hudson running on my machine which runs the Django test suite on CPython using all backends. Once that test is finished it runs the suite again after applying my Django patches (to make sure I'm not breaking anything). Finally it runs the suite one more time, using Jython and the postgresql_zxjdbc backend. This should replace the dojstatus site, once I discover a way to publish the results I get from hudson without installing hudson on my hosting.