# HG changeset patch # User Sean Farley # Date 1418613147 28800 # 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 -r 4c4c967814ef -r 80e3cbe227d1 mercurial/namespaces.py --- a/mercurial/namespaces.py Mon Dec 15 00:09:52 2014 -0800 +++ b/mercurial/namespaces.py Sun Dec 14 19:12:27 2014 -0800 @@ -84,3 +84,7 @@ 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']