Patchwork [5,of,5] templatekw: remove dockeywords hack

login
register
mail settings
Submitter Yuya Nishihara
Date Oct. 1, 2015, 1:38 p.m.
Message ID <9b44153f1fe96a388ef1.1443706689@mimosa>
Download mbox | patch
Permalink /patch/10717/
State Accepted
Headers show

Comments

Yuya Nishihara - Oct. 1, 2015, 1:38 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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.
Pierre-Yves David - Oct. 2, 2015, 7:25 p.m.
On 10/01/2015 06:38 AM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1443238753 -32400
> #      Sat Sep 26 12:39:13 2015 +0900
> # Node ID 9b44153f1fe96a388ef1552e4e05395fdf7e20a2
> # Parent  ce0d7d32363dd33ff3227e9fab4b55af22057bde
> templatekw: remove dockeywords hack

patch 4-5 are pushed to the clowncopter.

I'll probably push patch 1 once I know what it is about.

Patch

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()