Patchwork [12,of,18] configitems: register the 'server.validate' config

login
register
mail settings
Submitter Pierre-Yves David
Date July 2, 2017, 10:25 p.m.
Message ID <a3f76daf381d30a3634f.1499034329@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21940/
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 1498787055 -7200
#      Fri Jun 30 03:44:15 2017 +0200
# Node ID a3f76daf381d30a3634f5827b069523c91546f82
# Parent  ccb30e6a80bc3c522107b493b073b7fd969651b2
# 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 a3f76daf381d
configitems: register the 'server.validate' config

Patch

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -309,7 +309,7 @@  class cg1unpacker(object):
             self._unpackmanifests(repo, revmap, trp, prog, changesets)
 
             needfiles = {}
-            if repo.ui.configbool('server', 'validate', default=False):
+            if repo.ui.configbool('server', 'validate'):
                 cl = repo.changelog
                 ml = repo.manifestlog
                 # validate incoming csets have their manifests
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -131,6 +131,9 @@  coreconfigitem('server', 'preferuncompre
 coreconfigitem('server', 'uncompressedallowsecret',
     default=False,
 )
+coreconfigitem('server', 'validate',
+    default=False,
+)
 coreconfigitem('ui', 'clonebundleprefers',
     default=list,
 )