# HG changeset patch # User Yuya Nishihara # Date 1459236659 -32400 # Node ID c1f254138f44e64aac63b549f1f5763ae28c4a5a # Parent 4c76a032ec7e4186549b68819e197db2498dfa90 parser: add short comment how aliases are expanded in phases diff -r 4c76a032ec7e -r c1f254138f44 mercurial/parser.py --- a/mercurial/parser.py Tue Mar 29 16:19:31 2016 +0900 +++ b/mercurial/parser.py Tue Mar 29 16:30:59 2016 +0900 @@ -518,6 +518,7 @@ raise error.ParseError(_('infinite expansion of %(section)s ' '"%(name)s" detected') % {'section': cls._section, 'name': a.name}) + # get cacheable replacement tree by expanding aliases recursively expanding.append(a) if a.name not in cache: cache[a.name] = cls._expand(aliases, a.replacement, expanding, @@ -526,6 +527,7 @@ expanding.pop() if a.args is None: return result + # substitute function arguments in replacement tree l = cls._getlist(tree[2]) if len(l) != len(a.args): raise error.ParseError(_('invalid number of arguments: %d')