# HG changeset patch # User Sean Farley # Date 2014-12-15 03:12:27 # Node ID 80e3cbe227d1a49d02df96412cf4b4b28a4d0d16 # Parent 4c4c967814ef6ab9187a2327d0f33b47c1b2d4e0 namespaces: add method to get template name of namespace This patch adds the public api for getting the template name of a namespace so that the next patch can use it to generate a template keyword automatically. diff --git a/mercurial/namespaces.py b/mercurial/namespaces.py --- a/mercurial/namespaces.py +++ b/mercurial/namespaces.py @@ -84,3 +84,7 @@ class namespaces(object): return cl.node(maxrev) return n[0] raise KeyError(_('no such name: %s') % name) + + def templatename(self, namespace): + """method that returns the template name of a namespace""" + return self._names[namespace]['templatename']