# HG changeset patch # User Pulkit Goyal # Date 1539189973 -10800 # Node ID 74558635dad53eccbbe2e67df835df0873d5c870 # Parent 58ebf50838430f5f514a2fa0bdc63505642fe738 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 diff -r 58ebf5083843 -r 74558635dad5 hgext/narrow/narrowwirepeer.py --- 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',