changeset 38169:e4a43d261715

hgweb: wrap {bookmarks} of summary 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:24:04 +0900
parents 5e94d07b290a
children 3e6253438bf9
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:21:29 2018 +0900
+++ b/mercurial/hgweb/webcommands.py	Wed Apr 04 20:24:04 2018 +0900
@@ -727,7 +727,7 @@
                 'date': web.repo[n].date(),
             }
 
-    def bookmarks(**map):
+    def bookmarks(context):
         parity = paritygen(web.stripecount)
         marks = [b for b in web.repo._bookmarks.items() if b[1] in web.repo]
         sortkey = lambda b: (web.repo[b[1]].rev(), b[0])
@@ -769,7 +769,7 @@
         owner=get_contact(web.config) or 'unknown',
         lastchange=tip.date(),
         tags=templateutil.mappinggenerator(tagentries, name='tagentry'),
-        bookmarks=bookmarks,
+        bookmarks=templateutil.mappinggenerator(bookmarks),
         branches=webutil.branchentries(web.repo, web.stripecount, 10),
         shortlog=templateutil.mappinggenerator(changelist,
                                                name='shortlogentry'),