changeset 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 1a9ebc83a74c
children f1a3ae7c15df
files mercurial/help/templates.txt
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/help/templates.txt	Thu Oct 17 13:27:17 2013 +0900
+++ b/mercurial/help/templates.txt	Tue Feb 18 14:48:56 2014 -0800
@@ -52,14 +52,20 @@
 
 - if(expr, then[, else])
 
+- ifcontains(expr, expr, then[, else])
+
 - ifeq(expr, expr, then[, else])
 
 - join(list, sep)
 
 - label(label, expr)
 
+- revset(query[, formatargs])
+
 - rstdoc(text, style)
 
+- shortest(node)
+
 - strip(text[, chars])
 
 - sub(pat, repl, expr)
@@ -106,3 +112,11 @@
 - Display the contents of the 'extra' field, one per line::
 
    $ hg log -r 0 --template "{join(extras, '\n')}\n"
+
+- Mark the current bookmark with '*'::
+
+   $ hg log --template "{bookmarks % '{bookmark}{ifeq(bookmark, current, \"*\")} '}\n"
+
+- Mark the working copy parent with '@'::
+
+   $ hg log --template "{ifcontains(rev, revset('.'), '@')}\n"