How do I convert a git repository to mercurial?

Spoike picture Spoike · Jan 29, 2009 · Viewed 28.8k times · Source

I've been developing a java application using git as source code repository. I'd like to share the project with other java developers and hg seems to be most used by them.

My question is how do I convert a git repository to hg?

If I tried googling "convert git to hg" and every search hit is about converting from hg to git. I'm also using TortoiseHg.

Answer

Spoike picture Spoike · Jan 29, 2009

The hg convert utility isn't on by default after installation. In order to set it as such add the following to your .hgrc file.

[extensions]
hgext.convert=

If you're using TortoiseHg on Windows then this file resides in your home directory as mercurial.ini. After this setting change you will be able to use the hg convert utility.