##// END OF EJS Templates
commit: make the error message more specific while aborting branch closing...
Sushil khanchi -
r42694:abd4783d default
parent child Browse files
Show More
@@ -1677,7 +1677,7 b' def _docommit(ui, repo, *pats, **opts):'
1677 raise error.Abort(_('current revision is already a branch closing'
1677 raise error.Abort(_('current revision is already a branch closing'
1678 ' head'))
1678 ' head'))
1679 elif not bheads:
1679 elif not bheads:
1680 raise error.Abort(_('can only close branch heads'))
1680 raise error.Abort(_('branch "%s" has no heads to close') % branch)
1681 elif branch == repo['.'].branch() and repo['.'].node() not in bheads:
1681 elif branch == repo['.'].branch() and repo['.'].node() not in bheads:
1682 raise error.Abort(_('can only close branch heads'))
1682 raise error.Abort(_('can only close branch heads'))
1683 elif opts.get('amend'):
1683 elif opts.get('amend'):
@@ -892,7 +892,7 b' This silliness fails:'
892 marked working directory as branch silliness
892 marked working directory as branch silliness
893 $ echo b >> b
893 $ echo b >> b
894 $ hg ci --close-branch -m'open and close'
894 $ hg ci --close-branch -m'open and close'
895 abort: can only close branch heads
895 abort: branch "silliness" has no heads to close
896 [255]
896 [255]
897
897
898 Test that amend with --secret creates new secret changeset forcibly
898 Test that amend with --secret creates new secret changeset forcibly
General Comments 0
You need to be logged in to leave comments. Login now