mercurial/hgweb/hgwebdir_mod.py
changeset 28954 f97a0bcfd7a1
parent 27046 37fcfe52c68c
child 29471 c4fc33c477da
--- a/mercurial/hgweb/hgwebdir_mod.py	Sun Apr 03 23:18:30 2016 +0900
+++ b/mercurial/hgweb/hgwebdir_mod.py	Sun Apr 03 23:26:48 2016 +0900
@@ -491,16 +491,17 @@
         if not staticurl.endswith('/'):
             staticurl += '/'
 
-        tmpl = templater.templater(mapfile,
-                                   defaults={"encoding": encoding.encoding,
-                                             "motd": motd,
-                                             "url": url,
-                                             "logourl": logourl,
-                                             "logoimg": logoimg,
-                                             "staticurl": staticurl,
-                                             "sessionvars": sessionvars,
-                                             "style": style,
-                                             })
+        defaults = {
+            "encoding": encoding.encoding,
+            "motd": motd,
+            "url": url,
+            "logourl": logourl,
+            "logoimg": logoimg,
+            "staticurl": staticurl,
+            "sessionvars": sessionvars,
+            "style": style,
+        }
+        tmpl = templater.templater.frommapfile(mapfile, defaults=defaults)
         return tmpl
 
     def updatereqenv(self, env):