[Bug 5800] New: 'hg log -G --stat' line-wraps
mercurial-bugs at mercurial-scm.org
mercurial-bugs at mercurial-scm.org
Wed Feb 21 22:44:52 UTC 2018
https://bz.mercurial-scm.org/show_bug.cgi?id=5800
Bug ID: 5800
Summary: 'hg log -G --stat' line-wraps
Product: Mercurial
Version: unspecified
Hardware: PC
OS: Other
Status: UNCONFIRMED
Severity: bug
Priority: wish
Component: Mercurial
Assignee: bugzilla at mercurial-scm.org
Reporter: jeffpc at josefsipek.net
CC: mercurial-devel at mercurial-scm.org
'hg log --stat' gets the width of the terminal and uses that to size the
diffstat lines. For some commits (e.g.,
579c28576ba50824e9287ea97548a472b10c561d) the diffstat is rather wide but it
still fits the terminal nicely.
Problems occur if the user requested both diffstat *and* graph (-G). The graph
rendering uses several columns, but the diffstat generation code isn't told
that the effective terminal width is smaller. This results in the diffstat
line wrapping.
$ hg log -l1 -r 579c28576ba --stat # ok
$ hg log -l1 -r 579c28576ba --stat -G # line wrap
Based on a quick look at the code, it looks like there is no easy way to
subtract the graph width from the terminal width that's passed to diffstat() as
the diffstat is generated long before the graph is computed.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list