2011-09-12 57 views
3

我试图将我的公共项目从bitbucket移动到github。将Mercurial项目(Bitbucket)切换到Git(Github)

我看到hg-git扩展名将帮助我完成此操作。

$ 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 

为什么?从dulwich官方网站我看到0.8.1还没有出来。

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 

如果我尝试github

所提到的更多的参与方式,我得到德威0.8.0安装

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

我克隆HG-git仓库,并正确地从我的hgrc挂靠。然而,当我尝试使用HG-的git它抱怨

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

所以,apparantly我不能安装HG-混帐,我卡住了。


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

+0

尝试再次询问关于[邮件列表](http://groups.google.com/group/hg-git)。它已经被报道,但维护者(甚至承认它)在第二天发布了,所以如果它仍然是错误的,那么再次提醒它可能是有意义的。 –

+1

为什么不使用[hg-fast-export](http://repo.or.cz/w/fast-export.git)? – cenanozen

回答

1

如果可能的话,尽量使用TortoiseHG。它们包括一个德威工作版本,你只需要指定hg-git的路径。

+0

我在Mac OS X. –

0

显然有人只是碰到该项目3天前的依赖性要求:

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

至于你的错误 - 如果你运行python并键入import dulwich,然后import dulwich.errors发生什么呢?你收到什么信息?可能出于某种原因,您安装的德威版本不在Mercurial工具使用的模块搜索路径中 - 您可以尝试调整PYTHONPATH

+0

更新了dulwich进口;看看 –

+0

我真的不知道,你能帮忙吗,嗯? –

+0

你的'PYTHONPATH' env var是否被设置为特别的东西? – Amber