Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 25926:996102be8b91
revset: split post-parsing stage from match()
_makematcher() will be reused by new matchany(ui, specs, repo=None) function
I'll add by the next patch.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 07 Aug 2015 21:31:16 +0900 |
parents | 5214cbdc37e5 |
children | 44da63623fca |
comparison
equal
deleted
inserted
replaced
25924:cfc24c22454e | 25926:996102be8b91 |
---|---|
2665 raise error.ParseError(_("empty query")) | 2665 raise error.ParseError(_("empty query")) |
2666 lookup = None | 2666 lookup = None |
2667 if repo: | 2667 if repo: |
2668 lookup = repo.__contains__ | 2668 lookup = repo.__contains__ |
2669 tree = parse(spec, lookup) | 2669 tree = parse(spec, lookup) |
2670 return _makematcher(ui, tree, repo) | |
2671 | |
2672 def _makematcher(ui, tree, repo): | |
2670 if ui: | 2673 if ui: |
2671 tree = findaliases(ui, tree, showwarning=ui.warn) | 2674 tree = findaliases(ui, tree, showwarning=ui.warn) |
2672 tree = foldconcat(tree) | 2675 tree = foldconcat(tree) |
2673 weight, tree = optimize(tree, True) | 2676 weight, tree = optimize(tree, True) |
2674 posttreebuilthook(tree, repo) | 2677 posttreebuilthook(tree, repo) |