Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用快速导出将mercurial回购转换为git时,至少有一个未命名的头错误_Git_Mercurial_Migrate - Fatal编程技术网

使用快速导出将mercurial回购转换为git时,至少有一个未命名的头错误

使用快速导出将mercurial回购转换为git时,至少有一个未命名的头错误,git,mercurial,migrate,Git,Mercurial,Migrate,我正在尝试使用从mercurial存储库迁移到git存储库,但是我得到了 错误:存储库至少有一个未命名的头:hg r491 我写了一个函数,它允许您为一个未命名的头指定发散提交以及一个新的分支名称,并且整个行将移动到该新分支 /path/to/hg-fast-export.sh -r /path/to/hg_repo -f --plugin head2branch=aliases,373 --plugin head2branch=threads,374 在(希望)合并之前,使用此插件的步骤如下

我正在尝试使用从mercurial存储库迁移到git存储库,但是我得到了

错误:存储库至少有一个未命名的头:hg r491

我写了一个函数,它允许您为一个未命名的头指定发散提交以及一个新的分支名称,并且整个行将移动到该新分支

/path/to/hg-fast-export.sh -r /path/to/hg_repo -f --plugin head2branch=aliases,373 --plugin head2branch=threads,374
在(希望)合并之前,使用此插件的步骤如下:

git clone https://github.com/ethanfurman/fast-export.git
cd fast-export
git checkout head2branch-plugin
mkdir /path/to/new-git-repo
cd /path/to/new-git-repo
git init
/path/to/fast-export/hg-fast-export.sh -r /path/to/hg_repo
此时,研究每个未命名的头,以找到其第一个不同的提交,并为其指定一个新的分支名称。例如:

$ /path/to/fast-export/hg-fast-export.sh -r ~/path/to/hg-repo
Error: repository has unnamed head: hg r491
Error: repository has unnamed head: hg r373
最后,在插件处于活动状态的情况下运行
fast export
,指定
-f
忽略未命名头错误:

$ /path/to/fast-export/hg-fast-export.sh -r /path/to/hg-repo -f --plugin head2branch=aliases,373 --plugin head2branch=threads,374

不适用于pythone 3.8什么是head2branch=threads,374?