revset: unindent codes in _getalias() function
We generally do return early if tree isn't a tuple.
--- 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):