Mercurial > hg
comparison mercurial/scmutil.py @ 17037:419966126a05
scmutil: speed up new-style range extension
This improves perfrevset performance by 10% for 2222::33333 on a
kernel repo.
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Fri, 22 Jun 2012 12:00:41 -0700 |
parents | 21e18c608b68 |
children | 5a9acb0b2086 |
comparison
equal
deleted
inserted
replaced
17036:ab4644c3064f | 17037:419966126a05 |
---|---|
582 except error.RepoLookupError: | 582 except error.RepoLookupError: |
583 pass | 583 pass |
584 | 584 |
585 # fall through to new-style queries if old-style fails | 585 # fall through to new-style queries if old-style fails |
586 m = revset.match(repo.ui, spec) | 586 m = revset.match(repo.ui, spec) |
587 for r in m(repo, range(len(repo))): | 587 dl = [r for r in m(repo, xrange(len(repo))) if r not in seen] |
588 if r not in seen: | 588 l.extend(dl) |
589 l.append(r) | 589 seen.update(dl) |
590 seen.update(l) | |
591 | 590 |
592 return l | 591 return l |
593 | 592 |
594 def expandpats(pats): | 593 def expandpats(pats): |
595 if not util.expandglobs: | 594 if not util.expandglobs: |