diff mercurial/repair.py @ 22818:d7b114493315

repair: use `first` instead of direct indexing This makes it compatible with all smartset classes.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 07 Oct 2014 00:09:50 -0700
parents 445472225ccd
children aa4a1672583e
line wrap: on
line diff
--- a/mercurial/repair.py	Mon Oct 06 23:45:07 2014 -0700
+++ b/mercurial/repair.py	Tue Oct 07 00:09:50 2014 -0700
@@ -99,7 +99,7 @@
     # is much faster
     newbmtarget = repo.revs('max(parents(%ld) - (%ld))', tostrip, tostrip)
     if newbmtarget:
-        newbmtarget = repo[newbmtarget[0]].node()
+        newbmtarget = repo[newbmtarget.first()].node()
     else:
         newbmtarget = '.'