hgweb: wrap {branch} and {changesetbranch} by hybridlist()
authorYuya Nishihara <yuya@tcha.org>
Mon, 02 Apr 2018 00:06:39 +0900
changeset 37951 3b3d818bde8b
parent 37950 a5d16f23a2c9
child 37952 8808d5d401ee
hgweb: wrap {branch} and {changesetbranch} by hybridlist() This is also a 0/1-length list of a simple value, can be a hybrid list. Appears that we have many {branch} variants.
mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py	Mon Apr 02 00:05:38 2018 +0900
+++ b/mercurial/hgweb/webutil.py	Mon Apr 02 00:06:39 2018 +0900
@@ -271,8 +271,8 @@
     branches = []
     branch = ctx.branch()
     if branch != 'default':
-        branches.append({"name": branch})
-    return branches
+        branches.append(branch)
+    return templateutil.hybridlist(branches, name='name')
 
 def showtag(repo, tmpl, t1, node=nullid, **args):
     args = pycompat.byteskwargs(args)