Mercurial > public > mercurial-scm > hg
comparison mercurial/namespaces.py @ 23739:b8b246cffdee
namespaces: remove templatename method on the namespaces object
Now that there is an object for each individual namespace, we use the
templatename property on that object instead of the method on the collection of
namespaces.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Sun, 21 Dec 2014 14:34:07 -0800 |
parents | 3436e45de2fb |
children | 50229b4c33be |
comparison
equal
deleted
inserted
replaced
23738:3436e45de2fb | 23739:b8b246cffdee |
---|---|
83 maxrev = max(cl.rev(node) for node in n) | 83 maxrev = max(cl.rev(node) for node in n) |
84 return cl.node(maxrev) | 84 return cl.node(maxrev) |
85 return n[0] | 85 return n[0] |
86 raise KeyError(_('no such name: %s') % name) | 86 raise KeyError(_('no such name: %s') % name) |
87 | 87 |
88 def templatename(self, namespace): | |
89 """method that returns the template name of a namespace""" | |
90 return self._names[namespace].templatename | |
91 | |
92 class namespace(object): | 88 class namespace(object): |
93 """provides an interface to a namespace | 89 """provides an interface to a namespace |
94 | 90 |
95 Namespaces are basically generic many-to-many mapping between some | 91 Namespaces are basically generic many-to-many mapping between some |
96 (namespaced) names and nodes. The goal here is to control the pollution of | 92 (namespaced) names and nodes. The goal here is to control the pollution of |