Patchwork D1922: wireproto: don't compress errors from getbundle()

login
register
mail settings
Submitter phabricator
Date Jan. 22, 2018, 8:07 p.m.
Message ID <46230735ed1083cdcd795d2f77c415c9@localhost.localdomain>
Download mbox | patch
Permalink /patch/27033/
State Not Applicable
Headers show

Comments

phabricator - Jan. 22, 2018, 8:07 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9d249f3de730: wireproto: don&#039;t compress errors from getbundle() (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1922?vs=4963&id=4980

REVISION DETAIL
  https://phab.mercurial-scm.org/D1922

AFFECTED FILES
  mercurial/wireproto.py

CHANGE DETAILS




To: indygreg, #hg-reviewers, lothiraldan, durin42
Cc: mercurial-devel

Patch

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -862,6 +862,8 @@ 
             raise error.Abort(bundle2requiredmain,
                               hint=bundle2requiredhint)
 
+    preferuncompressed = False
+
     try:
         if repo.ui.configbool('server', 'disablefullbundle'):
             # Check to see if this is a full clone.
@@ -891,8 +893,10 @@ 
             advargs.append(('hint', exc.hint))
         bundler.addpart(bundle2.bundlepart('error:abort',
                                            manargs, advargs))
-        return streamres(gen=bundler.getchunks())
-    return streamres(gen=chunks)
+        chunks = bundler.getchunks()
+        preferuncompressed = True
+
+    return streamres(gen=chunks, prefer_uncompressed=preferuncompressed)
 
 @wireprotocommand('heads')
 def heads(repo, proto):