mercurial/templatekw.py
changeset 51186 9ff3d5395d6b
parent 49021 e6df205a876c
child 51858 460e80488cf0
equal deleted inserted replaced
51185:d6e5bec550f1 51186:9ff3d5395d6b
   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