Patchwork [3,of,6] hgweb: wrap {bookmarks} by hybridlist()

login
register
mail settings
Submitter Yuya Nishihara
Date May 8, 2018, 1:45 p.m.
Message ID <d63045f0f8bb827b8740.1525787130@mimosa>
Download mbox | patch
Permalink /patch/31377/
State Accepted
Headers show

Comments

Yuya Nishihara - May 8, 2018, 1:45 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1522595029 -32400
#      Mon Apr 02 00:03:49 2018 +0900
# Node ID d63045f0f8bb827b8740274c52b7789e30439cb4
# Parent  62d21350541a6cebb69c29651a61a5cdb51a6992
hgweb: wrap {bookmarks} by hybridlist()

This is also a list of simple values.

Patch

diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py
+++ b/mercurial/hgweb/webutil.py
@@ -241,7 +241,7 @@  def nodetagsdict(repo, node):
     return templateutil.hybridlist(repo.nodetags(node), name='name')
 
 def nodebookmarksdict(repo, node):
-    return [{"name": i} for i in repo.nodebookmarks(node)]
+    return templateutil.hybridlist(repo.nodebookmarks(node), name='name')
 
 def nodebranchdict(repo, ctx):
     branches = []