~adeodato/ blog/ misc/ Fancy tailor scripts to convert from svn to bzr

Fancy tailor scripts to convert from svn to bzr

I’ve recently had to use Tailor to migrate a couple Subversion repositories to Bazaar-NG. I tend to be quite (too?) perfectionist with this kind of stuff, so I just wanted to make the config files I used available, in case they can help somebody who also wants the stuff I did: full names in the bzr log, and correct timezones for the commits.

So there’s the one for amarok packaging, a simple one that just sets my name, and an e-mail address depending on the date of the commit; the timezone is okay, since by default the local timezone is used (IOW, mine, but see notes below). And the one for pkg-xiph, which does a bit more of stuff, like taking the module to work on from an envvar, and assigning a timezone to each commiter, in addition to a name and address.

I’m happy with the end result of the conversion, but it’s come to a price: at first, the bzr timestamps for the amarok repo would be off by one or two hours. So I looked at the source and, after a fair while of wrestling with Python’s datetime module, I found that tailor/bzr.py is in fact buggy, and miscalculates the timestamp from the date Tailor feeds it from svn; either of these two patches, simple and better, fixes the issue. As for setting the timezone, this other patch is needed. (I sent all these uptream: link, and ‘yay pipermail’ link.)

NP: Hooverphonic, The Magnificent Tree