# HG changeset patch # User Sean Farley # Date 2014-12-21 22:01:52 # Node ID b56400eeefaf4f7afb857dc5a1ca17d1e0838378 # Parent d7324c242c3fd509c7c8dbc8cfca6534ea2251ec 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. diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -378,9 +378,9 @@ def shownames(namespace, **args): """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)