Patchwork [2,of,9] config: register the 'devel.bundle2.debug' config

login
register
mail settings
Submitter Pierre-Yves David
Date June 29, 2017, 7:32 p.m.
Message ID <2cc34b774cb869207449.1498764779@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21840/
State Accepted
Headers show

Comments

Pierre-Yves David - June 29, 2017, 7:32 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1498649133 -7200
#      Wed Jun 28 13:25:33 2017 +0200
# Node ID 2cc34b774cb869207449635b7090a612dd0cf2d2
# Parent  8e4ad21630cd8491527bcc0cc7a5b517e41f8f0a
# EXP-Topic config.register
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 2cc34b774cb8
config: register the 'devel.bundle2.debug' config

Existing explicit default are dropped now that the default is centralised.

Patch

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -187,12 +187,12 @@  preferedchunksize = 4096
 
 def outdebug(ui, message):
     """debug regarding output stream (bundling)"""
-    if ui.configbool('devel', 'bundle2.debug', False):
+    if ui.configbool('devel', 'bundle2.debug'):
         ui.debug('bundle2-output: %s\n' % message)
 
 def indebug(ui, message):
     """debug on input stream (unbundling)"""
-    if ui.configbool('devel', 'bundle2.debug', False):
+    if ui.configbool('devel', 'bundle2.debug'):
         ui.debug('bundle2-input: %s\n' % message)
 
 def validateparttype(parttype):
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -59,6 +59,9 @@  coreconfigitem = getitemregister(coreite
 coreconfigitem('devel', 'all-warnings',
     default=False,
 )
+coreconfigitem('devel', 'bundle2.debug',
+    default=False,
+)
 coreconfigitem('patch', 'fuzz',
     default=2,
 )