[PATCH 5 of 6] hgweb: wrap {inbranch} by hybridlist()
Yuya Nishihara
yuya at tcha.org
Tue May 8 09:45:32 EDT 2018
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1522595138 -32400
# Mon Apr 02 00:05:38 2018 +0900
# Node ID 2fc6f64325ac21c8ed667453c1c62784a082667f
# Parent 907599bcb465a1f18f77e19e24109f13a2da029b
hgweb: wrap {inbranch} by hybridlist()
This is also a 0/1-length list of a simple value, 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
@@ -264,8 +264,8 @@ def nodeinbranch(repo, ctx):
except error.RepoLookupError:
branchnode = None
if branch != 'default' and branchnode != ctx.node():
- branches.append({"name": branch})
- return branches
+ branches.append(branch)
+ return templateutil.hybridlist(branches, name='name')
def nodebranchnodefault(ctx):
branches = []
More information about the Mercurial-devel
mailing list