[PATCH 1 of 4 V2] revset: split post-parsing stage from match()

Yuya Nishihara yuya at tcha.org
Fri Aug 7 14:45:44 UTC 2015


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1438950676 -32400
#      Fri Aug 07 21:31:16 2015 +0900
# Node ID 1eb76318ec555ffd3b465324988bf7880026241a
# Parent  b4a85ddadcb97ec8741720383e7490ac90a3be86
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.

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -2667,6 +2667,9 @@ def match(ui, spec, repo=None):
     if repo:
         lookup = repo.__contains__
     tree = parse(spec, lookup)
+    return _makematcher(ui, tree, repo)
+
+def _makematcher(ui, tree, repo):
     if ui:
         tree = findaliases(ui, tree, showwarning=ui.warn)
     tree = foldconcat(tree)


More information about the Mercurial-devel mailing list