Mercurial > public > mercurial-scm > hg-stable
diff mercurial/templatekw.py @ 33735:511d6ae462f3
template: rename troubles templatekw into instabilities
Rename troubles template keyword into instabilities and add a deprecation
warning on templatekw.
Update default mapfile and test files to use the new template keyword.
The renaming is done according to
https://www.mercurial-scm.org/wiki/CEDVocabulary.
Differential Revision: https://phab.mercurial-scm.org/D237
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 02 Aug 2017 11:32:25 +0200 |
parents | c0d8de2724ce |
children | ab0c55c2ad9a |
line wrap: on
line diff
--- a/mercurial/templatekw.py Sun Aug 06 11:40:53 2017 -0700 +++ b/mercurial/templatekw.py Wed Aug 02 11:32:25 2017 +0200 @@ -765,9 +765,21 @@ return repo.ui.termwidth() @templatekeyword('troubles') -def showtroubles(**args): +def showtroubles(repo, **args): """List of strings. Evolution troubles affecting the changeset. + (DEPRECATED) + """ + msg = ("'troubles' is deprecated, " + "use 'instabilities'") + repo.ui.deprecwarn(msg, '4.4') + + return showinstabilities(repo=repo, **args) + +@templatekeyword('instabilities') +def showinstabilities(**args): + """List of strings. Evolution instabilities affecting the changeset. + (EXPERIMENTAL) """ args = pycompat.byteskwargs(args)