##// END OF EJS Templates
revset: rename findaliases() to expandaliases()...
Yuya Nishihara -
r28898:8d398155 default
parent child Browse files
Show More
@@ -3508,7 +3508,7 b' def debugrevspec(ui, repo, expr, **opts)'
3508 if ui.verbose:
3508 if ui.verbose:
3509 tree = revset.parse(expr, lookup=repo.__contains__)
3509 tree = revset.parse(expr, lookup=repo.__contains__)
3510 ui.note(revset.prettyformat(tree), "\n")
3510 ui.note(revset.prettyformat(tree), "\n")
3511 newtree = revset.findaliases(ui, tree)
3511 newtree = revset.expandaliases(ui, tree)
3512 if newtree != tree:
3512 if newtree != tree:
3513 ui.note("* expanded:\n", revset.prettyformat(newtree), "\n")
3513 ui.note("* expanded:\n", revset.prettyformat(newtree), "\n")
3514 tree = newtree
3514 tree = newtree
@@ -239,7 +239,8 b' class alias(object):'
239 self.error = err
239 self.error = err
240 self.replacement = replacement
240 self.replacement = replacement
241 # whether own `error` information is already shown or not.
241 # whether own `error` information is already shown or not.
242 # this avoids showing same warning multiple times at each `findaliases`.
242 # this avoids showing same warning multiple times at each
243 # `expandaliases`.
243 self.warned = False
244 self.warned = False
244
245
245 class basealiasrules(object):
246 class basealiasrules(object):
@@ -2256,7 +2256,7 b' class _aliasrules(parser.basealiasrules)'
2256 _parse = staticmethod(_parsealias)
2256 _parse = staticmethod(_parsealias)
2257 _getlist = staticmethod(getlist)
2257 _getlist = staticmethod(getlist)
2258
2258
2259 def findaliases(ui, tree, showwarning=None):
2259 def expandaliases(ui, tree, showwarning=None):
2260 aliases = _aliasrules.buildmap(ui.configitems('revsetalias'))
2260 aliases = _aliasrules.buildmap(ui.configitems('revsetalias'))
2261 tree = _aliasrules.expand(aliases, tree)
2261 tree = _aliasrules.expand(aliases, tree)
2262 if showwarning:
2262 if showwarning:
@@ -2328,7 +2328,7 b' def matchany(ui, specs, repo=None):'
2328
2328
2329 def _makematcher(ui, tree, repo):
2329 def _makematcher(ui, tree, repo):
2330 if ui:
2330 if ui:
2331 tree = findaliases(ui, tree, showwarning=ui.warn)
2331 tree = expandaliases(ui, tree, showwarning=ui.warn)
2332 tree = foldconcat(tree)
2332 tree = foldconcat(tree)
2333 weight, tree = optimize(tree, True)
2333 weight, tree = optimize(tree, True)
2334 posttreebuilthook(tree, repo)
2334 posttreebuilthook(tree, repo)
General Comments 0
You need to be logged in to leave comments. Login now