revrange: pass repo to revset parser
authorMatt Mackall <mpm@selenic.com>
Tue, 18 Mar 2014 17:56:27 -0500
changeset 20781 8ecfa225bd16
parent 20780 403f1f73d30f
child 20782 13fcb9ca9ccc
revrange: pass repo to revset parser This allows handling of hyphenated symbols for command-line revsets.
mercurial/scmutil.py
tests/test-revset.t
--- a/mercurial/scmutil.py	Tue Mar 18 17:54:42 2014 -0500
+++ b/mercurial/scmutil.py	Tue Mar 18 17:56:27 2014 -0500
@@ -533,7 +533,7 @@
             pass
 
         # fall through to new-style queries if old-style fails
-        m = revset.match(repo.ui, spec)
+        m = revset.match(repo.ui, spec, repo)
         if seen or l:
             dl = [r for r in m(repo, revset.spanset(repo)) if r not in seen]
             l = l + dl
--- a/tests/test-revset.t	Tue Mar 18 17:54:42 2014 -0500
+++ b/tests/test-revset.t	Tue Mar 18 17:56:27 2014 -0500
@@ -124,6 +124,7 @@
   [255]
   $ log -a-b-c- # succeeds with fallback
   4
+
   $ try -- -a-b-c--a # complains
   (minus
     (minus
@@ -140,6 +141,13 @@
   ('symbol', '\xc3\xa9')
   9
 
+no quoting needed
+
+  $ log ::a-b-c-
+  0
+  1
+  2
+
 quoting needed
 
   $ try '"-a-b-c-"-a'