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.
Comments
55 spam comments omitted.
I am no longer accepting new comments.
Dirkjan
#5831, 2008-08-13T02:01:23Z
You really want to use hg convert rather than hgsvn, in my opinion. Especially because having a tag for each revision is both ugly and slows Mercurial down a lot.
Al
#5838, 2008-08-13T10:24:15Z
Or you could just use SVN ;p
Adam Gomaa
#5930, 2008-08-18T14:37:19Z
Dirkjan, a tag for each revision - or at least a way of using the same revision numbers as everyone else (the SVN ones) is what I wanted, and what this provides.
Plus, hg convert crashed for me after running for >24 hours. I gave up on it at that point.
Al, the main advantage to using a Mercurial copy (or any DVCS, really) is that I can revert to specific revisions using the local history, which is much faster than svn revert. This helps out a lot when tracking down what revision of trunk broke something.
Jesper Noehr
#7457, 2008-09-11T05:25:57Z
The Django mirror we have on Bitbucket.org is the full copy of their SVN, yes, but if there's any interest, I could make a separate trunk mirror alone.
Also, the "Gateway Timeout" that you've experienced (among others), is now fixed. It was a silly timeout value of 60, and the reply it needed to send for such a big repository took longer than a minute. I've upped it now, and tested successfully.
I'll investigate mirroring trunk alone, and post some updates here.