From patchwork Sun Jul 2 22:25:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [10, of, 18] configitems: register the 'server.preferuncompressed' config From: Pierre-Yves David X-Patchwork-Id: 21932 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Mon, 03 Jul 2017 00:25:27 +0200 # HG changeset patch # User Pierre-Yves David # Date 1498787052 -7200 # Fri Jun 30 03:44:12 2017 +0200 # Node ID cf83311fd9cc6d99facbd1c53f67800bbfed05ee # Parent 08d1b1217b40e9c74f06e958a3dbfada01d65c8d # EXP-Topic config.register.server # Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ # hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r cf83311fd9cc configitems: register the 'server.preferuncompressed' config diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -125,6 +125,9 @@ coreconfigitem('server', 'disablefullbun coreconfigitem('server', 'maxhttpheaderlen', default=1024, ) +coreconfigitem('server', 'preferuncompressed', + default=False, +) coreconfigitem('ui', 'clonebundleprefers', default=list, ) diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py --- a/mercurial/wireproto.py +++ b/mercurial/wireproto.py @@ -755,7 +755,7 @@ def _capabilities(repo, proto): # 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