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