Mercurial > public > mercurial-scm > hg-stable
diff tests/test-commit-amend.t @ 19305:b500a663a2c7 stable
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.
author | Iulian Stana <julian.stana@gmail.com> |
---|---|
date | Thu, 02 May 2013 19:36:47 +0300 |
parents | 4e1ae55e63ef |
children | 0151b61fed97 |
line wrap: on
line diff
--- a/tests/test-commit-amend.t Thu Jun 06 14:05:03 2013 -0400 +++ b/tests/test-commit-amend.t Thu May 02 19:36:47 2013 +0300 @@ -743,3 +743,27 @@ -aa -aa +Issue 3445: amending with --close-branch a commit that created a new head should fail +This shouldn't be possible: + + $ hg up -q default + $ hg branch closewithamend + marked working directory as branch closewithamend + (branches are permanent and global, did you want a bookmark?) + $ hg ci -Am.. + adding cc.orig + adding obs.py + adding obs.pyc + $ hg ci --amend --close-branch -m 'closing' + abort: can only close branch heads + [255] + +This silliness fails: + + $ hg branch silliness + marked working directory as branch silliness + (branches are permanent and global, did you want a bookmark?) + $ echo b >> b + $ hg ci --close-branch -m'open and close' + abort: can only close branch heads + [255]