diff -r 7f6b8ec691e3 -r f97a0bcfd7a1 mercurial/hgweb/hgwebdir_mod.py --- 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):