diff mercurial/commands.py @ 39929:47cb6750dea3

annotate: rename {line_number} to {lineno} (BC) I think {lineno} looks more like a common template keyword. It isn't called a {line} to avoid conflicts with the element name of {lines} and the {_|splitlines} filter. https://www.mercurial-scm.org/wiki/GenericTemplatingPlan#Dictionary
author Yuya Nishihara <yuya@tcha.org>
date Sun, 30 Sep 2018 15:35:17 +0900
parents f07ab9ddc0c0
children 66df1059b7c0
line wrap: on
line diff
--- a/mercurial/commands.py	Sun Sep 30 15:15:27 2018 +0900
+++ b/mercurial/commands.py	Sun Sep 30 15:35:17 2018 +0900
@@ -342,9 +342,10 @@
              ('node', ' ', lambda x: hex(scmutil.binnode(x.fctx)), formathex),
              ('date', ' ', lambda x: x.fctx.date(), util.cachefunc(datefunc)),
              ('path', ' ', lambda x: x.fctx.path(), pycompat.bytestr),
-             ('line_number', ':', lambda x: x.lineno, pycompat.bytestr),
+             ('lineno', ':', lambda x: x.lineno, pycompat.bytestr),
             ]
-    opnamemap = {'rev': 'number', 'node': 'changeset', 'path': 'file'}
+    opnamemap = {'rev': 'number', 'node': 'changeset', 'path': 'file',
+                 'lineno': 'line_number'}
 
     if (not opts.get('user') and not opts.get('changeset')
         and not opts.get('date') and not opts.get('file')):