equal
deleted
inserted
replaced
268 "modified files: +added/-removed lines" |
268 "modified files: +added/-removed lines" |
269 """ |
269 """ |
270 ui = context.resource(mapping, b'ui') |
270 ui = context.resource(mapping, b'ui') |
271 ctx = context.resource(mapping, b'ctx') |
271 ctx = context.resource(mapping, b'ctx') |
272 diffopts = diffutil.diffallopts(ui, {b'noprefix': False}) |
272 diffopts = diffutil.diffallopts(ui, {b'noprefix': False}) |
273 diff = ctx.diff(opts=diffopts) |
273 diff = ctx.diff(diffutil.diff_parent(ctx), opts=diffopts) |
274 stats = patch.diffstatdata(util.iterlines(diff)) |
274 stats = patch.diffstatdata(util.iterlines(diff)) |
275 maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats) |
275 maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats) |
276 return b'%d: +%d/-%d' % (len(stats), adds, removes) |
276 return b'%d: +%d/-%d' % (len(stats), adds, removes) |
277 |
277 |
278 |
278 |