comparison tests/test-revset.t @ 37350:e32dfff71529

revset: use revsymbol() for checking if a symbol is valid Differential Revision: https://phab.mercurial-scm.org/D3078
author Martin von Zweigbergk <martinvonz@google.com>
date Sun, 01 Apr 2018 22:48:32 -0700
parents 2a258985ffeb
children f83cb91b052e
comparison
equal deleted inserted replaced
37349:36b2a304216c 37350:e32dfff71529
52 > def debugrevlistspec(ui, repo, fmt, *args, **opts): 52 > def debugrevlistspec(ui, repo, fmt, *args, **opts):
53 > if opts['bin']: 53 > if opts['bin']:
54 > args = map(nodemod.bin, args) 54 > args = map(nodemod.bin, args)
55 > expr = revsetlang.formatspec(fmt, list(args)) 55 > expr = revsetlang.formatspec(fmt, list(args))
56 > if ui.verbose: 56 > if ui.verbose:
57 > tree = revsetlang.parse(expr, lookup=repo.__contains__) 57 > tree = revsetlang.parse(expr, lookup=revset.lookupfn(repo))
58 > ui.note(revsetlang.prettyformat(tree), b"\n") 58 > ui.note(revsetlang.prettyformat(tree), b"\n")
59 > if opts["optimize"]: 59 > if opts["optimize"]:
60 > opttree = revsetlang.optimize(revsetlang.analyze(tree)) 60 > opttree = revsetlang.optimize(revsetlang.analyze(tree))
61 > ui.note(b"* optimized:\n", revsetlang.prettyformat(opttree), 61 > ui.note(b"* optimized:\n", revsetlang.prettyformat(opttree),
62 > b"\n") 62 > b"\n")