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.
--- 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)