加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Python > 正文

没有父母的mercurial修订是什么意思?

发布时间:2020-12-16 23:36:58 所属栏目:Python 来源:网络整理
导读:我现在有一个处于奇怪状态的Mercurial存储库.这就是TortoiseHG的样子: 我不认为这是可能的.修订版54具有父“1(000000000000)”(即没有).显然我对Mercurial还有一些不了解的事情,任何人都可以让我知道这意味着什么 – 以及进入这种状态必然会发生什么.据我所
我现在有一个处于奇怪状态的Mercurial存储库.这就是TortoiseHG的样子:

我不认为这是可能的.修订版54具有父“1(000000000000)”(即没有).显然我对Mercurial还有一些不了解的事情,任何人都可以让我知道这意味着什么 – 以及进入这种状态必然会发生什么.据我所知,它只是推送和拉出它的东西 – 并没有人使用任何古怪的扩展.

修订版54和55只是添加标签,但如果我’更新-C’到版本54,我最终只能使用.hgtags文件.

我从修订版53中克隆了一下来解决这个问题.但我宁愿理解这里发生的事情,所以我可以避免它再次发生.

解决方法

当您查看 definition of a changeset时,您会看到:

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投票,
>可能新的提交(不切换回另一个分支)可能会开始一个新的提交

Ry4an(真正的Mercurial专家;))编钟和评论:

--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”:

alt text http://hgbook.red-bean.com/read/figs/revlog.png)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读