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

login
register
mail settings
Submitter Yuya Nishihara
Date Oct. 3, 2018, 2:09 p.m.
Message ID <79f940d8a9daa1ad391d.1538575740@mimosa>
Download mbox | patch
Permalink /patch/35359/
State New
Headers show

Comments

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

Patch

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)