# HG changeset patch # User Yuya Nishihara # Date 1522841331 -32400 # Node ID 3e6253438bf94495c228432c5b08e0fa8ac75474 # Parent e4a43d261715eda3810a4b0823c82dda046a6ae4 hgweb: wrap {annotate} with mappinggenerator No bare generator of mappings should be put in a template mapping. diff -r e4a43d261715 -r 3e6253438bf9 mercurial/hgweb/webcommands.py --- 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),