templatekw: update namespace calls
authorSean Farley <sean.michael.farley@gmail.com>
Sun, 21 Dec 2014 14:01:52 -0800
changeset 23737 b56400eeefaf
parent 23736 d7324c242c3f
child 23738 3436e45de2fb
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.
mercurial/templatekw.py
--- 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)