comparison mercurial/templatekw.py @ 38587:b62000a28812

diffutil: remove diffopts() in favor of diffallopts() patch.diffopts() exists only for backward compatibility. We don't need it in new module.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 06 Jul 2018 21:41:36 +0900
parents 4bc96c755c17
children 1c93e0237a24
comparison
equal deleted inserted replaced
38586:79d7d715f3d0 38587:b62000a28812
263 """String. Statistics of changes with the following format: 263 """String. Statistics of changes with the following format:
264 "modified files: +added/-removed lines" 264 "modified files: +added/-removed lines"
265 """ 265 """
266 ui = context.resource(mapping, 'ui') 266 ui = context.resource(mapping, 'ui')
267 ctx = context.resource(mapping, 'ctx') 267 ctx = context.resource(mapping, 'ctx')
268 diffopts = diffutil.diffopts(ui, {'noprefix': False}) 268 diffopts = diffutil.diffallopts(ui, {'noprefix': False})
269 diff = ctx.diff(opts=diffopts) 269 diff = ctx.diff(opts=diffopts)
270 stats = patch.diffstatdata(util.iterlines(diff)) 270 stats = patch.diffstatdata(util.iterlines(diff))
271 maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats) 271 maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats)
272 return '%d: +%d/-%d' % (len(stats), adds, removes) 272 return '%d: +%d/-%d' % (len(stats), adds, removes)
273 273