Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG6a63ba61e71f: log: fix line wrap on diffstat with -G/--graph (issue5800)
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
- return max(i * graphwidth // maxtotal, int(bool(i)))
+ return max(i * graphwidth // max(diffstatsum(stats)), int(bool(i)))
Doesn't look correct. Why taking max of
(maxname, maxtotal, totaladds, totalremoves, hasbinary)?
IIUC, the problem is that the width parameter is incorrect because of
graph lines.
IIUC, the problem is that the width parameter is incorrect because of
graph lines.
Thanks for the insight Yuya! I guess my current revision addresses what you meant by abusing graphwidth
Looks generally good.
Can you add some tests with/without the -T option? There are two callers of
_showpatch().
+ graphwidth = props.get('graphwidth')
+ if not graphwidth:
+ graphwidth = 0
Nit: can be written as props.get('graphwidth', 0).
Queued, thanks.
def diffordiffstat(ui, repo, diffopts, node1, node2, match,
- changes=None, stat=False, fp=None, prefix='',
- root='', listsubrepos=False, hunksfilterfn=None):
+ changes=None, stat=False, graphwidth=0, fp=None,
Reordered arguments to fix mq failure. Next time, please run all tests.
Thanks for queuing Yuya!
Reordered arguments to fix mq failure. Next time, please run all tests.
Sure will do. Sorry about that.