# HG changeset patch # User Yuya Nishihara # Date 2018-07-29 13:07:42 # Node ID 42209f55c59965c8026f552758c1e18961d9754a # Parent 164827563426d1de6cb5d81f7d97f64d6cd1d8ce 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. diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -294,9 +294,9 @@ def showextras(context, mapping): 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)