This shouldn't be possible: $ hg init a $ cd a $ echo a >> a $ hg ci -Am. adding a $ echo a >> a $ hg branch foo marked working directory as branch foo (branches are permanent and global, did you want a bookmark?) $ hg ci -Am.. $ hg ci --amend --close-branch -m 'closing' saved backup bundle to $TESTTMP/a/.hg/strip-backup/450e0eae1f4b-amend- backup.hg
Why would it make sense. Is is denied by plain commit ?
Is what denied?
This silliness fails: $ hg branch newbranch $ hg ci --close -m'open and close' abort: can only close branch heads ..so doing it with commit + commit --amend should probably fail too.
Yes, this is what the bug report is about. There's at least one other edge case with --close which I'll get to tomorrow.
--- Bug imported by bugzilla@selenic.com 2012-05-13 06:23 EDT --- This bug was previously known as _bug_ 3441 at http://mercurial.selenic.com/bts/issue3441
Fixed by http://selenic.com/repo/hg/rev/b500a663a2c7 Iulian Stana <julian.stana@gmail.com> commit: amending with --close-branch (issue3445) You can't close a branch that hasn't got a head. newbranch + commit --close-branch must fail newbranch + commit + commit --amend --close-branch must fail You must not be allowed to close a branch that is not defined. (please test the fix)