[PATCH 2 of 6] hgweb: wrap {tags} by hybridlist()

Yuya Nishihara yuya at tcha.org
Tue May 8 13:45:29 UTC 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1522594956 -32400
#      Mon Apr 02 00:02:36 2018 +0900
# Node ID 62d21350541a6cebb69c29651a61a5cdb51a6992
# Parent  5eacc9485b57f6bc1a22d8309289c3baaa55084e
hgweb: wrap {tags} by hybridlist()

This one is a list of simple values, which can be a hybrid list.

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



More information about the Mercurial-devel mailing list