Vaibhav Bajpai
Vaibhav Bajpai

Reputation: 16814

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'>

Upvotes: 3

Views: 1582

Answers (3)

Geo
Geo

Reputation: 96997

If possible, try to use TortoiseHG. They include a working version of dulwich, and you'd only need to specify the path to hg-git.

Upvotes: 1

Vaibhav Bajpai
Vaibhav Bajpai

Reputation: 16814

used hg-fast-export following Dan's tutorial

Upvotes: 3

Amber
Amber

Reputation: 527558

Apparently someone just bumped the dependency requirement for the project 2 days ago:

https://bitbucket.org/durin42/hg-git/changeset/81f42c0d5ea9

As for your error - what happens if you run python and type import dulwich, and then import dulwich.errors? What messages do you get? It may be that for some reason, the version of dulwich you have installed isn't in the module search path being used by Mercurial's tools - you could try adjusting PYTHONPATH.

Upvotes: 0

Related Questions