revset: make _parsealiasdecl() simply return the original parsed tree
authorYuya Nishihara <yuya@tcha.org>
Mon, 29 Feb 2016 17:46:06 +0900
changeset 28708 ab06b5ef93f7
parent 28707 af5f90f23515
child 28709 94494031f659
revset: make _parsealiasdecl() simply return the original parsed tree It wasn't necessary to reconstruct the same tuple.
mercurial/revset.py
--- a/mercurial/revset.py	Mon Feb 29 16:35:58 2016 +0900
+++ b/mercurial/revset.py	Mon Feb 29 17:46:06 2016 +0900
@@ -2293,7 +2293,7 @@
             name = tree[1]
             if name.startswith('$'):
                 return (decl, None, None, _("'$' not for alias arguments"))
-            return (name, ('symbol', name), None, None)
+            return (name, tree, None, None)
 
         if tree[0] == 'func' and tree[1][0] == 'symbol':
             # "name(arg, ....) = ...." style
@@ -2308,7 +2308,7 @@
             if len(args) != len(set(args)):
                 return (name, None, None,
                         _("argument names collide with each other"))
-            return (name, ('func', ('symbol', name)), args, None)
+            return (name, tree[:2], args, None)
 
         return (decl, None, None, _("invalid format"))
     except error.ParseError as inst: