diff mercurial/commands.py @ 18122:730b769fb634 stable

bookmarks: fix head selection for merge with two bookmarked heads A type mismatch caused the search for the other head to fail. The code is fragile, and instead it ended up using the 'first' bookmark head, but the ordering is undefined and it could thus randomly use the wrong bookmarkhead and fail with: $ hg up -q -C e@diverged $ hg merge abort: merging with a working directory ancestor has no effect
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 24 Dec 2012 13:26:13 +0100
parents b74361cf7c0a
children 7f5a0eba3768
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Nov 29 08:44:54 2012 -0500
+++ b/mercurial/commands.py	Mon Dec 24 13:26:13 2012 +0100
@@ -4288,7 +4288,7 @@
 
     if not node and repo._bookmarkcurrent:
         bmheads = repo.bookmarkheads(repo._bookmarkcurrent)
-        curhead = repo[repo._bookmarkcurrent]
+        curhead = repo[repo._bookmarkcurrent].node()
         if len(bmheads) == 2:
             if curhead == bmheads[0]:
                 node = bmheads[1]