From patchwork Tue Apr 3 15:40:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3,of,8,V2] templatekw: do not directly call .gen From: Yuya Nishihara X-Patchwork-Id: 30164 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Wed, 04 Apr 2018 00:40:05 +0900 # HG changeset patch # User Yuya Nishihara # Date 1521299496 -32400 # Sun Mar 18 00:11:36 2018 +0900 # Node ID b37a96bd6c1bcea5d24c6fc04a92fc6bd407e75e # Parent b02b53e4cc2049324d69e3c4a16357f79400a5e4 templatekw: do not directly call .gen diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -613,10 +613,7 @@ def showsuccessorssets(context, mapping) # Format the successorssets def render(d): - t = [] - for i in d.gen(): - t.append(i) - return "".join(t) + return templateutil.stringify(context, mapping, d) def gen(data): yield "; ".join(render(d) for d in data)