Mercurial > hg
changeset 38135:5e94d07b290a
hgweb: wrap {lastchange} of bookmarks with mappinglist
It was an 1-length list of a mapping, can be wrapped with a mappinglist.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 04 Apr 2018 20:21:29 +0900 |
parents | edacd831afab |
children | e4a43d261715 |
files | mercurial/hgweb/webcommands.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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,)))