Mercurial > evolve
changeset 2272:eb47d436cdc3 stable
template: adapt to new showlist() API introduced by hg e5eab0fe69ee
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 19 Apr 2017 21:17:43 +0900 |
parents | 1af1b0debd4b |
children | 228111491788 |
files | README hgext3rd/evolve/__init__.py |
diffstat | 2 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 -------------------
--- 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 ###