From patchwork Tue Feb 18 22:51:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: help: add ifcontains, revset, and shortest to template help From: Durham Goode X-Patchwork-Id: 3691 Message-Id: To: mercurial-devel@selenic.com Date: Tue, 18 Feb 2014 14:51:36 -0800 # HG changeset patch # User Durham Goode # Date 1392763736 28800 # Tue Feb 18 14:48:56 2014 -0800 # Node ID ce300c13d86c3bb329f8e3bfd3dc1010f9dc2b9a # Parent 0e2877f8605dcaf4fdf2ab7e0046f1f6f80161dd 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. diff --git a/mercurial/help/templates.txt b/mercurial/help/templates.txt --- a/mercurial/help/templates.txt +++ b/mercurial/help/templates.txt @@ -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"