Patchwork [11,of,18] configitems: register the 'server.uncompressedallowsecret' config

login
register
mail settings
Submitter Pierre-Yves David
Date July 2, 2017, 10:25 p.m.
Message ID <ccb30e6a80bc3c522107.1499034328@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21935/
State Accepted
Headers show

Comments

Pierre-Yves David - July 2, 2017, 10:25 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1498787054 -7200
#      Fri Jun 30 03:44:14 2017 +0200
# Node ID ccb30e6a80bc3c522107b493b073b7fd969651b2
# Parent  cf83311fd9cc6d99facbd1c53f67800bbfed05ee
# 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 ccb30e6a80bc
configitems: register the 'server.uncompressedallowsecret' config

Patch

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -128,6 +128,9 @@  coreconfigitem('server', 'maxhttpheaderl
 coreconfigitem('server', 'preferuncompressed',
     default=False,
 )
+coreconfigitem('server', 'uncompressedallowsecret',
+    default=False,
+)
 coreconfigitem('ui', 'clonebundleprefers',
     default=list,
 )
diff --git a/mercurial/streamclone.py b/mercurial/streamclone.py
--- a/mercurial/streamclone.py
+++ b/mercurial/streamclone.py
@@ -172,7 +172,7 @@  def allowservergeneration(repo):
     # So don't allow this by default.
     secret = phases.hassecret(repo)
     if secret:
-        return repo.ui.configbool('server', 'uncompressedallowsecret', False)
+        return repo.ui.configbool('server', 'uncompressedallowsecret')
 
     return True