changeset 28894:0f59674dc9ff

revset: unindent codes in _getalias() function We generally do return early if tree isn't a tuple.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 29 Feb 2016 22:10:48 +0900
parents ee11167fe1da
children 4bf9ed7a260e
files mercurial/revset.py
diffstat 1 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- 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):