diff mercurial/commands.py @ 31044:0b8356705de6

revset: split language services to revsetlang module (API) New revsetlang module hosts parser, tokenizer, and miscellaneous functions working on parsed tree. It does not include functions for evaluation such as getset() and match(). 2288 mercurial/revset.py 684 mercurial/revsetlang.py 2972 total get*() functions are aliased since they are common in revset.py.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 19 Feb 2017 18:19:33 +0900
parents 705ecab649ea
children 3c22ad83868b
line wrap: on
line diff
--- a/mercurial/commands.py	Sun Feb 19 18:16:09 2017 +0900
+++ b/mercurial/commands.py	Sun Feb 19 18:19:33 2017 +0900
@@ -44,7 +44,7 @@
     patch,
     phases,
     pycompat,
-    revset,
+    revsetlang,
     scmutil,
     server,
     sshserver,
@@ -3414,7 +3414,7 @@
 
     """
     if opts.get('follow') and opts.get('rev'):
-        opts['rev'] = [revset.formatspec('reverse(::%lr)', opts.get('rev'))]
+        opts['rev'] = [revsetlang.formatspec('reverse(::%lr)', opts.get('rev'))]
         del opts['follow']
 
     if opts.get('graph'):
@@ -4093,7 +4093,7 @@
     elif path.pushrev:
         # It doesn't make any sense to specify ancestor revisions. So limit
         # to DAG heads to make discovery simpler.
-        expr = revset.formatspec('heads(%r)', path.pushrev)
+        expr = revsetlang.formatspec('heads(%r)', path.pushrev)
         revs = scmutil.revrange(repo, [expr])
         revs = [repo[rev].node() for rev in revs]
         if not revs: