Mercurial > hg
changeset 40148:74558635dad5
narrow: don't compress the bundle2 when sending 'error:abort'
This is similar to waht getbundle() does and also explicitly specifies that we
should get a compressed bundle2 in normal cases when not sending 'error:abort'.
Differential Revision: https://phab.mercurial-scm.org/D4934
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Wed, 10 Oct 2018 19:46:13 +0300 |
parents | 58ebf5083843 |
children | 9b0cdfb3c11e |
files | hgext/narrow/narrowwirepeer.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/narrow/narrowwirepeer.py Thu Oct 11 03:38:23 2018 +0530 +++ b/hgext/narrow/narrowwirepeer.py Wed Oct 10 19:46:13 2018 +0300 @@ -57,6 +57,7 @@ ellipses: whether to send ellipses data or not """ + preferuncompressed = False try: oldincludes = wireprototypes.decodelist(oldincludes) newincludes = wireprototypes.decodelist(newincludes) @@ -92,9 +93,11 @@ if exc.hint is not None: advargs.append(('hint', exc.hint)) bundler.addpart(bundle2.bundlepart('error:abort', manargs, advargs)) + preferuncompressed = True chunks = bundler.getchunks() - return wireprototypes.streamres(gen=chunks) + return wireprototypes.streamres(gen=chunks, + prefer_uncompressed=preferuncompressed) def peernarrowwiden(remote, **kwargs): for ch in ('oldincludes', 'newincludes', 'oldexcludes', 'newexcludes',