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

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

Comments

Yuya Nishihara - May 8, 2018, 1:45 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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.

Patch

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)]