hgweb: wrap {lastchange} of bookmarks with mappinglist
authorYuya Nishihara <yuya@tcha.org>
Wed, 04 Apr 2018 20:21:29 +0900
changeset 38135 5e94d07b290a
parent 38134 edacd831afab
child 38136 e4a43d261715
hgweb: wrap {lastchange} of bookmarks with mappinglist It was an 1-length list of a mapping, can be wrapped with a mappinglist.
mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py	Wed Apr 04 20:19:51 2018 +0900
+++ b/mercurial/hgweb/webcommands.py	Wed Apr 04 20:21:29 2018 +0900
@@ -662,11 +662,12 @@
         latestrev = i[0][1]
     else:
         latestrev = -1
+    lastdate = web.repo[latestrev].date()
 
     return web.sendtemplate(
         'bookmarks',
         node=hex(web.repo.changelog.tip()),
-        lastchange=[{'date': web.repo[latestrev].date()}],
+        lastchange=templateutil.mappinglist([{'date': lastdate}]),
         entries=templateutil.mappinggenerator(entries, args=(False,)),
         latestentry=templateutil.mappinggenerator(entries, args=(True,)))