A couple of weeks ago I was hacking on a GStreamer element from gst-plugins-bad and realized that I needed a way to record my changes in pieces, but not commit to the repository. GStreamer uses CVS, which does not support this workflow.
Bazaar to the rescue, then. I created a new local repository, in the plugin directory. It's as simple as typing bzr init, adding the files you want to track, and then committing as you make changes. I ended up committing a dozen patches or so.
Of course, when I was finished I wanted to push the changes upstream. Thus the point of this writing product, a script to turn a bzr repository into a series of patch files on disk:
#!/bin/bash set -e patchbase=$(basename `pwd`) outputdir=$1 if test -z "$outputdir"; then outputdir=.; fi revno=`bzr version-info | grep revno | cut -d: -f2` echo "exporting $(($revno)) patches..." for ((i=0; $i<$revno; i=$i+1)); do file="$patchbase.diff.$(($i+1))" echo "exporting $i..$(($i+1)) to $file" # dunno why bzr always returns $? != 0 bzr log -r$(($i+1))..$(($i+1)) > $file || true bzr diff -r$i..$(($i+1)) >> $file || true done
I then reverted my tree, applying and committing the patches one-by-one with e.g. patch -u -p0 < foo.diff.4. I'm sure there's some kind of more integrated plugin to do this, but a 10-minute shell script was easiest to hack out.
As an aside, bzr uncommit is quite useful for producing a readable history -- I often go back and modify the committed patches so that they are more understandable on their own.
My last entry on Flumotion internals began with a rhetorical question, something like "why aren't more people hacking Flumotion?" Unexpectedly, I got some real responses in the comments, all quite good. The general theme is that "developers are users first". If your project doesn't present itself well and offer a good initial experience, you're shutting off potential contributors as well as users. So say HiHo, Kalle, and Michael, more eloquently than I.
But that's not the best part. Launchpad offers a web-based repository browser, including changesets, and offers the ability to subscribe to any branch it knows about. You get emails on distributed commits. This is a beautiful thing! Anyone who has worked with distributed VCS's has probably had the feeling that they are seeing development through a keyhole, that there's a whole world out there that's not easily visible or comprehensible. Launchpad offers the possibility of tying together the various development branches out there in the wild in one place, effectively removing the last advantage of centralized version control. Nice job, Launchpad hackers!
I have no current plans to rely on Launchpad for this service, as it is not free software. However, the genius of distributed VC is that I don't have to rely on it; I can continue working like I normally do, commiting my code to archives hosted elsewhere, but if Launchpad is available (probable), I can use it to keep track of things. It helps me work better. I don't need anyone's permission for it to help me work better, either; I just tell it about the bazaar repositories, and it mirrors them. Delightful.
My phone's been in interplanetary orbit since I went to the Pyrenees two and a half weeks ago. Without it, life's been calm -- time to write, for example. But it's getting old, I might have to hoof it to Tarragona to retrieve my social contact device.
I bought two old albums today: more Cat Power (the covers album, which is astonishingly beautiful), and Yo La Tengo (And then nothing..., mellow, in a similar haunting vein, verging on mope). I just can't seem to put 2000 down. cd drome++; instead of swiping a barcode to listen like at FNAC, there you spin vinyl.
MediaLens' cogitations continue to inspire.
Finally, I desire to believe that the word "mindset" comes from the definition of "set" as "[d]irection or course; as, the set of the wind, or of a current." To me this is a wonderful image that some sailors I know might appreciate.