Mercurial > hg-stable
diff mercurial/namespaces.py @ 36622:900e5ee44307
templatekw: switch namespace template keywords to new API
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 25 Feb 2018 18:52:51 +0900 |
parents | b0054f3c055a |
children | aa97e06a1912 |
line wrap: on
line diff
--- a/mercurial/namespaces.py Sun Feb 25 18:56:06 2018 +0900 +++ b/mercurial/namespaces.py Sun Feb 25 18:52:51 2018 +0900 @@ -89,9 +89,9 @@ # we only generate a template keyword if one does not already exist if namespace.name not in templatekw.keywords: templatekeyword = registrar.templatekeyword(templatekw.keywords) - @templatekeyword(namespace.name) - def generatekw(**args): - return templatekw.shownames(namespace.name, **args) + @templatekeyword(namespace.name, requires={'repo', 'ctx', 'templ'}) + def generatekw(context, mapping): + return templatekw.shownames(context, mapping, namespace.name) def singlenode(self, repo, name): """