Comments
Patch
@@ -247,9 +247,10 @@ def showdescription(repo, ctx, templ, **
def showdiffstat(repo, ctx, templ, **args):
""":diffstat: String. Statistics of changes with the following format:
"modified files: +added/-removed lines"
"""
- stats = patch.diffstatdata(util.iterlines(ctx.diff()))
+ stats = patch.diffstatdata(util.iterlines(
+ ctx.diff(allowformatchanging=False)))
maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats)
return '%s: +%s/-%s' % (len(stats), adds, removes)
def showextras(**args):
@@ -127,9 +127,9 @@ diff.git should not impact {diffstat}
diff.git and diff.noprefix together should not impact {diffstat}
$ hg --config diff.git=true --config diff.noprefix=true log -T '{rev} {diffstat}\n'
- 2 0: +0/-0
- 1 0: +0/-0
- 0 0: +0/-0
+ 2 2: +0/-0
+ 1 1: +3/-0
+ 0 2: +426/-0
$ cd ..