repair: revlog has an iterator
authorMatt Mackall <mpm@selenic.com>
Sun, 20 Mar 2011 20:21:19 -0500
changeset 13715 2edf41a90b9d
parent 13714 7f53ce232d63
child 13716 6d7338f5320a
repair: revlog has an iterator
mercurial/repair.py
--- a/mercurial/repair.py	Sun Mar 20 20:17:57 2011 -0500
+++ b/mercurial/repair.py	Sun Mar 20 20:21:19 2011 -0500
@@ -37,7 +37,7 @@
     """return the changesets which will be broken by the truncation"""
     s = set()
     def collectone(revlog):
-        links = (revlog.linkrev(i) for i in xrange(len(revlog)))
+        links = (revlog.linkrev(i) for i in revlog)
         # find the truncation point of the revlog
         for lrev in links:
             if lrev >= striprev: