Patchwork [08,of,18] configitems: register the 'server.disablefullbundle' config

login
register
mail settings
Submitter Pierre-Yves David
Date July 2, 2017, 10:25 p.m.
Message ID <ad4b02828f5f8702d7bd.1499034325@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21931/
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 1498787050 -7200
#      Fri Jun 30 03:44:10 2017 +0200
# Node ID ad4b02828f5f8702d7bd65a0c2b39b7f7a553524
# Parent  7f27c1d0189cf433d575267952f663656bc8a7be
# 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 ad4b02828f5f
configitems: register the 'server.disablefullbundle' config

Patch

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -119,6 +119,9 @@  coreconfigitem('server', 'compressioneng
 coreconfigitem('server', 'concurrent-push-mode',
     default='strict',
 )
+coreconfigitem('server', 'disablefullbundle',
+    default=False,
+)
 coreconfigitem('ui', 'clonebundleprefers',
     default=list,
 )
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -842,7 +842,7 @@  def getbundle(repo, proto, others):
                               hint=bundle2requiredhint)
 
     try:
-        if repo.ui.configbool('server', 'disablefullbundle', False):
+        if repo.ui.configbool('server', 'disablefullbundle'):
             # Check to see if this is a full clone.
             clheads = set(repo.changelog.heads())
             heads = set(opts.get('heads', set()))