Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
7088:58b7b5ef6cd0 | 7089:c57b30f1bc15 |
---|---|
779 count = len(self) | 779 count = len(self) |
780 if not count: | 780 if not count: |
781 return [nullid] | 781 return [nullid] |
782 ishead = [1] * (count + 1) | 782 ishead = [1] * (count + 1) |
783 index = self.index | 783 index = self.index |
784 for r in self: | 784 for r in xrange(count): |
785 e = index[r] | 785 e = index[r] |
786 ishead[e[5]] = ishead[e[6]] = 0 | 786 ishead[e[5]] = ishead[e[6]] = 0 |
787 return [self.node(r) for r in self if ishead[r]] | 787 return [self.node(r) for r in xrange(count) if ishead[r]] |
788 | 788 |
789 if start is None: | 789 if start is None: |
790 start = nullid | 790 start = nullid |
791 if stop is None: | 791 if stop is None: |
792 stop = [] | 792 stop = [] |