--- a/mercurial/hgweb/webcommands.py Wed Apr 04 20:11:20 2018 +0900
+++ b/mercurial/hgweb/webcommands.py Wed Apr 04 20:14:19 2018 +0900
@@ -556,7 +556,7 @@
if mf and not files and not dirs:
raise ErrorResponse(HTTP_NOT_FOUND, 'path not found: ' + path)
- def filelist(**map):
+ def filelist(context):
for f in sorted(files):
full = files[f]
@@ -568,7 +568,7 @@
"size": fctx.size(),
"permissions": mf.flags(full)}
- def dirlist(**map):
+ def dirlist(context):
for d in sorted(dirs):
emptydirs = []
@@ -591,8 +591,8 @@
path=abspath,
up=webutil.up(abspath),
upparity=next(parity),
- fentries=filelist,
- dentries=dirlist,
+ fentries=templateutil.mappinggenerator(filelist),
+ dentries=templateutil.mappinggenerator(dirlist),
archives=web.archivelist(hex(node)),
**pycompat.strkwargs(webutil.commonentry(web.repo, ctx)))