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