mercurial/templatekw.py
changeset 38587 b62000a28812
parent 38583 4bc96c755c17
child 38588 1c93e0237a24
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