# HG changeset patch # User Pierre-Yves David # Date 2017-06-30 01:44:16 # Node ID 35c233975b7830ba5cc2b248e26c0eb60f690246 # Parent 86c9aa1d598f6dff2148eeda04d29c2df45d4393 configitems: register the 'server.zliblevel' config diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -140,6 +140,9 @@ coreconfigitem('server', 'uncompressedal coreconfigitem('server', 'validate', default=False, ) +coreconfigitem('server', 'zliblevel', + default=-1, +) coreconfigitem('ui', 'clonebundleprefers', default=list, ) diff --git a/mercurial/hgweb/protocol.py b/mercurial/hgweb/protocol.py --- a/mercurial/hgweb/protocol.py +++ b/mercurial/hgweb/protocol.py @@ -135,7 +135,7 @@ class webproto(wireproto.abstractserverp # Don't allow untrusted settings because disabling compression or # setting a very high compression level could lead to flooding # the server's network or CPU. - opts = {'level': self.ui.configint('server', 'zliblevel', -1)} + opts = {'level': self.ui.configint('server', 'zliblevel')} return HGTYPE, util.compengines['zlib'], opts def iscmd(cmd):