Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 20364:a6cf48b2880d
revset: added baseset class (still empty) to improve revset performance
This class is going to be used to cache the set that is created from this list
in many cases while evaluating a revset.
author | Lucas Moscovicz <lmoscovicz@fb.com> |
---|---|
date | Tue, 21 Jan 2014 11:39:26 -0800 |
parents | 8567b4ea76ac |
children | c697b70f295f |
comparison
equal
deleted
inserted
replaced
20363:e3ee7ec85a15 | 20364:a6cf48b2880d |
---|---|
426 | 426 |
427 def revs(self, expr, *args): | 427 def revs(self, expr, *args): |
428 '''Return a list of revisions matching the given revset''' | 428 '''Return a list of revisions matching the given revset''' |
429 expr = revset.formatspec(expr, *args) | 429 expr = revset.formatspec(expr, *args) |
430 m = revset.match(None, expr) | 430 m = revset.match(None, expr) |
431 return [r for r in m(self, list(self))] | 431 return revset.baseset([r for r in m(self, revset.baseset(self))]) |
432 | 432 |
433 def set(self, expr, *args): | 433 def set(self, expr, *args): |
434 ''' | 434 ''' |
435 Yield a context for each matching revision, after doing arg | 435 Yield a context for each matching revision, after doing arg |
436 replacement via revset.formatspec | 436 replacement via revset.formatspec |