hgweb: evaluate the "default" value as template
authorYuya Nishihara <yuya@tcha.org>
Sun, 03 Apr 2016 14:16:47 +0900
changeset 37020 16bbb15406c9
parent 37019 c97b936d8bb5
child 37021 c83e2736c6de
hgweb: evaluate the "default" value as template Strictly speaking, everything in the map file is a template. So let's not take out an unparsed template string.
mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py	Fri Mar 16 21:39:32 2018 +0900
+++ b/mercurial/hgweb/hgweb_mod.py	Sun Apr 03 14:16:47 2016 +0900
@@ -386,7 +386,7 @@
                 self.check_perm(rctx, req, None)
 
             if cmd == '':
-                req.qsparams['cmd'] = rctx.tmpl.cache['default']
+                req.qsparams['cmd'] = rctx.tmpl.render('default', {})
                 cmd = req.qsparams['cmd']
 
             # Don't enable caching if using a CSP nonce because then it wouldn't