# HG changeset patch # User Yuya Nishihara # Date 2016-02-29 13:58:15 # 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 --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3508,7 +3508,7 @@ def debugrevspec(ui, repo, expr, **opts) 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 --git a/mercurial/parser.py b/mercurial/parser.py --- a/mercurial/parser.py +++ b/mercurial/parser.py @@ -239,7 +239,8 @@ class alias(object): 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 --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2256,7 +2256,7 @@ class _aliasrules(parser.basealiasrules) _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 matchany(ui, specs, repo=None): 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)