Show More
@@ -293,15 +293,14 b' def showextras(context, mapping):' | |||
|
293 | 293 | lambda k: '%s=%s' % (k, stringutil.escapestr(extras[k]))) |
|
294 | 294 | |
|
295 | 295 | def _showfilesbystat(context, mapping, name, index): |
|
296 | repo = context.resource(mapping, 'repo') | |
|
297 | 296 | ctx = context.resource(mapping, 'ctx') |
|
298 | 297 | revcache = context.resource(mapping, 'revcache') |
|
299 | 298 | if 'files' not in revcache: |
|
300 |
revcache['files'] = |
|
|
299 | revcache['files'] = ctx.p1().status(ctx)[:3] | |
|
301 | 300 | files = revcache['files'][index] |
|
302 | 301 | return compatlist(context, mapping, name, files, element='file') |
|
303 | 302 | |
|
304 |
@templatekeyword('file_adds', requires={' |
|
|
303 | @templatekeyword('file_adds', requires={'ctx', 'revcache'}) | |
|
305 | 304 | def showfileadds(context, mapping): |
|
306 | 305 | """List of strings. Files added by this changeset.""" |
|
307 | 306 | return _showfilesbystat(context, mapping, 'file_add', 1) |
@@ -345,12 +344,12 b' def showfilecopiesswitch(context, mappin' | |||
|
345 | 344 | key='name', value='source', fmt='%s (%s)', |
|
346 | 345 | plural='file_copies') |
|
347 | 346 | |
|
348 |
@templatekeyword('file_dels', requires={' |
|
|
347 | @templatekeyword('file_dels', requires={'ctx', 'revcache'}) | |
|
349 | 348 | def showfiledels(context, mapping): |
|
350 | 349 | """List of strings. Files removed by this changeset.""" |
|
351 | 350 | return _showfilesbystat(context, mapping, 'file_del', 2) |
|
352 | 351 | |
|
353 |
@templatekeyword('file_mods', requires={' |
|
|
352 | @templatekeyword('file_mods', requires={'ctx', 'revcache'}) | |
|
354 | 353 | def showfilemods(context, mapping): |
|
355 | 354 | """List of strings. Files modified by this changeset.""" |
|
356 | 355 | return _showfilesbystat(context, mapping, 'file_mod', 0) |
General Comments 0
You need to be logged in to leave comments.
Login now