comparison mercurial/templatekw.py @ 33709: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
comparison
equal deleted inserted replaced
33708:71b77b61ed60 33709:511d6ae462f3
763 def termwidth(repo, ctx, templ, **args): 763 def termwidth(repo, ctx, templ, **args):
764 """Integer. The width of the current terminal.""" 764 """Integer. The width of the current terminal."""
765 return repo.ui.termwidth() 765 return repo.ui.termwidth()
766 766
767 @templatekeyword('troubles') 767 @templatekeyword('troubles')
768 def showtroubles(**args): 768 def showtroubles(repo, **args):
769 """List of strings. Evolution troubles affecting the changeset. 769 """List of strings. Evolution troubles affecting the changeset.
770
771 (DEPRECATED)
772 """
773 msg = ("'troubles' is deprecated, "
774 "use 'instabilities'")
775 repo.ui.deprecwarn(msg, '4.4')
776
777 return showinstabilities(repo=repo, **args)
778
779 @templatekeyword('instabilities')
780 def showinstabilities(**args):
781 """List of strings. Evolution instabilities affecting the changeset.
770 782
771 (EXPERIMENTAL) 783 (EXPERIMENTAL)
772 """ 784 """
773 args = pycompat.byteskwargs(args) 785 args = pycompat.byteskwargs(args)
774 return showlist('trouble', args['ctx'].troubles(), args) 786 return showlist('trouble', args['ctx'].troubles(), args)