revset: rename findaliases() to expandaliases()
This function returns a full tree of alias expansion applied, which sounds
different from what "findaliases" would do.
--- 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
--- 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):
--- 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)