Mercurial error *** failed to import extension hggit: No module named hggit Mercurial error *** failed to import extension hggit: No module named hggit python python

Mercurial error *** failed to import extension hggit: No module named hggit


Note for ubuntu users who install the "mercurial-git" package to get the hggit module on 12.04 some bright spark randomly renamed the module to just "git" so you need to change your ~/.hgrc to look something like

[extensions]hgext.bookmarks =git =


After installing hg-git with the following command:

easy_install hg-git

Does the following work?

python -c "import hggit"

What does this say for you:

head -n1 `which hg`

The point of the latter command is to verify that the Python hg runs under has hggit installed. In my case it says '#!/usr/bin/python', which is my standard python command.

What does this say:

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.a­pp/Contents/MacOS/Python -c "import hggit"


I got this error as well even after downloading the latest Tortoisehg and making sure the hggit plugin was installed as well as my .ini & hgrc files had the right entry to enable hggit.

Turns out my problem was that I had both mercurial and tortoisehg in my path. So when I ran any hg commands, it was using the hg.exe in mercurial folder as opposed to the hg.exe in the torsoisehg directory.

This makes sense but my mercurial installation did not have the plug ins. My fix was to remove mercurial from my path so hg commands go through the tortoisehg directory since it has hg completely bundled. Note however, the recommended option might be to upgrade mercurual to a version that has the plugins that one needs but this is what worked for me. I tried replacing the library.zip in mercurial with the one in tortoisehg and this worked but it led to other errors as one would imagine.