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).
This commit is contained in:
Alexander Krauss 2011-07-16 12:22:40 +02:00
parent 1a588dc828
commit e93d7080fd

View File

@ -45,7 +45,7 @@ def bisect(changelog, state):
# 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