Show More
@@ -2918,7 +2918,7 b' def debugrevspec(ui, repo, expr, **opts)' | |||
|
2918 | 2918 | expansion. |
|
2919 | 2919 | """ |
|
2920 | 2920 | if ui.verbose: |
|
2921 |
tree = revset.parse(expr) |
|
|
2921 | tree = revset.parse(expr) | |
|
2922 | 2922 | ui.note(revset.prettyformat(tree), "\n") |
|
2923 | 2923 | newtree = revset.findaliases(ui, tree) |
|
2924 | 2924 | if newtree != tree: |
@@ -223,7 +223,7 b' def _search(web, req, tmpl):' | |||
|
223 | 223 | |
|
224 | 224 | revdef = 'reverse(%s)' % query |
|
225 | 225 | try: |
|
226 |
tree |
|
|
226 | tree = revset.parse(revdef) | |
|
227 | 227 | except ParseError: |
|
228 | 228 | # can't parse to a revset tree |
|
229 | 229 | return MODE_KEYWORD, query |
@@ -2509,7 +2509,10 b' def foldconcat(tree):' | |||
|
2509 | 2509 | |
|
2510 | 2510 | def parse(spec, lookup=None): |
|
2511 | 2511 | p = parser.parser(tokenize, elements) |
|
2512 |
|
|
|
2512 | tree, pos = p.parse(spec, lookup=lookup) | |
|
2513 | if pos != len(spec): | |
|
2514 | raise error.ParseError(_("invalid token"), pos) | |
|
2515 | return tree | |
|
2513 | 2516 | |
|
2514 | 2517 | def posttreebuilthook(tree, repo): |
|
2515 | 2518 | # hook for extensions to execute code on the optimized tree |
@@ -2521,9 +2524,7 b' def match(ui, spec, repo=None):' | |||
|
2521 | 2524 | lookup = None |
|
2522 | 2525 | if repo: |
|
2523 | 2526 | lookup = repo.__contains__ |
|
2524 |
tree |
|
|
2525 | if (pos != len(spec)): | |
|
2526 | raise error.ParseError(_("invalid token"), pos) | |
|
2527 | tree = parse(spec, lookup) | |
|
2527 | 2528 | if ui: |
|
2528 | 2529 | tree = findaliases(ui, tree, showwarning=ui.warn) |
|
2529 | 2530 | tree = foldconcat(tree) |
General Comments 0
You need to be logged in to leave comments.
Login now