diff mercurial/templatekw.py @ 14437:cbe13e6bdc34

patch: restore the previous output of 'diff --stat' Restore the previous diffstat behaviour of scaling by the maximum number of changes to a single file. Changeset f03f08240c32 modified the diffstat to be scaled by the total number of changes. This seems to have been unintentional.
author Steven Brown <StevenGBrown@gmail.com>
date Thu, 26 May 2011 22:51:02 +0800
parents 2c9f5897d4b7
children f4a8d754cd0a
line wrap: on
line diff
--- a/mercurial/templatekw.py	Tue May 24 17:48:16 2011 +0200
+++ b/mercurial/templatekw.py	Thu May 26 22:51:02 2011 +0800
@@ -186,7 +186,7 @@
     "modified files: +added/-removed lines"
     """
     stats = patch.diffstatdata(util.iterlines(ctx.diff()))
-    maxname, adds, removes, binary = patch.diffstatsum(stats)
+    maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats)
     return '%s: +%s/-%s' % (len(stats), adds, removes)
 
 def showextras(**args):