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

Yuya Nishihara yuya at tcha.org
Tue May 8 09:45:30 EDT 2018


# HG changeset patch
# User Yuya Nishihara <yuya at 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.

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 = []


More information about the Mercurial-devel mailing list