Skip to content
Snippets Groups Projects
Commit a5da906306c9 authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

templatekw: add option to include ignored/clean/unknown files in cache

They will be necessary to provide {status} of files.
parent 42209f55c599
No related branches found
No related tags found
No related merge requests found
......@@ -291,6 +291,6 @@
return _hybrid(f, extras, makemap,
lambda k: '%s=%s' % (k, stringutil.escapestr(extras[k])))
def _getfilestatus(context, mapping):
def _getfilestatus(context, mapping, listall=False):
ctx = context.resource(mapping, 'ctx')
revcache = context.resource(mapping, 'revcache')
......@@ -295,7 +295,10 @@
ctx = context.resource(mapping, 'ctx')
revcache = context.resource(mapping, 'revcache')
if 'filestatus' not in revcache:
revcache['filestatus'] = ctx.p1().status(ctx)
if 'filestatus' not in revcache or revcache['filestatusall'] < listall:
stat = ctx.p1().status(ctx, listignored=listall, listclean=listall,
listunknown=listall)
revcache['filestatus'] = stat
revcache['filestatusall'] = listall
return revcache['filestatus']
def _showfilesbystat(context, mapping, name, index):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment