[PATCH 1 of 6] help: document about "annotate" template keywords

Yuya Nishihara yuya at tcha.org
Wed Oct 3 14:09:00 UTC 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1538573265 -32400
#      Wed Oct 03 22:27:45 2018 +0900
# Node ID 79f940d8a9daa1ad391d5bc9cc1c19be37e6a484
# Parent  6962ebc8f817c2df412d1ab4070088909d32fa05
help: document about "annotate" template keywords

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -288,6 +288,25 @@ def annotate(ui, repo, *pats, **opts):
     anyway, although the results will probably be neither useful
     nor desirable.
 
+    .. container:: verbose
+
+      Template:
+
+      The following keywords are supported in addition to the common template
+      keywords and functions. See also :hg:`help templates`.
+
+      :lines:   List of lines with annotation data.
+      :path:    String. Repository-absolute path of the specified file.
+
+      And each entry of ``{lines}`` provides the following sub-keywords in
+      addition to ``{date}``, ``{node}``, ``{rev}``, ``{user}``, etc.
+
+      :line:    String. Line content.
+      :lineno:  Integer. Line number at that revision.
+      :path:    String. Repository-absolute path of the file at that revision.
+
+      See :hg:`help templates.operators` for the list expansion syntax.
+
     Returns 0 on success.
     """
     opts = pycompat.byteskwargs(opts)


More information about the Mercurial-devel mailing list