【问题标题】:Can't close hg branches?不能关闭汞分支?
【发布时间】:2015-11-18 11:37:10
【问题描述】:

我的 mercurial repo 中有大约五个分支拒绝关闭并被删除。我一直在使用 SourceTree 来关闭其他人没有问题。这些“无法关闭”的分支,当我尝试关闭它们时,会创建提交,就好像它们正在关闭一样,但拒绝从 UI 左侧的侧边栏中消失。在终端中输入 hg commit --close-branch 会告诉我以下信息:

Tinas-Air:funenglish catlard$ hg branch
3.0
Tinas-Air:funenglish catlard$ hg up -C 3.0
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
Tinas-Air:funenglish catlard$ hg commit --close-branch -m no message
abort: message: No such file or directory
Tinas-Air:funenglish catlard$ hg commit --close-branch -m ' no message'
created new head

然后,当我列出 hg 分支时,它会说:

Tinas-Air:funenglish catlard$ hg branches
FEAT-progress_module        6203:8c2addc535
FEAT-parents_area           6201c87b905e55e
FEAT-walkthrough            6199d70a6c28710
FEAT-teachers_area          619825e1cd7b0c1
master                      6190950f16d7910
8.2                         6188:5efdffeb62
3.0                         6153:60bd90da4c
build script                119:6e1aa3452e7
purchases refactoring       663:113aa89c24
FE11.2                      588:70077629fe
develop                     6192:1a91a3f03 (inactive)
FE11-android                5526:2ac6dff5023 (inactive)
FS11-android                5525:d2f25f5b5d5 (inactive)
FECH                        5480:0c4585de4029 (inactive)
FFN,FSN                     5278:52d0ba197af0 (inactive)
kindle-7.1                  1916:12ad96e086f3 (inactive)
811                         1338:57d84d1455be (inactive)

当我检查“hg head 3.0”时,它告诉我:

Tinas-Air:funenglish catlard$ hg heads 3.0
changeset:   6212:202651aa75f3
branch:      3.0
tag:         tip
parent:      6211:e7966cda82da
parent:      6205:b8e081dc3436
user:        Simon Braunstein <sgbraunstein@gmail.com>
date:        Thu Nov 19 11:27:05 2015 +0800
summary:     Merge

因此,分支 3.0 似乎只有一个头部/尖端,但它仍然不会关闭。它似乎仍然是开放的。我能做些什么来关闭像“3.0”这样的分支?为什么这些,具体来说,拒绝关闭?我错过了什么?我能做些什么来修复它?这个 repo 对我的公司很重要,因为它包含了我们自开始以来所有更改的历史。

【问题讨论】:

标签: mercurial branch atlassian-sourcetree


【解决方案1】:

发现问题。如果您有同名的标签,Mercurial 不会正确关闭分支。所以,一旦我删除了 3.0 的标签,3.0 的分支就可以正常关闭了。

【讨论】:

  • 附带说明:标签名称不应与分支相同。特别是如果你想让你的构建服务器签出一个标签。
猜你喜欢
  • 1970-01-01
  • 2013-01-01
  • 2023-03-27
  • 2010-09-07
  • 1970-01-01
  • 1970-01-01
  • 2011-01-15
  • 2013-11-04
  • 2021-07-02
相关资源
最近更新 更多