changeset 40714:7c25d2233d53

annotate: format local tables in less-dense form I'll move these to a class, where one-extra indent will be needed.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 24 Nov 2018 18:36:44 +0900
parents cfaf3843491b
children e7d6a9082bdf
files mercurial/commands.py
diffstat 1 files changed, 14 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Nov 22 18:14:21 2018 +0300
+++ b/mercurial/commands.py	Sat Nov 24 18:36:44 2018 +0900
@@ -358,15 +358,20 @@
         formatrev = b'%d'.__mod__
         formathex = shorthex
 
-    opmap = [('user', ' ', lambda x: x.fctx.user(), ui.shortuser),
-             ('rev', ' ', lambda x: scmutil.intrev(x.fctx), formatrev),
-             ('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),
-             ('lineno', ':', lambda x: x.lineno, pycompat.bytestr),
-            ]
-    opnamemap = {'rev': 'number', 'node': 'changeset', 'path': 'file',
-                 'lineno': 'line_number'}
+    opmap = [
+        ('user', ' ', lambda x: x.fctx.user(), ui.shortuser),
+        ('rev', ' ', lambda x: scmutil.intrev(x.fctx), formatrev),
+        ('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),
+        ('lineno', ':', lambda x: x.lineno, pycompat.bytestr),
+    ]
+    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')):