Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revlog.py @ 7089:c57b30f1bc15
revlog: fix heads performance regression
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 12 Oct 2008 15:21:08 -0500 |
parents | efc579fdaf69 |
children | 528b7fc1216c |
line wrap: on
line diff
--- a/mercurial/revlog.py Sun Oct 12 15:21:08 2008 -0500 +++ b/mercurial/revlog.py Sun Oct 12 15:21:08 2008 -0500 @@ -781,10 +781,10 @@ return [nullid] ishead = [1] * (count + 1) index = self.index - for r in self: + for r in xrange(count): e = index[r] ishead[e[5]] = ishead[e[6]] = 0 - return [self.node(r) for r in self if ishead[r]] + return [self.node(r) for r in xrange(count) if ishead[r]] if start is None: start = nullid