Mercurial > public > mercurial-scm > hg
diff mercurial/hbisect.py @ 6750:fb42030d79d6
add __len__ and __iter__ methods to repo and revlog
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 26 Jun 2008 14:35:50 -0500 |
parents | b3602c98c686 |
children | f67d1468ac50 |
line wrap: on
line diff
--- a/mercurial/hbisect.py Thu Jun 26 14:35:50 2008 -0500 +++ b/mercurial/hbisect.py Thu Jun 26 14:35:50 2008 -0500 @@ -20,12 +20,12 @@ badrev = min([changelog.rev(n) for n in bad]) goodrevs = [changelog.rev(n) for n in good] # build ancestors array - ancestors = [[]] * (changelog.count() + 1) # an extra for [-1] + ancestors = [[]] * (len(changelog) + 1) # an extra for [-1] # clear good revs from array for node in goodrevs: ancestors[node] = None - for rev in xrange(changelog.count(), -1, -1): + for rev in xrange(len(changelog), -1, -1): if ancestors[rev] is None: for prev in clparents(rev): ancestors[prev] = None