##// END OF EJS Templates
templatekw.showdiffstat: use ctx.diff() instead of calling patch
Alexander Solovyov -
r13114:8f29a08e default
parent child Browse files
Show More
@@ -162,9 +162,8 b' def showdescription(repo, ctx, templ, **'
162 return ctx.description().strip()
162 return ctx.description().strip()
163
163
164 def showdiffstat(repo, ctx, templ, **args):
164 def showdiffstat(repo, ctx, templ, **args):
165 diff = patch.diff(repo, ctx.parents()[0].node(), ctx.node())
166 files, adds, removes = 0, 0, 0
165 files, adds, removes = 0, 0, 0
167 for i in patch.diffstatdata(util.iterlines(diff)):
166 for i in patch.diffstatdata(util.iterlines(ctx.diff())):
168 files += 1
167 files += 1
169 adds += i[1]
168 adds += i[1]
170 removes += i[2]
169 removes += i[2]
General Comments 0
You need to be logged in to leave comments. Login now