# HG changeset patch # User John Li # Date 1345648715 14400 # Node ID 45b5eb2941d0d35863a96d13ce11a55be1825c68 # Parent b32a30da608d529a0ebbde364f291c5ef107a6b4 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. diff -r b32a30da608d -r 45b5eb2941d0 mercurial/commands.py --- 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"),