changeset 26161:16d54bbdbf89

hgweb: remove hgweb.configbool It is redundant with requestcontext.configbool.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 22 Aug 2015 15:32:16 -0700
parents 952e0564b46e
children 268b39770c28
files mercurial/hgweb/hgweb_mod.py
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Sat Aug 22 15:30:39 2015 -0700
+++ b/mercurial/hgweb/hgweb_mod.py	Sat Aug 22 15:32:16 2015 -0700
@@ -171,10 +171,6 @@
         return self.repo.ui.config(section, name, default,
                                    untrusted=untrusted)
 
-    def configbool(self, section, name, default=False, untrusted=True):
-        return self.repo.ui.configbool(section, name, default,
-                                       untrusted=untrusted)
-
     def _getview(self, repo):
         """The 'web.view' config controls changeset filter to hgweb. Possible
         values are ``served``, ``visible`` and ``all``. Default is ``served``.
@@ -342,7 +338,7 @@
                 req.form['cmd'] = [tmpl.cache['default']]
                 cmd = req.form['cmd'][0]
 
-            if self.configbool('web', 'cache', True):
+            if rctx.configbool('web', 'cache', True):
                 caching(self, req) # sets ETag header or raises NOT_MODIFIED
             if cmd not in webcommands.__all__:
                 msg = 'no such method: %s' % cmd