[PATCH 5 of 5] templatekw: remove dockeywords hack

Yuya Nishihara yuya at tcha.org
Thu Oct 1 08:38:09 CDT 2015


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1443238753 -32400
#      Sat Sep 26 12:39:13 2015 +0900
# Node ID 9b44153f1fe96a388ef1552e4e05395fdf7e20a2
# Parent  ce0d7d32363dd33ff3227e9fab4b55af22057bde
templatekw: remove dockeywords hack

Now all template keywords are defined as real functions.

diff --git a/mercurial/help.py b/mercurial/help.py
--- a/mercurial/help.py
+++ b/mercurial/help.py
@@ -220,7 +220,7 @@ addtopicsymbols('filesets', '.. predicat
 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,
diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -505,9 +505,5 @@ keywords = {
     'tags': showtags,
 }
 
-dockeywords = {
-}
-dockeywords.update(keywords)
-
 # tell hggettext to extract docstrings from these functions:
-i18nfunctions = dockeywords.values()
+i18nfunctions = keywords.values()


More information about the Mercurial-devel mailing list