Mercurial > public > mercurial-scm > hg
diff mercurial/revset.py @ 28893:ee11167fe1da
parser: extract helper that creates a dict of aliases
This will be common between revset and templater.
The local variable 'alias' is renamed to 'a' to avoid shadowing the global
'alias' class.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 29 Feb 2016 19:24:15 +0900 |
parents | 0c135f37c6f8 |
children | 0f59674dc9ff |
line wrap: on
line diff
--- a/mercurial/revset.py Mon Feb 29 18:33:30 2016 +0900 +++ b/mercurial/revset.py Mon Feb 29 19:24:15 2016 +0900 @@ -2320,10 +2320,7 @@ return result def findaliases(ui, tree, showwarning=None): - aliases = {} - for k, v in ui.configitems('revsetalias'): - alias = _aliasrules.build(k, v) - aliases[alias.name] = alias + aliases = _aliasrules.buildmap(ui.configitems('revsetalias')) tree = _expandaliases(aliases, tree, [], {}) if showwarning: # warn about problematic (but not referred) aliases