Mercurial > hg > mercurial-source
changeset 34011:35c233975b78
configitems: register the 'server.zliblevel' config
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 30 Jun 2017 03:44:16 +0200 |
parents | 86c9aa1d598f |
children | dd50a370c8cb |
files | mercurial/configitems.py mercurial/hgweb/protocol.py |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -140,6 +140,9 @@ coreconfigitem('server', 'validate', default=False, ) +coreconfigitem('server', 'zliblevel', + default=-1, +) coreconfigitem('ui', 'clonebundleprefers', default=list, )
--- a/mercurial/hgweb/protocol.py +++ b/mercurial/hgweb/protocol.py @@ -135,7 +135,7 @@ # 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):