changeset 37951:3b3d818bde8b

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.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 02 Apr 2018 00:06:39 +0900
parents a5d16f23a2c9
children 8808d5d401ee
files mercurial/hgweb/webutil.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)