[ACCEPTED]-Mercurial error *** failed to import extension hggit: No module named hggit-hg-git
Note for ubuntu users who install the "mercurial-git" package 4 to get the hggit module on 12.04 some bright 3 spark randomly renamed the module to just 2 "git" so you need to change your ~/.hgrc 1 to look something like
[extensions] hgext.bookmarks = git =
After installing hg-git with the following 6 command:
Does the following work?
python -c "import hggit"
What does 5 this say for you:
head -n1 `which hg`
The point of the latter 4 command is to verify that the Python hg 3 runs under has hggit installed. In my case 2 it says '#!/usr/bin/python', which is my 1 standard python command.
What does this say:
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python -c "import hggit"
I installed Python and TortoiseHg by:
brew cask install python brew cask install tortoisehg
After 6 following installation
sudo easy_install hg-git
I experienced similar 5 problems (TortoiseHg: failed to import extension hggit: No module named hggit and so on...) and finally found a solution 4 for my TortoiseHg on mac (first uninstall last hg-git by
sudo pip uninstall hg-git):
sudo pip install mercurial sudo pip install hg-git
After installation 3 with pip and adding bookmarks to all important 2 branches, e. g. ...
hg bookmark -r default master hg bookmark -r branchename bookmarkname
... I could push HG repository 1 to Git:
hg push git+ssh://git@gitlab.URL/reponame.git --traceback
Note: use ssh! - causes fewer problems with large repositories
Note 2: --traceback tells you about problems
I got this error as well even after downloading 20 the latest Tortoisehg and making sure the 19 hggit plugin was installed as well as my 18 .ini & hgrc files had the right entry 17 to enable hggit.
Turns out my problem was 16 that I had both mercurial and tortoisehg 15 in my path. So when I ran any hg commands, it 14 was using the hg.exe in mercurial folder 13 as opposed to the hg.exe in the torsoisehg 12 directory.
This makes sense but my mercurial 11 installation did not have the plug ins. My 10 fix was to remove mercurial from my path 9 so hg commands go through the tortoisehg 8 directory since it has hg completely bundled. Note 7 however, the recommended option might be 6 to upgrade mercurual to a version that has 5 the plugins that one needs but this is what 4 worked for me. I tried replacing the library.zip 3 in mercurial with the one in tortoisehg 2 and this worked but it led to other errors 1 as one would imagine.
I had the same problem as I saw via
brew install mercurial some 4 packages are missing.
Do a test if any package 3 missed like:
python -c "import hggit"
My fix: Uninstall all packages:
brew uninstall mercurial
install 2 with
sudo easy_install pip( if you don't have
sudo pip install mercurialand 1
sudo pip install hg-git
hg bookmark -r default master
I had the same problem, and found that installing 6 hg-git and dulwich via easy_install worked 5 if I used the
--user option. This installed the 4 package into
To see where this option will 3 install a package on your machine, run
easy_install --help. By 2 the documentation for the
--user option, it shows 1 the install directory that will be used.
- clone hggit from http://bitbucket.org/durin42/hg-git
- get hg-git path from your local computer. in my local computer
- add path to
~.hgrcfile using your text editor
add the following lines of code
[extenstions] hggit = /Users/coco/go/src/bitbucket.org/durin42/hg-git/hggit
clone/push/pullform 1 github
More Related questions