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中的另一个分支?_Mercurial_Branch_Revision - Fatal编程技术网

如何将基础修订移动到mercurial中的另一个分支?

如何将基础修订移动到mercurial中的另一个分支?,mercurial,branch,revision,Mercurial,Branch,Revision,我读过这个问题: 但我的问题略有不同。我所拥有的是: NULL -> 1 -> 2 -> 3 -> 4 -> etc #default \ 10 #default (new head without parent) \ 11 -> 12 -> 13 -> 14 #new-empty-branch 当然,我从一开始就应该在de new empty branch中提交版本10,但我没有,所以现在我想将版本10从默认分支

我读过这个问题:

但我的问题略有不同。我所拥有的是:

NULL -> 1 -> 2 -> 3 -> 4 -> etc   #default
 \ 
  10  #default (new head without parent)
   \ 
    11 -> 12 -> 13 -> 14  #new-empty-branch
当然,我从一开始就应该在de new empty branch中提交版本10,但我没有,所以现在我想将版本10从默认分支移动到#new empty branch。不幸的是,所有的修订都已经推出了

这就是我想要的结局:

NULL -> 1 -> 2 -> 3 -> 4 -> etc   #default
 \ 
  10 -> 11 -> 12 -> 13 -> 14  #new-empty-branch 

有什么想法吗?

你确定你真的想要在后面的图片中展示的东西吗?这是一个具有两个根目录的存储库(两个没有父目录的修订版)。这不是违法的,但这并不正常,这绝对不是人们的行为

如果您真的想这样做(相信我,您几乎肯定不会这样做),您将不得不修改变更集10(因为命名分支是修订的哈希组件)及其后的每个变更集(因为父级的哈希是修订的哈希组件)你将得到一个不同的存储库,每个克隆了它的人都必须删除他们的克隆并重新克隆

或者你可以

hg update 10
hg commit --close-branch
今天到此为止。这足以让10个人不再出现在
hg头像中