diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt index b8f9cdca88077e97d4869320b9d18481fbe252ef_bWVyY3VyaWFsL2hlbHAvY29uZmlnLnR4dA==..a12d13eac5131c9aa33fbb5106daf8049624d261_bWVyY3VyaWFsL2hlbHAvY29uZmlnLnR4dA== 100644 --- a/mercurial/help/config.txt +++ b/mercurial/help/config.txt @@ -1615,6 +1615,12 @@ Alias definitions for templates. See :hg:`help templates` for details. +``templates`` +------------- + +Use the ``[templates]`` section to define template strings. +See :hg:`help templates` for details. + ``trusted`` ----------- diff --git a/mercurial/help/templates.txt b/mercurial/help/templates.txt index b8f9cdca88077e97d4869320b9d18481fbe252ef_bWVyY3VyaWFsL2hlbHAvdGVtcGxhdGVzLnR4dA==..a12d13eac5131c9aa33fbb5106daf8049624d261_bWVyY3VyaWFsL2hlbHAvdGVtcGxhdGVzLnR4dA== 100644 --- a/mercurial/help/templates.txt +++ b/mercurial/help/templates.txt @@ -71,6 +71,20 @@ defines two symbol aliases, ``r`` and ``rn``, and a function alias ``leftpad()``. +It's also possible to specify complete template strings, using the +``templates`` section. The syntax used is the general template string syntax. + +For example, + +:: + + [templates] + nodedate = "{node|short}: {date(date, "%Y-%m-%d")}\n" + +defines a template, ``nodedate``, which can be called like:: + + $ hg log -r . -Tnodedate + Some sample command line templates: - Format lists, e.g. files::