templatekw: update namespace calls
Previous patches changed the namespace api to be more of an object-oriented
approach. This patch updates the template function to use said api changes.
--- a/mercurial/templatekw.py Sun Dec 21 13:56:32 2014 -0800
+++ b/mercurial/templatekw.py Sun Dec 21 14:01:52 2014 -0800
@@ -378,9 +378,9 @@
"""helper method to generate a template keyword for a namespace"""
ctx = args['ctx']
repo = ctx._repo
- names = repo.names.names(repo, namespace, ctx.node())
- return showlist(repo.names.templatename(namespace), names,
- plural=namespace, **args)
+ ns = repo.names[namespace]
+ names = ns.names(repo, ctx.node())
+ return showlist(ns.templatename, names, plural=namespace, **args)
# keywords are callables like:
# fn(repo, ctx, templ, cache, revcache, **args)