无法关闭 hg 分支?
Can't close hg branches?
我的 mercurial 回购中大约有五个分支拒绝关闭并被删除。我一直在使用 SourceTree 毫无问题地关闭其他人。这些 "uncloseable" 分支,当我尝试关闭它们时,创建提交就像它们被关闭一样,但拒绝从 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 heads 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好像只有一个head/tip,但是还是关不掉。它似乎仍然是开放的。我该怎么做才能关闭像“3.0”这样的分支?为什么这些人特别拒绝关闭?我错过了什么?我能做些什么来修复它?这个 repo 对我的公司很重要,因为它包含了我们从一开始就发生的所有变化的历史。
找到问题了。如果您有同名标签,Mercurial 不会正确关闭分支。所以,我把3.0的tag删掉后,3.0的分支就可以正常关闭了
我的 mercurial 回购中大约有五个分支拒绝关闭并被删除。我一直在使用 SourceTree 毫无问题地关闭其他人。这些 "uncloseable" 分支,当我尝试关闭它们时,创建提交就像它们被关闭一样,但拒绝从 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 heads 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好像只有一个head/tip,但是还是关不掉。它似乎仍然是开放的。我该怎么做才能关闭像“3.0”这样的分支?为什么这些人特别拒绝关闭?我错过了什么?我能做些什么来修复它?这个 repo 对我的公司很重要,因为它包含了我们从一开始就发生的所有变化的历史。
找到问题了。如果您有同名标签,Mercurial 不会正确关闭分支。所以,我把3.0的tag删掉后,3.0的分支就可以正常关闭了