【发布时间】:2012-03-21 04:50:23
【问题描述】:
在使用 Windows 上的 hg-fast-export 工具解决了无数问题后(从需要清理 mercurial 存储库以满足该工具的挑剔 python 版本),我偶然发现了一个我无法解决的错误:
master: Exporting full revision 1/98 with 142/0/0 added/changed/removed files
fatal: Branch name doesn't conform to GIT standards: refs/heads/master
fast-import: dumping crash report to .git/fast_import_crash_5956
Traceback (most recent call last):
File "../fast-export/hg-fast-export.py", line 388, in <module>
options.statusfile,authors=a,sob=options.sob,force=options.force))
File "../fast-export/hg-fast-export.py", line 322, in hg2git
c=export_commit(ui,repo,rev,old_marks,max,c,authors,sob,brmap)
File "../fast-export/hg-fast-export.py", line 214, in export_commit
export_file_contents(ctx,man,added)
File "../fast-export/hg-fast-export.py", line 126, in export_file_contents
wr(d)
File "../fast-export/hg-fast-export.py", line 28, in wr
print msg
File "c:\Python26\lib\site-packages\mercurial\windows.py", line 70, in write
raise IOError(errno.EPIPE, 'Broken pipe')
IOError: [Errno 32] Broken pipe
错误似乎是:分支名称不符合 GIT 标准:refs/heads/master
有人知道如何解决这个问题吗?
我的 mercurial 存储库很干净并且工作正常,只有一个头,一切都很好,很热,可以导出。
编辑:
我通过结合使用 TortoiseHG 和 hg-git 解决了这个问题。对于任何正在寻找导出善变代表的方法的人。要 git 或反之亦然,只需按照此处描述的步骤操作:http://www.ffuts.org/blog/accessing-a-git-repository-with-tortoisehg-on-windows/
【问题讨论】:
-
hg branches的输出是什么?