Hey, I made a patch to hg-git
So this is SUPER arcane, but: I’ve been starting to use DVCS lately, and I sort of hate it, but I hate it less when I can use Mercurial to do it. Unfortunately most people doing DVCS are using Git, which means if you are using Mercurial you basically have to be using hg-git so that you can work with Git repositories while still using Mercurial. One thing I’ve found a little inconvenient about using hg-git though is that once you’ve imported the Git repository in using hg-git, all the revision numbers are suddenly different because they’re calculated in Mercurial format now, which makes it very hard to for example look at the github network graph or have a conversation with another developer about different revisions. So I made a patch that shows Git revision numbers alongside the Mercurial ones when you’re using hg-git and also lets you refer to revisions by Git revision when updating, diffing etc. You can find this on my hg-git fork on Github, and I’ve submitted it back to the main project. Oh, I also put in there a neat little script I made to test my changes, that uses virtualenv to automatically build little self-contained python worlds with specific versions of Mercurial and Dulwich. I’m desperately trying to think of some use for this outside the tiny confines of testing hg-git and so far failing.
…for anyone who couldn’t follow that: Mercurial is a program that lets you download source code, Git is a different program that lets you download source code, hg-git lets Mercurial users download source code from Git users, and I did a thing that makes hg-git easier to use.
I hopefully will get to make some more improvements to hg-git later if I have time, like I’d like to try to take a look at why hg outgoing
support keeps breaking. I also really want to throw hg-git into the profiler and try to figure out why it’s so SLOW. If I do take a crack at this you’ll be able to find it at my Github fork linked above.
April 29th, 2012 at 11:51 pm
If you care, some updates:
1. The patch was never actually accepted by hg-git.
2. I moved my fork to bitbucket.
3. Installation instructions are at the link in (2).