Show More
@@ -258,13 +258,14 def showdescription(context, mapping): | |||
|
258 | 258 | else: |
|
259 | 259 | return s.strip() |
|
260 | 260 | |
|
261 | @templatekeyword('diffstat', requires={'ctx'}) | |
|
261 | @templatekeyword('diffstat', requires={'ui', 'ctx'}) | |
|
262 | 262 | def showdiffstat(context, mapping): |
|
263 | 263 | """String. Statistics of changes with the following format: |
|
264 | 264 | "modified files: +added/-removed lines" |
|
265 | 265 | """ |
|
266 | ui = context.resource(mapping, 'ui') | |
|
266 | 267 | ctx = context.resource(mapping, 'ctx') |
|
267 |
diffopts = diffutil.diffopts( |
|
|
268 | diffopts = diffutil.diffopts(ui, {'noprefix': False}) | |
|
268 | 269 | diff = ctx.diff(opts=diffopts) |
|
269 | 270 | stats = patch.diffstatdata(util.iterlines(diff)) |
|
270 | 271 | maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats) |
General Comments 0
You need to be logged in to leave comments.
Login now