Show More
@@ -670,9 +670,7 b' def diffsummary(statgen):' | |||||
670 | return _(' %d files changed, %d insertions(+), %d deletions(-)\n') % ( |
|
670 | return _(' %d files changed, %d insertions(+), %d deletions(-)\n') % ( | |
671 | len(stats), addtotal, removetotal) |
|
671 | len(stats), addtotal, removetotal) | |
672 |
|
672 | |||
673 | def diffstat(tmpl, ctx, statgen, parity): |
|
673 | def _diffstattmplgen(context, tmpl, ctx, statgen, parity): | |
674 | '''Return a diffstat template for each file in the diff.''' |
|
|||
675 |
|
||||
676 | stats, maxname, maxtotal, addtotal, removetotal, binary = next(statgen) |
|
674 | stats, maxname, maxtotal, addtotal, removetotal, binary = next(statgen) | |
677 | files = ctx.files() |
|
675 | files = ctx.files() | |
678 |
|
676 | |||
@@ -696,6 +694,11 b' def diffstat(tmpl, ctx, statgen, parity)' | |||||
696 | 'parity': next(parity), |
|
694 | 'parity': next(parity), | |
697 | }) |
|
695 | }) | |
698 |
|
696 | |||
|
697 | def diffstat(tmpl, ctx, statgen, parity): | |||
|
698 | '''Return a diffstat template for each file in the diff.''' | |||
|
699 | args = (tmpl, ctx, statgen, parity) | |||
|
700 | return templateutil.mappedgenerator(_diffstattmplgen, args=args) | |||
|
701 | ||||
699 | class sessionvars(templateutil.wrapped): |
|
702 | class sessionvars(templateutil.wrapped): | |
700 | def __init__(self, vars, start='?'): |
|
703 | def __init__(self, vars, start='?'): | |
701 | self._start = start |
|
704 | self._start = start |
General Comments 0
You need to be logged in to leave comments.
Login now