Mercurial > hg
comparison mercurial/help/templates.txt @ 20531:01a75c9d5b5e
help: add ifcontains, revset, and shortest to template help
Adds help information to the template help doc. Mentions ifcontains, revset,
shortest, and current in bookmarks.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 18 Feb 2014 14:48:56 -0800 |
parents | 574f3b6e0e8b |
children | cce404b0c918 |
comparison
equal
deleted
inserted
replaced
20528:1a9ebc83a74c | 20531:01a75c9d5b5e |
---|---|
50 | 50 |
51 - get(dict, key) | 51 - get(dict, key) |
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) |
66 | |
67 - shortest(node) | |
62 | 68 |
63 - strip(text[, chars]) | 69 - strip(text[, chars]) |
64 | 70 |
65 - sub(pat, repl, expr) | 71 - sub(pat, repl, expr) |
66 | 72 |
104 $ hg log -r 0 --template "{sub(r'^.*\n?\n?', '', desc)}\n" | 110 $ hg log -r 0 --template "{sub(r'^.*\n?\n?', '', desc)}\n" |
105 | 111 |
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" |