changeset 26436:a2291c9c85a1

templatekw: remove dockeywords hack Now all template keywords are defined as real functions.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 26 Sep 2015 12:39:13 +0900
parents 882b170ae616
children 4628b26f040e
files mercurial/help.py mercurial/templatekw.py
diffstat 2 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/help.py	Sat Sep 26 12:38:02 2015 +0900
+++ b/mercurial/help.py	Sat Sep 26 12:39:13 2015 +0900
@@ -220,7 +220,7 @@
 addtopicsymbols('merge-tools', '.. internaltoolsmarker',
                 filemerge.internalsdoc)
 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
-addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords)
+addtopicsymbols('templates', '.. keywordsmarker', templatekw.keywords)
 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
 addtopicsymbols('templates', '.. functionsmarker', templater.funcs)
 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
--- a/mercurial/templatekw.py	Sat Sep 26 12:38:02 2015 +0900
+++ b/mercurial/templatekw.py	Sat Sep 26 12:39:13 2015 +0900
@@ -505,10 +505,5 @@
     'tags': showtags,
 }
 
-dockeywords = {
-}
-dockeywords.update(keywords)
-del dockeywords['branches']
-
 # tell hggettext to extract docstrings from these functions:
-i18nfunctions = dockeywords.values()
+i18nfunctions = keywords.values()