From patchwork Wed Apr 19 12:48:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1,of,2,evolve-ext] template: pass all mapping data to showlist() From: Yuya Nishihara X-Patchwork-Id: 20260 Message-Id: <2b435b72427c3cfb4afe.1492606097@mimosa> To: mercurial-devel@mercurial-scm.org Date: Wed, 19 Apr 2017 21:48:17 +0900 # HG changeset patch # User Yuya Nishihara # Date 1492603929 -32400 # Wed Apr 19 21:12:09 2017 +0900 # Node ID 2b435b72427c3cfb4afeff0b61f353d2b8182da5 # Parent dad84c052463e5cf57d8a74655c9ee514e76be7b template: pass all mapping data to showlist() Otherwise a keyword depending on repo or ctx couldn't be rendered. diff --git a/hgext3rd/evolve/__init__.py b/hgext3rd/evolve/__init__.py --- a/hgext3rd/evolve/__init__.py +++ b/hgext3rd/evolve/__init__.py @@ -432,9 +432,10 @@ def obsoletekw(repo, ctx, templ, **args) return '' @eh.templatekw('troubles') -def showtroubles(repo, ctx, **args): +def showtroubles(**args): """:troubles: List of strings. Evolution troubles affecting the changeset (zero or more of "unstable", "divergent" or "bumped").""" + ctx = args['ctx'] return templatekw.showlist('trouble', ctx.troubles(), plural='troubles', **args)