Git as mercurial client? Why no git-hg?

Kai Inkinen picture Kai Inkinen · Mar 26, 2010 · Viewed 20.7k times · Source

This is a question that's been bothering me for a while. I've done my homework and checked stackoverflow and found at least these two topics about my question: Git for Mercurial like git-svn and Git interoperability with a Mercurial repository

I've done some serious googling to solve this issue, but so far with no luck. I've also read the Git Internals book, and the Mercurial Definitive Behind the Scenes to try to figure this out. I'm still a bit puzzled why I haven't been able to find any suitable git-hg type of a tool.

From my perspective git-svn is one of the main features, why I've chosen to use git over mercurial also at work. It allows me to use a workflow I like, and nobody else needs to bother, if they don't care. I just don't see the point in using the intermediate hg repo to convert back and forth, as suggested in one of the chains.

So anyway, from what I've read hg and git seem very similar in conceptual design. There are differences under the hood, but none of those should prevent creating a git client for hg. As it seems to me, remote tracking branches and octopus merges make git even more powerful than hg is.

So, the real question, is there any real reason why git-hg does not exist (or at least is very hard to find)? Is there some animosity from git users (and developers) towards their hg counterparts that has caused the lack of the git-hg tool? Do any of you have any plans to develop something like this, and go public with it? I could volunteer (although with very feeble C-skills) to participate to get this done. I just don't possess the full knowledge to start this up myself.

Could this be the tool to end all DVCS wars for good?

Answer

akaihola picture akaihola · Feb 7, 2011

I haven't tried this, but there seems to be a git-hg project. The project describes itself on the page and the README as:

A git-hg utility for checking out and tracking a mercurial repo.

A set of scripts for checking out and tracking a mercrial [sic] project.

It doesn't seem to work bi-directionally though (see issue tracker).