configitems: register the 'server.preferuncompressed' config
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 30 Jun 2017 03:44:12 +0200
changeset 33225 90a1b62bdc91
parent 33224 ab9121fda8d2
child 33226 b045344fe35e
configitems: register the 'server.preferuncompressed' config
mercurial/configitems.py
mercurial/wireproto.py
--- a/mercurial/configitems.py	Fri Jun 30 03:44:11 2017 +0200
+++ b/mercurial/configitems.py	Fri Jun 30 03:44:12 2017 +0200
@@ -131,6 +131,9 @@
 coreconfigitem('server', 'maxhttpheaderlen',
     default=1024,
 )
+coreconfigitem('server', 'preferuncompressed',
+    default=False,
+)
 coreconfigitem('ui', 'clonebundleprefers',
     default=list,
 )
--- a/mercurial/wireproto.py	Fri Jun 30 03:44:11 2017 +0200
+++ b/mercurial/wireproto.py	Fri Jun 30 03:44:12 2017 +0200
@@ -755,7 +755,7 @@
     # copy to prevent modification of the global list
     caps = list(wireprotocaps)
     if streamclone.allowservergeneration(repo):
-        if repo.ui.configbool('server', 'preferuncompressed', False):
+        if repo.ui.configbool('server', 'preferuncompressed'):
             caps.append('stream-preferred')
         requiredformats = repo.requirements & repo.supportedformats
         # if our local revlogs are just revlogv1, add 'stream' cap