Mercurial > hg
comparison tests/test-revset.t @ 18955:f3245f22771c
commit: allow closing "non-head" changesets
Backout acd61dc44a39. The changeset prevented closing non-head changesets but
did not provide any rationale or test case and I don't see what value it adds.
Users might have their reasons to commit something anywhere - and close it
immediately.
And contrary to the comment that is removed: The topo heads set is _not_
included in the branch heads set of the current branch. It do not include
closed topological heads.
The change thus prevented closing commits on top of closing commits. A valid
usecase for that is to merge closed heads to reduce the number of topological
heads.
The only existing test coverage for this is the failing double close in
test-revset.t. It was added in 3cc2e34d7a7d and seems to not be intentional.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 10 Apr 2013 13:12:24 +0200 |
parents | 9e39a717a23e |
children | 26ddce1a2a55 |
comparison
equal
deleted
inserted
replaced
18954:b1639e98e8a1 | 18955:f3245f22771c |
---|---|
76 $ hg ci -Aqm7 | 76 $ hg ci -Aqm7 |
77 | 77 |
78 $ hg branch all | 78 $ hg branch all |
79 marked working directory as branch all | 79 marked working directory as branch all |
80 (branches are permanent and global, did you want a bookmark?) | 80 (branches are permanent and global, did you want a bookmark?) |
81 $ hg ci --close-branch -Aqm8 | |
82 abort: can only close branch heads | |
83 [255] | |
84 | 81 |
85 $ hg co 4 | 82 $ hg co 4 |
86 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 83 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
87 $ hg branch é | 84 $ hg branch é |
88 marked working directory as branch \xc3\xa9 (esc) | 85 marked working directory as branch \xc3\xa9 (esc) |