configitems: register the 'web.allowpull' config
authorBoris Feld <boris.feld@octobus.net>
Wed, 11 Oct 2017 04:12:50 +0200
changeset 34602 56816cfc4951
parent 34601 8f4d54b74206
child 34603 cc5445ced177
configitems: register the 'web.allowpull' config
mercurial/configitems.py
mercurial/hgweb/hgweb_mod.py
--- a/mercurial/configitems.py	Wed Oct 11 04:12:34 2017 +0200
+++ b/mercurial/configitems.py	Wed Oct 11 04:12:50 2017 +0200
@@ -718,6 +718,9 @@
 coreconfigitem('web', 'allowgz',
     default=None,
 )
+coreconfigitem('web', 'allowpull',
+    default=True,
+)
 coreconfigitem('web', 'accesslog',
     default='-',
 )
--- a/mercurial/hgweb/hgweb_mod.py	Wed Oct 11 04:12:34 2017 +0200
+++ b/mercurial/hgweb/hgweb_mod.py	Wed Oct 11 04:12:50 2017 +0200
@@ -114,7 +114,7 @@
         self.stripecount = self.configint('web', 'stripes')
         self.maxshortchanges = self.configint('web', 'maxshortchanges')
         self.maxfiles = self.configint('web', 'maxfiles')
-        self.allowpull = self.configbool('web', 'allowpull', True)
+        self.allowpull = self.configbool('web', 'allowpull')
 
         # we use untrusted=False to prevent a repo owner from using
         # web.templates in .hg/hgrc to get access to any file readable