Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 10948:61cd6653f846 stable
diffstat: use ui.plain() instead of ui.interactive()
Previously, a default width of 80 is used for non-interactive
sessions. This behaviour was introduced before HGPLAIN was supported.
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Thu, 15 Apr 2010 18:52:59 +0200 |
parents | e3396b218e10 |
children | 8d5f5122a732 a0102da324ab |
comparison
equal
deleted
inserted
replaced
10947:ede19417c3c4 | 10948:61cd6653f846 |
---|---|
1156 diffopts = patch.diffopts(ui, opts) | 1156 diffopts = patch.diffopts(ui, opts) |
1157 | 1157 |
1158 m = cmdutil.match(repo, pats, opts) | 1158 m = cmdutil.match(repo, pats, opts) |
1159 it = patch.diff(repo, node1, node2, match=m, opts=diffopts) | 1159 it = patch.diff(repo, node1, node2, match=m, opts=diffopts) |
1160 if stat: | 1160 if stat: |
1161 width = ui.interactive() and util.termwidth() or 80 | 1161 width = 80 |
1162 if not ui.plain(): | |
1163 width = util.termwidth() | |
1162 ui.write(patch.diffstat(util.iterlines(it), width=width, | 1164 ui.write(patch.diffstat(util.iterlines(it), width=width, |
1163 git=diffopts.git)) | 1165 git=diffopts.git)) |
1164 else: | 1166 else: |
1165 for chunk in it: | 1167 for chunk in it: |
1166 ui.write(chunk) | 1168 ui.write(chunk) |