没有父母的水银修订是什么意思? [英] What does a mercurial revision with no parent mean?
问题描述
我有一个Mercurial存储库,该存储库现在处于奇怪的状态.这就是TortoiseHG的样子:
I have a Mercurial repository that is in a strange state now. This is what it looks like in TortoiseHG:
我认为这不可能.修订版54的父级为"-1(000000000000)"(即为空).关于Mercurial,显然还有一些我不了解的地方,谁能让我知道这意味着什么-进入这种状态必须发生什么.据我所知,它只是从中推拉出来的东西-而且没有人使用过任何古怪的扩展.
I didn't think this would be possible. Revision 54 has a parent of "-1 (000000000000)" (i.e. nothing). There's clearly something I don't understand yet about Mercurial, can anyone let me know what this means - and what must have happened for it to get into this state. As far as I know, it's only had stuff pushed and pulled from it - and nobody has been using any wacky extensions.
修订版54和55只是添加标签,但是如果我'update -C'到修订版54,我最终只会得到.hgtags文件.
Revisions 54 and 55 were just adding tags, but if I 'update -C' to revision 54 I end up with ONLY the .hgtags file.
我从53版进行了克隆以解决此问题.但是我宁愿了解这里发生了什么,所以我可以避免它再次发生.
I've made a clone from revision 53 to fix this. But I'd rather understand what happened here, so I can avoid it happening again.
推荐答案
当您查看
每个变更集都有零个,一个或两个父变更集:
Each changeset has zero, one or two parent changesets: 更新"到已经有一个子集的变更集,更改文件然后提交将创建一个新的子变更集,从而开始一个新的分支.分支可以命名. "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. 所以也许这就是你所做的: So maybe this is what you did: 或: Ry4an (实际的Mercurial专家;))在以下提示中输入了以下内容: Ry4an (an actual Mercurial specialist ;) ) chimes in and comments: VonC诊断正确,多头. VonC is right in his diagnosis, multiple heads.
(无父母",这意味着父母ID设置为00000,请参见: 这篇关于没有父母的水银修订是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
存储库中可能有多个根(通常只有一个根),每个根都代表分支的开始.
There may be multiple roots in a repository (normally, there is only one), each representing the start of a branch.
提交,因此从54开始没有父级的新分支
(这将与同一父对象进行第二次提交)
committing, thus starting a new branch from 54, with no parent
(that would make a second commit with the same parent)
使用 --close-branch
选项,
comitting 53 with a --close-branch
option,
--close-branch
除了隐藏列表中的分支外不执行任何操作,下一次在该分支上提交时,此操作将被撤消.它不会创建多个根.
--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.
但是'update
'和'commit
'的组合不会使您进入该状态.
为了获得多个词根,通常需要在回购中添加一个hg pull
,并使用--force
覆盖一个"unrelated repositories
"警告.
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.
(来源: red-bean.com )子>
)
(source: red-bean.com)
)