我不认为这是可能的.修订版54具有父“1(000000000000)”(即没有).显然我对Mercurial还有一些不了解的事情,任何人都可以让我知道这意味着什么 – 以及进入这种状态必然会发生什么.据我所知,它只是推送和拉出它的东西 – 并没有人使用任何古怪的扩展.
修订版54和55只是添加标签,但如果我’更新-C’到版本54,我最终只能使用.hgtags文件.
我从修订版53中克隆了一下来解决这个问题.但我宁愿理解这里发生的事情,所以我可以避免它再次发生.
解决方法
Each changeset has zero,one or two parent changesets:
- It has two parent changesets,if the commit was a merge.
- It has no parent,if the changeset is a root in the repository.
There may be multiple roots in a repository (normally,there is only one),each representing the start of a branch.“Updating” back to a changeset which already has a child,changing files and then committing creates a new child changeset,thus starting a new branch. Branches can be named.
也许这就是你做的:
>更新回53(当时已经有一个孩子’54’了)
>更改文件
>提交,从而从54开始一个新的分支,没有父母
(那将使用相同的父进行第二次提交)
要么:
>用--close-branch
option进行53投票,
>可能新的提交(不切换回另一个分支)可能会开始一个新的提交
--close-branch
doesn’t do anything except hide a branch from a list,and it’s undone next time you commit on that branch. It won’t create multiple roots.VonC is right in his diagnosis,multiple heads.
But no combination of ‘update
‘ and ‘commit
‘ will get you into that state.
To end up with multiple roots one usually has done a ‘hg pull
‘ from repo and used--force
to override an “unrelated repositories
” warning.
(“无父”,表示父ID设置为00000,见“behind the scene”: