merge: handle case when heads are all bookmarks
If all heads are bookmarks, merge fails to find what node to merge
with (throws an IndexError while indexing into the non-bookmark heads
list) as of
4a02cf4fbb2e. This catches that case and prints an error
to specify a rev explicitly.
--- a/mercurial/commands.py Tue Aug 21 20:51:16 2012 +0200
+++ b/mercurial/commands.py Wed Aug 22 11:18:35 2012 -0400
@@ -4269,7 +4269,7 @@
hint=_("run 'hg heads .' to see heads"))
parent = repo.dirstate.p1()
- if len(nbhs) == 1:
+ if len(nbhs) <= 1:
if len(bheads) > 1:
raise util.Abort(_("heads are bookmarked - "
"please merge with an explicit rev"),