Fate has conspired against me. My desktop's HDD crashed hard this morning, to the point that I couldn't complete a fsck successfully. This gave my laptop nefarious ideas, and its fan stopped working, leaving me staring at a BIOS telling me there was a "Fan error" before it would rudely shut itself off.

And then things at work also went sour, with an end-of-day application update predictably causing lots of mysterious breakage, keeping myself and a coworker there far too late.

I'm back on my desktop now, having installed a new drive, slowly restoring everything to working condition. I'm having to install new versions of Mercurial, Django, Emacs, Apache, mod_wsgi, memcached, a half-dozen Python libraries, and so on. It's not actually that bad; I've spent less than two hours so far since breaking open the HDD box, and I'll probably be done in another two.

Somehow, between disasters, I managed to get something useful done today. Dpaste had the original Django trunk Mercurial mirror but has been plagued with some repository corruption issue that's still unresolved, resulting in occasional 403 errors when I pull - annoying enough to make me look for alternatives

There are actually a couple I know of. There's the hg.leosoto.com mirror, but that doesn't have the same revision numbers as svn, making regression-tracking difficult, and the svn tags are not clonable (they're part of .hg/localtags instead of .hgtags). And most recently, BitBucket has their mirror, which does have the same revision numbers, except trying to clone it causes a 504 Gateway error (at least to me), and if you split the clone into a small initial clone, of say, the first 100 revs, followed by pulls of an additional 100 revs at a time, then you realize that you're getting all the code in the Django svn - including all branches, and djangoproject.com itself. All that means you're getting a checkout of about 400 megs.

So I set up hgsvn on my server and got it pulling the Django trunk. The only tricky part was getting tag support. For reasons known only to the hgsvn author, hgsvn will only do local tags, period. That's not cool, because tags are the only good way of storing the subversion revision number (since you have to skip some revisions that weren't on trunk). I hacked around it by moving .hg/localtags to .hgtags, and them symlinking .hg/localtags to .hgtags so the tags get updated with each revision. Due to the way that tags are updated in hgsvn - after the commit happens - the .hgtags file, as committed, is actually 1 revision out of date, but it's bearable. It's set to update every hour via a simple cron script.

Anyways, here it is, enjoy. Despite the best efforts of the universe, I will not be thwarted.