diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -2829,7 +2829,7 @@ # If diffstat runs out of room it doesn't print anything, # which isn't very useful, so always print at least one + or - # if there were at least some changes. - return max(i * graphwidth // maxtotal, int(bool(i))) + return max(i * graphwidth // max(diffstatsum(stats)), int(bool(i))) for filename, adds, removes, isbinary in stats: if isbinary: