revset: drop special case of 'revset(...)' function in analyze
We now have a valid no-op function. We no longer need the special case.
--- 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