comparison tests/test-revset.t @ 37674:f83cb91b052e

revset: pass in lookup function instead of repo (API) And document that it's only for legacy lookup. If we have a repo, we're likely to do more things where that shouldn't be done.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 14 Apr 2018 12:57:32 +0900
parents e32dfff71529
children 29eb4cafeeb8
comparison
equal deleted inserted replaced
37673:0c6b1ec75b73 37674:f83cb91b052e
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")
63 > func = revset.match(ui, expr, repo) 63 > func = revset.match(ui, expr, lookup=revset.lookupfn(repo))
64 > revs = func(repo) 64 > revs = func(repo)
65 > if ui.verbose: 65 > if ui.verbose:
66 > ui.note(b"* set:\n", smartset.prettyformat(revs), b"\n") 66 > ui.note(b"* set:\n", smartset.prettyformat(revs), b"\n")
67 > for c in revs: 67 > for c in revs:
68 > ui.write(b"%d\n" % c) 68 > ui.write(b"%d\n" % c)