mercurial/revset.py
changeset 37674 f83cb91b052e
parent 37673 0c6b1ec75b73
child 37854 edb28a6d95b7
child 37866 37e7ae332e90
--- a/mercurial/revset.py	Sat Apr 14 12:44:40 2018 +0900
+++ b/mercurial/revset.py	Sat Apr 14 12:57:32 2018 +0900
@@ -2169,14 +2169,17 @@
 def lookupfn(repo):
     return lambda symbol: scmutil.isrevsymbol(repo, symbol)
 
-def match(ui, spec, repo=None):
+def match(ui, spec, lookup=None):
     """Create a matcher for a single revision spec"""
-    return matchany(ui, [spec], repo=repo)
+    return matchany(ui, [spec], lookup=None)
 
-def matchany(ui, specs, repo=None, localalias=None):
+def matchany(ui, specs, lookup=None, localalias=None):
     """Create a matcher that will include any revisions matching one of the
     given specs
 
+    If lookup function is not None, the parser will first attempt to handle
+    old-style ranges, which may contain operator characters.
+
     If localalias is not None, it is a dict {name: definitionstring}. It takes
     precedence over [revsetalias] config section.
     """
@@ -2186,9 +2189,6 @@
         return mfunc
     if not all(specs):
         raise error.ParseError(_("empty query"))
-    lookup = None
-    if repo:
-        lookup = lookupfn(repo)
     if len(specs) == 1:
         tree = revsetlang.parse(specs[0], lookup)
     else: