changeset 20781:8ecfa225bd16

revrange: pass repo to revset parser This allows handling of hyphenated symbols for command-line revsets.
author Matt Mackall <mpm@selenic.com>
date Tue, 18 Mar 2014 17:56:27 -0500
parents 403f1f73d30f
children 13fcb9ca9ccc
files mercurial/scmutil.py tests/test-revset.t
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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'