templatekw: keep status tuple in cache dict and rename cache key accordingly
authorYuya Nishihara <yuya@tcha.org>
Sun, 29 Jul 2018 22:07:42 +0900
changeset 39598 42209f55c599
parent 39597 164827563426
child 39599 a5da906306c9
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.
mercurial/templatekw.py
--- 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)