##// END OF EJS Templates
grep: add support for log-like template keywords and functions
Yuya Nishihara -
r38558:1e25782a default
parent child Browse files
Show More
@@ -2634,6 +2634,7 b' def grep(ui, repo, pattern, *pats, **opt'
2634 iter = [('', l) for l in states]
2634 iter = [('', l) for l in states]
2635 for change, l in iter:
2635 for change, l in iter:
2636 fm.startitem()
2636 fm.startitem()
2637 fm.context(ctx=ctx)
2637 fm.data(node=fm.hexfunc(scmutil.binnode(ctx)))
2638 fm.data(node=fm.hexfunc(scmutil.binnode(ctx)))
2638
2639
2639 cols = [
2640 cols = [
@@ -53,6 +53,11 b' simple templated'
53 port:4:vaportight
53 port:4:vaportight
54 port:4:import/export
54 port:4:import/export
55
55
56 $ hg grep port -T '{file}:{tags}:{texts}\n'
57 port:tip:export
58 port:tip:vaportight
59 port:tip:import/export
60
56 simple JSON (no "change" field)
61 simple JSON (no "change" field)
57
62
58 $ hg grep -Tjson port
63 $ hg grep -Tjson port
General Comments 0
You need to be logged in to leave comments. Login now