Mercurial > hg-stable
comparison mercurial/debugcommands.py @ 40018:426cb2859013
debugcommands: print all CBOR objects
application/mercurial-cbor may contain multiple objects. Let's print
all of them.
Differential Revision: https://phab.mercurial-scm.org/D4769
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 26 Sep 2018 14:54:15 -0700 |
parents | d71e0ba34d9b |
children | e2697acd9381 |
comparison
equal
deleted
inserted
replaced
40017:1f12a3ad93f2 | 40018:426cb2859013 |
---|---|
3332 continue | 3332 continue |
3333 | 3333 |
3334 ct = res.headers.get(r'Content-Type') | 3334 ct = res.headers.get(r'Content-Type') |
3335 if ct == r'application/mercurial-cbor': | 3335 if ct == r'application/mercurial-cbor': |
3336 ui.write(_('cbor> %s\n') % | 3336 ui.write(_('cbor> %s\n') % |
3337 stringutil.pprint(cborutil.decodeall(body)[0], | 3337 stringutil.pprint(cborutil.decodeall(body), |
3338 bprefix=True, | 3338 bprefix=True, |
3339 indent=2)) | 3339 indent=2)) |
3340 | 3340 |
3341 elif action == 'close': | 3341 elif action == 'close': |
3342 peer.close() | 3342 peer.close() |