Wednesday, May 15, 2013

Getting Hg-Git working on Windows 7 (64-bit) with TortoiseHg

Just posting in case I need to remember how to do this again.

I am using TortoiseHg at version 2.8 (Hg version 2.6).

Open a Windows Command Prompt as an Administrator, then:

hg clone https://bitbucket.org/durin42/hg-git/Path_To_TortoiseHg_Installation\hg-git”

The location of hg-git I got from the Mercurial Wiki, and on my system the Path_To_TortoiseHg_Installation is C:\Program Files\TortoiseHg.

For the next step, enabling the extension, the advice at ffuts.org / blog came in handy.  The first comment at the bottom did the trick.  Instead of updating your Mercurial.ini file with this line:

[extensions]
hggit = C:\Program Files\TortoiseHg\hg-git

When I tried this, I kept getting a “failed to import module” error when verifying the extension was enabled using the hg help extensions command.  The solution was in the first comment… instead of the above, point to the hggit directory inside the hg-git directory/repository, as follows:

[extensions]
hggit = C:\Program Files\TortoiseHg\hg-git\hggit

Once I made that change, everything started working and the extension was properly enabled.

Technorati Tags: ,,,,,,,,
Windows Live Tags: Windows,TortoiseHg,version,Mercurial,extension,advice,solution,repository,hggit
WordPress Tags: Windows,TortoiseHg,version,Mercurial,extension,advice,solution,repository,hggit

No comments: