--- a/mercurial/help/templates.txt Thu Jul 03 23:01:37 2014 -0500
+++ b/mercurial/help/templates.txt Thu Jun 12 18:02:23 2014 -0700
@@ -72,6 +72,8 @@
- sub(pat, repl, expr)
+- word(number, text[, separator])
+
Also, for any expression that returns a list, there is a list operator:
- expr % "{template}"
@@ -130,3 +132,7 @@
- Show only commit descriptions that start with "template"::
$ hg log --template "{startswith(\"template\", firstline(desc))}\n"
+
+- Print the first word of each line of a commit message::
+
+ $ hg log --template "{word(\"0\", desc)}\n"