diff mercurial/repair.py @ 17796:1b51638bf44a

repair: use node to track post-strip bookmark target Revision numbers are unstable when non-consecutive revs are stripped.
author Matt Mackall <mpm@selenic.com>
date Wed, 17 Oct 2012 15:37:25 -0500
parents 7c865f30e2b8
children 7f5dab94e48c
line wrap: on
line diff
--- a/mercurial/repair.py	Wed Oct 17 17:32:01 2012 +0200
+++ b/mercurial/repair.py	Wed Oct 17 15:37:25 2012 -0500
@@ -114,7 +114,7 @@
     newbmtarget = repo.revs('sort(heads((::%ld) - (%ld)), -rev)',
                             tostrip, tostrip)
     if newbmtarget:
-        newbmtarget = newbmtarget[0]
+        newbmtarget = repo[newbmtarget[0]].node()
     else:
         newbmtarget = '.'