##// END OF EJS Templates
revset: remove showwarning option from expandaliases()...
Yuya Nishihara -
r29922:ae933e3e default
parent child Browse files
Show More
@@ -3525,8 +3525,7 b' def debugrevspec(ui, repo, expr, **opts)'
3525 3525 """
3526 3526 stages = [
3527 3527 ('parsed', lambda tree: tree),
3528 ('expanded',
3529 lambda tree: revset.expandaliases(ui, tree, showwarning=ui.warn)),
3528 ('expanded', lambda tree: revset.expandaliases(ui, tree)),
3530 3529 ('concatenated', revset.foldconcat),
3531 3530 ('analyzed', revset.analyze),
3532 3531 ('optimized', revset.optimize),
@@ -2556,15 +2556,14 b' class _aliasrules(parser.basealiasrules)'
2556 2556 if tree[0] == 'func' and tree[1][0] == 'symbol':
2557 2557 return tree[1][1], getlist(tree[2])
2558 2558
2559 def expandaliases(ui, tree, showwarning=None):
2559 def expandaliases(ui, tree):
2560 2560 aliases = _aliasrules.buildmap(ui.configitems('revsetalias'))
2561 2561 tree = _aliasrules.expand(aliases, tree)
2562 if showwarning:
2563 # warn about problematic (but not referred) aliases
2564 for name, alias in sorted(aliases.iteritems()):
2565 if alias.error and not alias.warned:
2566 showwarning(_('warning: %s\n') % (alias.error))
2567 alias.warned = True
2562 # warn about problematic (but not referred) aliases
2563 for name, alias in sorted(aliases.iteritems()):
2564 if alias.error and not alias.warned:
2565 ui.warn(_('warning: %s\n') % (alias.error))
2566 alias.warned = True
2568 2567 return tree
2569 2568
2570 2569 def foldconcat(tree):
@@ -2617,7 +2616,7 b' def matchany(ui, specs, repo=None):'
2617 2616 tree = ('or',) + tuple(parse(s, lookup) for s in specs)
2618 2617
2619 2618 if ui:
2620 tree = expandaliases(ui, tree, showwarning=ui.warn)
2619 tree = expandaliases(ui, tree)
2621 2620 tree = foldconcat(tree)
2622 2621 tree = analyze(tree)
2623 2622 tree = optimize(tree)
General Comments 0
You need to be logged in to leave comments. Login now