repair: use node to track post-strip bookmark target
authorMatt Mackall <mpm@selenic.com>
Wed, 17 Oct 2012 15:37:25 -0500
changeset 17796 1b51638bf44a
parent 17795 9fcea3f47a3a
child 17797 e4da793998bf
child 17851 7aa7380691b8
repair: use node to track post-strip bookmark target Revision numbers are unstable when non-consecutive revs are stripped.
mercurial/repair.py
--- 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 = '.'