hbisect: confine loop to the relevant interval
authorAlexander Krauss <krauss@in.tum.de>
Sat, 16 Jul 2011 12:22:40 +0200
changeset 14893 01e0091679c0
parent 14891 62122c1c830b
child 14894 3db92e3948d5
hbisect: confine loop to the relevant interval In this context we know that ancestors[rev] == None for all rev <= goodrev, so looping further back is unnecessary (and confusing).
mercurial/hbisect.py
--- a/mercurial/hbisect.py	Mon Jul 18 14:57:22 2011 -0500
+++ b/mercurial/hbisect.py	Sat Jul 16 12:22:40 2011 +0200
@@ -45,7 +45,7 @@
         # clear good revs from array
         for node in goodrevs:
             ancestors[node] = None
-        for rev in xrange(len(changelog), -1, -1):
+        for rev in xrange(len(changelog), goodrev, -1):
             if ancestors[rev] is None:
                 for prev in clparents(rev):
                     ancestors[prev] = None