--- a/mercurial/commands.py Tue Apr 16 02:33:54 2019 +0530
+++ b/mercurial/commands.py Tue Apr 16 02:53:28 2019 +0530
@@ -1677,7 +1677,7 @@
raise error.Abort(_('current revision is already a branch closing'
' head'))
elif not bheads:
- raise error.Abort(_('can only close branch heads'))
+ raise error.Abort(_('branch "%s" has no heads to close') % branch)
elif branch == repo['.'].branch() and repo['.'].node() not in bheads:
raise error.Abort(_('can only close branch heads'))
elif opts.get('amend'):