help: apply the section headings from revsets to templates
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 08 Jan 2017 02:43:01 -0500
changeset 30730 107014f4848b
parent 30729 a4bc8fff67fc
child 30731 b8a188a6f191
help: apply the section headings from revsets to templates Unlike filesets, there are a few distinct headings that are not shared with revsets. But common names are used where possible.
mercurial/help/templates.txt
--- a/mercurial/help/templates.txt	Sun Jan 08 02:40:36 2017 -0500
+++ b/mercurial/help/templates.txt	Sun Jan 08 02:43:01 2017 -0500
@@ -16,6 +16,9 @@
     $ hg log -r1 --template "{node}\n"
     b56ce7b07c52de7d5fd79fb89701ea538af65746
 
+Keywords
+========
+
 Strings in curly braces are called keywords. The availability of
 keywords depends on the exact context of the templater. These
 keywords are usually available for templating a log-like command:
@@ -32,6 +35,9 @@
    $ hg tip --template "{date|isodate}\n"
    2008-08-21 18:22 +0000
 
+Filters
+=======
+
 List of filters:
 
 .. filtersmarker
@@ -39,10 +45,16 @@
 Note that a filter is nothing more than a function call, i.e.
 ``expr|filter`` is equivalent to ``filter(expr)``.
 
+Functions
+=========
+
 In addition to filters, there are some basic built-in functions:
 
 .. functionsmarker
 
+Infix
+=====
+
 We provide a limited set of infix arithmetic operations on integers::
 
   + for addition
@@ -60,6 +72,9 @@
 To prevent it from being interpreted, you can use an escape character ``\{``
 or a raw string prefix, ``r'...'``.
 
+Aliases
+=======
+
 New keywords and functions can be defined in the ``templatealias`` section of
 a Mercurial configuration file::
 
@@ -94,6 +109,9 @@
 
   $ hg log -r . -Tnodedate
 
+Examples
+========
+
 Some sample command line templates:
 
 - Format lists, e.g. files::