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.
--- 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']