hgweb: wrap {branches} by hybridlist()
authorYuya Nishihara <yuya@tcha.org>
Mon, 02 Apr 2018 00:04:53 +0900
changeset 37905 f5155bca5023
parent 37904 40a664bd06fa
child 37906 a5d16f23a2c9
hgweb: wrap {branches} by hybridlist() This is a 0/1-length list of a simple value, can be a hybrid list.
mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py	Mon Apr 02 00:03:49 2018 +0900
+++ b/mercurial/hgweb/webutil.py	Mon Apr 02 00:04:53 2018 +0900
@@ -253,8 +253,8 @@
     except error.RepoLookupError:
         branchnode = None
     if branchnode == ctx.node():
-        branches.append({"name": branch})
-    return branches
+        branches.append(branch)
+    return templateutil.hybridlist(branches, name='name')
 
 def nodeinbranch(repo, ctx):
     branches = []