Search code examples
gitmercurial

Switching Mercurial Projects (Bitbucket) to Git (Github)


I am trying to move my public projects from bitbucket to github.

I see that hg-git extension will help me get this done.

$ easy_install hg-git

Searching for hg-git
Best match: hg-git 0.3.0
Processing hg_git-0.3.0-py2.7.egg
hg-git 0.3.0 is already the active version in easy-install.pth

Using /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/hg_git-0.3.0-py2.7.egg
Processing dependencies for hg-git
Searching for dulwich>=0.8.1

why? from dulwich official website I see that 0.8.1 is not even out yet.

Reading http://pypi.python.org/simple/dulwich/
Reading http://samba.org/~jelmer/dulwich
Reading http://launchpad.net/dulwich
No local packages or download links found for dulwich>=0.8.1

If I try the more involved way as mentioned on github

I get dulwich 0.8.0 installed

$ which dulwich                                                                                 
/Library/Frameworks/Python.framework/Versions/2.7/bin/dulwich

I clone the hg-git repository and properly link it from my hgrc. However when I try using hg-git it complains

*** failed to import extension hggit from ~/.bin/hg-git/hggit: No module named dulwich.errors

So, apparantly I am not able to install hg-git, and I am stuck.


UPDATE

>>> import dulwich
>>> import dulwich.errors
>>> dulwich.errors
<module 'dulwich.errors' from '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dulwich-0.8.0-py2.7-macosx-10.6-intel.egg/dulwich/errors.pyc'>
>>> dulwich
<module 'dulwich' from '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dulwich-0.8.0-py2.7-macosx-10.6-intel.egg/dulwich/__init__.pyc'>


Solution

  • used hg-fast-export following Dan's tutorial