##// END OF EJS Templates
help: add ifcontains, revset, and shortest to template help...
Durham Goode -
r20531:01a75c9d default
parent child Browse files
Show More
@@ -52,14 +52,20 b' In addition to filters, there are some b'
52
52
53 - if(expr, then[, else])
53 - if(expr, then[, else])
54
54
55 - ifcontains(expr, expr, then[, else])
56
55 - ifeq(expr, expr, then[, else])
57 - ifeq(expr, expr, then[, else])
56
58
57 - join(list, sep)
59 - join(list, sep)
58
60
59 - label(label, expr)
61 - label(label, expr)
60
62
63 - revset(query[, formatargs])
64
61 - rstdoc(text, style)
65 - rstdoc(text, style)
62
66
67 - shortest(node)
68
63 - strip(text[, chars])
69 - strip(text[, chars])
64
70
65 - sub(pat, repl, expr)
71 - sub(pat, repl, expr)
@@ -106,3 +112,11 b' Some sample command line templates:'
106 - Display the contents of the 'extra' field, one per line::
112 - Display the contents of the 'extra' field, one per line::
107
113
108 $ hg log -r 0 --template "{join(extras, '\n')}\n"
114 $ hg log -r 0 --template "{join(extras, '\n')}\n"
115
116 - Mark the current bookmark with '*'::
117
118 $ hg log --template "{bookmarks % '{bookmark}{ifeq(bookmark, current, \"*\")} '}\n"
119
120 - Mark the working copy parent with '@'::
121
122 $ hg log --template "{ifcontains(rev, revset('.'), '@')}\n"
General Comments 0
You need to be logged in to leave comments. Login now