diff mercurial/wireproto.py @ 16361:6097ede2be4d

protocol: Add the stream-preferred capability This makes the client use the uncompressed protocol.
author Benoit Allard <benoit@aeteurope.nl>
date Wed, 04 Apr 2012 00:00:47 +0200
parents f9fc46698352
children 9eba72cdde34
line wrap: on
line diff
--- a/mercurial/wireproto.py	Wed Mar 28 16:06:20 2012 +0200
+++ b/mercurial/wireproto.py	Wed Apr 04 00:00:47 2012 +0200
@@ -415,6 +415,8 @@
     caps = ('lookup changegroupsubset branchmap pushkey known getbundle '
             'unbundlehash batch').split()
     if _allowstream(repo.ui):
+        if repo.ui.configbool('server', 'preferuncompressed', False):
+            caps.append('stream-preferred')
         requiredformats = repo.requirements & repo.supportedformats
         # if our local revlogs are just revlogv1, add 'stream' cap
         if not requiredformats - set(('revlogv1',)):