# HG changeset patch # User Yuya Nishihara # Date 1492604263 -32400 # Node ID eb47d436cdc3bc6657d89baffe24fcd9abaf9e9c # Parent 1af1b0debd4b2c6e5e4e00f62e51b159d1b32087 template: adapt to new showlist() API introduced by hg e5eab0fe69ee diff -r 1af1b0debd4b -r eb47d436cdc3 README --- a/README Wed Apr 19 21:12:09 2017 +0900 +++ b/README Wed Apr 19 21:17:43 2017 +0900 @@ -112,6 +112,12 @@ Changelog ========= + +6.0.1 - in progress +------------------- + + - template: adapt to change in 4.2 + 6.0.0 -- 2017-02-31 ------------------- diff -r 1af1b0debd4b -r eb47d436cdc3 hgext3rd/evolve/__init__.py --- a/hgext3rd/evolve/__init__.py Wed Apr 19 21:12:09 2017 +0900 +++ b/hgext3rd/evolve/__init__.py Wed Apr 19 21:17:43 2017 +0900 @@ -436,8 +436,13 @@ """: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 ###