1176 diffopts = patch.diffopts(ui, opts) |
1176 diffopts = patch.diffopts(ui, opts) |
1177 |
1177 |
1178 m = cmdutil.match(repo, pats, opts) |
1178 m = cmdutil.match(repo, pats, opts) |
1179 if stat: |
1179 if stat: |
1180 it = patch.diff(repo, node1, node2, match=m, opts=diffopts) |
1180 it = patch.diff(repo, node1, node2, match=m, opts=diffopts) |
1181 width = ui.interactive() and util.termwidth() or 80 |
1181 width = 80 |
|
1182 if not ui.plain(): |
|
1183 width = util.termwidth() |
1182 for chunk, label in patch.diffstatui(util.iterlines(it), width=width, |
1184 for chunk, label in patch.diffstatui(util.iterlines(it), width=width, |
1183 git=diffopts.git): |
1185 git=diffopts.git): |
1184 ui.write(chunk, label=label) |
1186 ui.write(chunk, label=label) |
1185 else: |
1187 else: |
1186 it = patch.diffui(repo, node1, node2, match=m, opts=diffopts) |
1188 it = patch.diffui(repo, node1, node2, match=m, opts=diffopts) |