mercurial/templatekw.py
changeset 14437 cbe13e6bdc34
parent 14403 2c9f5897d4b7
child 15155 f4a8d754cd0a
equal deleted inserted replaced
14436:5adb52524779 14437:cbe13e6bdc34
   184 def showdiffstat(repo, ctx, templ, **args):
   184 def showdiffstat(repo, ctx, templ, **args):
   185     """:diffstat: String. Statistics of changes with the following format:
   185     """:diffstat: String. Statistics of changes with the following format:
   186     "modified files: +added/-removed lines"
   186     "modified files: +added/-removed lines"
   187     """
   187     """
   188     stats = patch.diffstatdata(util.iterlines(ctx.diff()))
   188     stats = patch.diffstatdata(util.iterlines(ctx.diff()))
   189     maxname, adds, removes, binary = patch.diffstatsum(stats)
   189     maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats)
   190     return '%s: +%s/-%s' % (len(stats), adds, removes)
   190     return '%s: +%s/-%s' % (len(stats), adds, removes)
   191 
   191 
   192 def showextras(**args):
   192 def showextras(**args):
   193     templ = args['templ']
   193     templ = args['templ']
   194     for key, value in sorted(args['ctx'].extra().items()):
   194     for key, value in sorted(args['ctx'].extra().items()):