revset: unindent codes in _getalias() function
authorYuya Nishihara <yuya@tcha.org>
Mon, 29 Feb 2016 22:10:48 +0900
changeset 28894 0f59674dc9ff
parent 28893 ee11167fe1da
child 28895 4bf9ed7a260e
revset: unindent codes in _getalias() function We generally do return early if tree isn't a tuple.
mercurial/revset.py
--- a/mercurial/revset.py	Mon Feb 29 19:24:15 2016 +0900
+++ b/mercurial/revset.py	Mon Feb 29 22:10:48 2016 +0900
@@ -2260,18 +2260,18 @@
     """If tree looks like an unexpanded alias, return it. Return None
     otherwise.
     """
-    if isinstance(tree, tuple):
-        if tree[0] == 'symbol':
-            name = tree[1]
-            alias = aliases.get(name)
-            if alias and alias.args is None and alias.tree == tree:
-                return alias
-        if tree[0] == 'func':
-            if tree[1][0] == 'symbol':
-                name = tree[1][1]
-                alias = aliases.get(name)
-                if alias and alias.args is not None and alias.tree == tree[:2]:
-                    return alias
+    if not isinstance(tree, tuple):
+        return None
+    if tree[0] == 'symbol':
+        name = tree[1]
+        alias = aliases.get(name)
+        if alias and alias.args is None and alias.tree == tree:
+            return alias
+    if tree[0] == 'func' and tree[1][0] == 'symbol':
+        name = tree[1][1]
+        alias = aliases.get(name)
+        if alias and alias.args is not None and alias.tree == tree[:2]:
+            return alias
     return None
 
 def _expandargs(tree, args):