Mercurial > public > mercurial-scm > hg
comparison mercurial/hbisect.py @ 14893:01e0091679c0
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).
author | Alexander Krauss <krauss@in.tum.de> |
---|---|
date | Sat, 16 Jul 2011 12:22:40 +0200 |
parents | e5a59d31bb04 |
children | 3db92e3948d5 |
comparison
equal
deleted
inserted
replaced
14891:62122c1c830b | 14893:01e0091679c0 |
---|---|
43 ancestors[rev] = [] | 43 ancestors[rev] = [] |
44 | 44 |
45 # clear good revs from array | 45 # clear good revs from array |
46 for node in goodrevs: | 46 for node in goodrevs: |
47 ancestors[node] = None | 47 ancestors[node] = None |
48 for rev in xrange(len(changelog), -1, -1): | 48 for rev in xrange(len(changelog), goodrev, -1): |
49 if ancestors[rev] is None: | 49 if ancestors[rev] is None: |
50 for prev in clparents(rev): | 50 for prev in clparents(rev): |
51 ancestors[prev] = None | 51 ancestors[prev] = None |
52 | 52 |
53 if ancestors[badrev] is None: | 53 if ancestors[badrev] is None: |