One of the talks I went to at OSCON was about using mq: patch queue management on top of mercurial, a la quilt.
I had used quilt a couple of times in the past when juggling multiple patches in GNOME, but had gotten out of the habit. Inspired by this talk, I checked out stgit, since I tend to use cogito as my personal version control system of choice these days for various reasons. Patch queues + version control is still a nice combination.
Since getting back home, I've been learning to use stgit to manage my myriad of Django "works in progress" and it's working quite well. This wasn't a hard learning curve: it took all of 15 minutes to read the tutorial and start playing, but it takes a day or two to get used to the commands and tricks and traps. Patch management control systems like this work well for the scenario where I am developing something on top of an already active tree. I update the subversion copy regularly, check the changes into git/cogito, pull them into the branch I am working on with stgit and refresh (the stgit term) my patch. The result is that my working patch is always sitting "on top" of the current subversion code, so I can easily generate a diff and always know it applies cleanly.
Applying a whole bunch of patches from Russell Keith-Magee tonight to another branch went reasonably smoothly, too. Although it did seem to swallow one of the patches without making the changes and another one didn't apply cleanly, although patch had no similar problems. So stgit still needs watching, but I think it will speed up my workflow a little bit.
On Sunday, I had eight or nine different Django working directories (I suspect one was more of a train wreck than a working copy). Today I have four: two are old snapshot versions that I need for working on code for clients, one is a pristine copy of subversion and one is a multi-branched beast with all my patches in it (plus Russell's testing code). It's a little weird using two different version control systems, at once. But I've been juggling that already using cogito and svn previously. Shrinking any new work down to "just a patch" on top of the existing code is the real gain I'm seeing here. It make tracking the changes easier, directory listings shorter and switching between working copies (which one gets used when I run "django-admin.py"?) easier.
Topics: software/django, software/version control
[#]