D5485: log: fixes line wrap on diffstat (issue5800)
navaneeth.suresh (Navaneeth Suresh)
phabricator at mercurial-scm.org
Thu Dec 27 11:48:26 UTC 2018
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5485
AFFECTED FILES
mercurial/patch.py
CHANGE DETAILS
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:
To: navaneeth.suresh, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list