Show More
@@ -1675,6 +1675,8 b' def _docommit(ui, repo, *pats, **opts):' | |||
|
1675 | 1675 | |
|
1676 | 1676 | if not bheads: |
|
1677 | 1677 | raise error.Abort(_('can only close branch heads')) |
|
1678 | elif branch == repo['.'].branch() and repo['.'].node() not in bheads: | |
|
1679 | raise error.Abort(_('can only close branch heads')) | |
|
1678 | 1680 | elif opts.get('amend'): |
|
1679 | 1681 | if (repo['.'].p1().branch() != branch and |
|
1680 | 1682 | repo['.'].p2().branch() != branch): |
@@ -956,19 +956,16 b' Test to make sure that `--close-branch` ' | |||
|
956 | 956 | |
|
957 | 957 | trying to close branch from a cset which is not a branch head |
|
958 | 958 | it should abort: |
|
959 | XXX: it should have aborted here | |
|
960 | 959 | $ hg ci -m "closing branch" --close-branch |
|
961 | created new head | |
|
960 | abort: can only close branch heads | |
|
961 | [255] | |
|
962 | 962 | |
|
963 | 963 | $ hg up 0 |
|
964 | 964 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
965 | 965 | $ hg log -GT "{rev}: {node|short} {desc|firstline}\n\t{branch}\n\n" |
|
966 | _ 3: 006876ddd20e closing branch | |
|
966 | o 2: 155349b645be added c | |
|
967 | 967 | | default |
|
968 | 968 | | |
|
969 | | o 2: 155349b645be added c | |
|
970 | |/ default | |
|
971 | | | |
|
972 | 969 | o 1: 5f6d8a4bf34a added b |
|
973 | 970 | | default |
|
974 | 971 | | |
General Comments 0
You need to be logged in to leave comments.
Login now