Mercurial > public > mercurial-scm > hg-stable
diff mercurial/debugcommands.py @ 37986:32bc3815efae
stringutil: flip the default of pprint() to bprefix=False
If we use pprint() as a drop-in replacement for repr(), bprefix=False is more
appropriate. Let's make it the default to remove bprefix=False noise.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 10 May 2018 21:08:32 +0900 |
parents | 0e9ddab2bac2 |
children | 8ba0344f9fb1 |
line wrap: on
line diff
--- a/mercurial/debugcommands.py Thu May 10 21:00:58 2018 +0900 +++ b/mercurial/debugcommands.py Thu May 10 21:08:32 2018 +0900 @@ -3017,10 +3017,12 @@ if isinstance(res, wireprotov2peer.commandresponse): val = list(res.cborobjects()) - ui.status(_('response: %s\n') % stringutil.pprint(val)) + ui.status(_('response: %s\n') % + stringutil.pprint(val, bprefix=True)) else: - ui.status(_('response: %s\n') % stringutil.pprint(res)) + ui.status(_('response: %s\n') % + stringutil.pprint(res, bprefix=True)) elif action == 'batchbegin': if batchedcommands is not None: @@ -3092,7 +3094,8 @@ continue if res.headers.get('Content-Type') == 'application/mercurial-cbor': - ui.write(_('cbor> %s\n') % stringutil.pprint(cbor.loads(body))) + ui.write(_('cbor> %s\n') % + stringutil.pprint(cbor.loads(body), bprefix=True)) elif action == 'close': peer.close()