Patchwork [07,of,18] configitems: register the 'server.concurrent-push-mode' config

login
register
mail settings
Submitter Pierre-Yves David
Date July 2, 2017, 10:25 p.m.
Message ID <7f27c1d0189cf433d575.1499034324@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21930/
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 1498787049 -7200
#      Fri Jun 30 03:44:09 2017 +0200
# Node ID 7f27c1d0189cf433d575267952f663656bc8a7be
# Parent  75bd0a2260dfce50ae11c0f3edade960a4ce08e9
# 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 7f27c1d0189c
configitems: register the 'server.concurrent-push-mode' config

Patch

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -1343,7 +1343,7 @@  def getrepocaps(repo, allowpushback=Fals
         caps['obsmarkers'] = supportedformat
     if allowpushback:
         caps['pushback'] = ()
-    cpmode = repo.ui.config('server', 'concurrent-push-mode', 'strict')
+    cpmode = repo.ui.config('server', 'concurrent-push-mode')
     if cpmode == 'check-related':
         caps['checkheads'] = ('related',)
     return caps
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -116,6 +116,9 @@  coreconfigitem('server', 'bundle1gd',
 coreconfigitem('server', 'compressionengines',
     default=list,
 )
+coreconfigitem('server', 'concurrent-push-mode',
+    default='strict',
+)
 coreconfigitem('ui', 'clonebundleprefers',
     default=list,
 )