##// END OF EJS Templates
templatekw: use diffstatsum in diffstat keyword
Matt Mackall -
r14403:2c9f5897 default
parent child Browse files
Show More
@@ -185,12 +185,9 b' def showdiffstat(repo, ctx, templ, **arg'
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 files, adds, removes = 0, 0, 0
188 stats = patch.diffstatdata(util.iterlines(ctx.diff()))
189 for i in patch.diffstatdata(util.iterlines(ctx.diff())):
189 maxname, adds, removes, binary = patch.diffstatsum(stats)
190 files += 1
190 return '%s: +%s/-%s' % (len(stats), adds, removes)
191 adds += i[1]
192 removes += i[2]
193 return '%s: +%s/-%s' % (files, adds, removes)
194
191
195 def showextras(**args):
192 def showextras(**args):
196 templ = args['templ']
193 templ = args['templ']
General Comments 0
You need to be logged in to leave comments. Login now