changeset 40311:4aa04d009167

revset: drop special case of 'revset(...)' function in analyze We now have a valid no-op function. We no longer need the special case.
author Boris Feld <boris.feld@octobus.net>
date Thu, 11 Oct 2018 03:15:04 +0200
parents d894d2372ffe
children 5644f7c8982e
files mercurial/revsetlang.py tests/test-revset.t
diffstat 2 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revsetlang.py	Thu Oct 11 03:13:53 2018 +0200
+++ b/mercurial/revsetlang.py	Thu Oct 11 03:15:04 2018 +0200
@@ -355,9 +355,6 @@
     elif op == 'keyvalue':
         return (op, x[1], _analyze(x[2]))
     elif op == 'func':
-        f = getsymbol(x[1])
-        if f == 'revset':
-            return _analyze(x[2])
         return (op, x[1], _analyze(x[2]))
     raise ValueError('invalid operator %r' % op)
 
--- a/tests/test-revset.t	Thu Oct 11 03:13:53 2018 +0200
+++ b/tests/test-revset.t	Thu Oct 11 03:15:04 2018 +0200
@@ -2926,16 +2926,20 @@
         (symbol '0'))))
   * analyzed:
   (func
-    (symbol 'first')
+    (symbol 'revset')
     (func
-      (symbol 'rev')
-      (symbol '0')))
+      (symbol 'first')
+      (func
+        (symbol 'rev')
+        (symbol '0'))))
   * optimized:
   (func
-    (symbol 'first')
+    (symbol 'revset')
     (func
-      (symbol 'rev')
-      (symbol '0')))
+      (symbol 'first')
+      (func
+        (symbol 'rev')
+        (symbol '0'))))
   * set:
   <baseset+ [0]>
   0