configitems: register the 'server.bundle*' family of config
authorBoris Feld <boris.feld@octobus.net>
Wed, 11 Oct 2017 17:51:40 +0200
changeset 34613 5e61cd5fb0fc
parent 34612 c2cb6be4212f
child 34614 93fcd65e459f
configitems: register the 'server.bundle*' family of config All these config use the same function specifying a default value. We need to register them all at the same time.
mercurial/configitems.py
mercurial/wireproto.py
--- a/mercurial/configitems.py	Wed Oct 11 04:16:17 2017 +0200
+++ b/mercurial/configitems.py	Wed Oct 11 17:51:40 2017 +0200
@@ -500,6 +500,18 @@
 coreconfigitem('server', 'bundle1gd',
     default=None,
 )
+coreconfigitem('server', 'bundle1.pull',
+    default=None,
+)
+coreconfigitem('server', 'bundle1gd.pull',
+    default=None,
+)
+coreconfigitem('server', 'bundle1.push',
+    default=None,
+)
+coreconfigitem('server', 'bundle1gd.push',
+    default=None,
+)
 coreconfigitem('server', 'compressionengines',
     default=list,
 )
--- a/mercurial/wireproto.py	Wed Oct 11 04:16:17 2017 +0200
+++ b/mercurial/wireproto.py	Wed Oct 11 17:51:40 2017 +0200
@@ -595,11 +595,11 @@
     gd = 'generaldelta' in repo.requirements
 
     if gd:
-        v = ui.configbool('server', 'bundle1gd.%s' % action, None)
+        v = ui.configbool('server', 'bundle1gd.%s' % action)
         if v is not None:
             return v
 
-    v = ui.configbool('server', 'bundle1.%s' % action, None)
+    v = ui.configbool('server', 'bundle1.%s' % action)
     if v is not None:
         return v