comparison mercurial/scmutil.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 88d8e568add1
children d4f804caa0ed
comparison
equal deleted inserted replaced
20363:e3ee7ec85a15 20364:a6cf48b2880d
522 except error.RepoLookupError: 522 except error.RepoLookupError:
523 pass 523 pass
524 524
525 # fall through to new-style queries if old-style fails 525 # fall through to new-style queries if old-style fails
526 m = revset.match(repo.ui, spec) 526 m = revset.match(repo.ui, spec)
527 dl = [r for r in m(repo, list(repo)) if r not in seen] 527 dl = [r for r in m(repo, revset.baseset(repo)) if r not in seen]
528 l.extend(dl) 528 l.extend(dl)
529 seen.update(dl) 529 seen.update(dl)
530 530
531 return l 531 return revset.baseset(l)
532 532
533 def expandpats(pats): 533 def expandpats(pats):
534 if not util.expandglobs: 534 if not util.expandglobs:
535 return list(pats) 535 return list(pats)
536 ret = [] 536 ret = []