# HG changeset patch # User Yuya Nishihara # Date 1456754295 -32400 # Node ID 8d398155bfda3a98e664af74096f0e405cc7dd09 # Parent c1f254138f44e64aac63b549f1f5763ae28c4a5a revset: rename findaliases() to expandaliases() This function returns a full tree of alias expansion applied, which sounds different from what "findaliases" would do. diff -r c1f254138f44 -r 8d398155bfda mercurial/commands.py --- a/mercurial/commands.py Tue Mar 29 16:30:59 2016 +0900 +++ b/mercurial/commands.py Mon Feb 29 22:58:15 2016 +0900 @@ -3508,7 +3508,7 @@ if ui.verbose: tree = revset.parse(expr, lookup=repo.__contains__) ui.note(revset.prettyformat(tree), "\n") - newtree = revset.findaliases(ui, tree) + newtree = revset.expandaliases(ui, tree) if newtree != tree: ui.note("* expanded:\n", revset.prettyformat(newtree), "\n") tree = newtree diff -r c1f254138f44 -r 8d398155bfda mercurial/parser.py --- a/mercurial/parser.py Tue Mar 29 16:30:59 2016 +0900 +++ b/mercurial/parser.py Mon Feb 29 22:58:15 2016 +0900 @@ -239,7 +239,8 @@ self.error = err self.replacement = replacement # whether own `error` information is already shown or not. - # this avoids showing same warning multiple times at each `findaliases`. + # this avoids showing same warning multiple times at each + # `expandaliases`. self.warned = False class basealiasrules(object): diff -r c1f254138f44 -r 8d398155bfda mercurial/revset.py --- a/mercurial/revset.py Tue Mar 29 16:30:59 2016 +0900 +++ b/mercurial/revset.py Mon Feb 29 22:58:15 2016 +0900 @@ -2256,7 +2256,7 @@ _parse = staticmethod(_parsealias) _getlist = staticmethod(getlist) -def findaliases(ui, tree, showwarning=None): +def expandaliases(ui, tree, showwarning=None): aliases = _aliasrules.buildmap(ui.configitems('revsetalias')) tree = _aliasrules.expand(aliases, tree) if showwarning: @@ -2328,7 +2328,7 @@ def _makematcher(ui, tree, repo): if ui: - tree = findaliases(ui, tree, showwarning=ui.warn) + tree = expandaliases(ui, tree, showwarning=ui.warn) tree = foldconcat(tree) weight, tree = optimize(tree, True) posttreebuilthook(tree, repo)