changeset 38137:3e6253438bf9

hgweb: wrap {annotate} with mappinggenerator No bare generator of mappings should be put in a template mapping.
author Yuya Nishihara <yuya@tcha.org>
date Wed, 04 Apr 2018 20:28:51 +0900
parents e4a43d261715
children 8e9ce73ceb15
files mercurial/hgweb/webcommands.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Wed Apr 04 20:24:04 2018 +0900
+++ b/mercurial/hgweb/webcommands.py	Wed Apr 04 20:28:51 2018 +0900
@@ -943,7 +943,7 @@
         for p in parentscache[rev]:
             yield p
 
-    def annotate(**map):
+    def annotate(context):
         if fctx.isbinary():
             mt = (mimetypes.guess_type(fctx.path())[0]
                   or 'application/octet-stream')
@@ -986,7 +986,7 @@
     return web.sendtemplate(
         'fileannotate',
         file=f,
-        annotate=annotate,
+        annotate=templateutil.mappinggenerator(annotate),
         path=webutil.up(f),
         symrev=webutil.symrevorshortnode(web.req, fctx),
         rename=webutil.renamelink(fctx),