我想从googlecode和Mercurial迁移到Git和GitHub,同时保留所有分支和版本历史。在
到目前为止,hggit mercurial插件(http://hg-git.github.com/)似乎是我唯一的选择。我试着按照安装说明操作,但有点不知所措。我在这里:
[extensions]
hgext.bookmarks =
hggit =
现在当我跑步时:
^{pr2}$我得到以下信息:
Searching for hg-git
Best match: hg-git 0.3.3
Processing hg_git-0.3.3-py2.7.egg
hg-git 0.3.3 is already the active version in easy-install.pth
Using c:\python27\lib\site-packages\hg_git-0.3.3-py2.7.egg
Processing dependencies for hg-git
Searching for dulwich>=0.8.0
Reading http://pypi.python.org/simple/dulwich/
Reading http://samba.org/~jelmer/dulwich
Reading http://launchpad.net/dulwich
Best match: dulwich 0.8.5
Downloading http://samba.org/~jelmer/dulwich/dulwich-0.8.5.tar.gz
Processing dulwich-0.8.5.tar.gz
Running dulwich-0.8.5\setup.py -q bdist_egg --dist-dir c:\users\lee\appdata\local\temp\easy_install-3qgeev\dulwich-0.8.5\egg-dist-tmp-ciyt_4
然后一堆错误看起来像这样:
Traceback (most recent call last):
File "C:\Python27\Scripts\easy_install-script.py", line 8, in <module>
load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 1712, in main
with_ei_usage(lambda:
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 1700, in with_ei_usage
return f()
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 1716, in <lambda>
distclass=DistributionWithoutHelpCommands, **kw
File "C:\Python27\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 211, in run
self.easy_install(spec, not self.no_deps)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 446, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 481, in install_item
self.process_distribution(spec, dists[0], deps, "Using")
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 519, in process_distribution
[requirement], self.local_index, self.easy_install
File "C:\Python27\lib\site-packages\pkg_resources.py", line 563, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File "C:\Python27\lib\site-packages\pkg_resources.py", line 799, in best_match
return self.obtain(req, installer) # try and download/install
不知道下一步该怎么做。我也试过遵循Cloning github repo with hggit中的提示,但是我遗漏了一些显而易见的东西。任何帮助都将不胜感激。在
只是草稿和一些注释和想法:
bookmarks扩展,作为默认扩展,与THG捆绑在一起,在一些版本的GUI中已经启用,可以在中找到水星.ini现在是
bookmarks =
,在设置扩展中没有相应的复选框在TortoiseHG中使用功能性hg git(克隆、拉取、推送等操作不会出错),您可以尝试将外部Mercurial repo转换为外部git repo
[paths]
部分中的新字符串),对于我来说,git+ssh://git@github.com/username/reponame.git
URL(在pagent上具有基于密钥的身份验证)是透明的解决方案截图只是我在GitHub上活动Git repo的一个例子,并试图通过一个实时源来说明我的话
我也在和hg-git做斗争。我想出了一个奇怪的解决办法。在
我用https://import.github.com/new导入hg repo 这并不奇怪,一定是你想要的。在
下面是诡异和奖金部分:
.hg/
添加到我的.gitignore
.hg/
和.git/
添加到.gitignore
文件中.git/ .hg/
在本地repo中输入
.hg
目录,并用符号链接您的.gitignore
文件为.hgignore
$ln-s../.gitignore.hgignore
现在,对
.gitignore
所做的任何更改都将由hg
考虑$git add.gitignore-am“gitignore”
$hg add.gitignore-am“不要忘记在.hg/folder中使用symlink.gitignore as.hgignore”
$hg推送违约
$git推送原始主机
结论:虽然看起来效率低下,但它利用了github的优势,同时又不丢失hg repo和数据库,并提供了同时使用}的机会
git
和{相关问题 更多 >
编程相关推荐