Submitter | Yuya Nishihara |
---|---|
Date | April 19, 2017, 12:48 p.m. |
Message ID | <ac51b873fc37a7302e1e.1492606098@mimosa> |
Download | mbox | patch |
Permalink | /patch/20261/ |
State | Accepted |
Headers | show |
Comments
On 04/19/2017 02:48 PM, Yuya Nishihara wrote: > # HG changeset patch > # User Yuya Nishihara <yuya@tcha.org> > # Date 1492604263 -32400 > # Wed Apr 19 21:17:43 2017 +0900 > # Node ID ac51b873fc37a7302e1e49bf653e62afe80e31c8 > # Parent 2b435b72427c3cfb4afeff0b61f353d2b8182da5 > template: adapt to new showlist() API introduced by hg e5eab0fe69ee Pushed, thanks. Cheers,
Patch
diff --git a/hgext3rd/evolve/__init__.py b/hgext3rd/evolve/__init__.py --- a/hgext3rd/evolve/__init__.py +++ b/hgext3rd/evolve/__init__.py @@ -436,8 +436,13 @@ 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) + try: + # specify plural= explicitly to trigger TypeError on hg < 4.2 + return templatekw.showlist('trouble', ctx.troubles(), args, + plural='troubles') + except TypeError: + return templatekw.showlist('trouble', ctx.troubles(), plural='troubles', + **args) ##################################################################### ### Various trouble warning ###