changeset 39598:42209f55c599

templatekw: keep status tuple in cache dict and rename cache key accordingly There's no point to drop tail elements, which are mostly empty lists.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 29 Jul 2018 22:07:42 +0900
parents 164827563426
children a5da906306c9
files mercurial/templatekw.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templatekw.py	Sun Jul 29 21:39:12 2018 +0900
+++ b/mercurial/templatekw.py	Sun Jul 29 22:07:42 2018 +0900
@@ -294,9 +294,9 @@
 def _getfilestatus(context, mapping):
     ctx = context.resource(mapping, 'ctx')
     revcache = context.resource(mapping, 'revcache')
-    if 'files' not in revcache:
-        revcache['files'] = ctx.p1().status(ctx)[:3]
-    return revcache['files']
+    if 'filestatus' not in revcache:
+        revcache['filestatus'] = ctx.p1().status(ctx)
+    return revcache['filestatus']
 
 def _showfilesbystat(context, mapping, name, index):
     stat = _getfilestatus(context, mapping)