mercurial/templatekw.py
changeset 36499 77f681f11003
parent 36456 9ff5cbfbc26a
child 36501 169ac2bb3c9c
equal deleted inserted replaced
36498:b546181ae451 36499:77f681f11003
   431     """String. Statistics of changes with the following format:
   431     """String. Statistics of changes with the following format:
   432     "modified files: +added/-removed lines"
   432     "modified files: +added/-removed lines"
   433     """
   433     """
   434     stats = patch.diffstatdata(util.iterlines(ctx.diff(noprefix=False)))
   434     stats = patch.diffstatdata(util.iterlines(ctx.diff(noprefix=False)))
   435     maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats)
   435     maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats)
   436     return '%s: +%s/-%s' % (len(stats), adds, removes)
   436     return '%d: +%d/-%d' % (len(stats), adds, removes)
   437 
   437 
   438 @templatekeyword('envvars')
   438 @templatekeyword('envvars')
   439 def showenvvars(ui, **args):
   439 def showenvvars(ui, **args):
   440     """A dictionary of environment variables. (EXPERIMENTAL)"""
   440     """A dictionary of environment variables. (EXPERIMENTAL)"""
   441     args = pycompat.byteskwargs(args)
   441     args = pycompat.byteskwargs(args)