comparison mercurial/namespaces.py @ 23738:3436e45de2fb

namespaces: remove names method on the namespaces object Now that there is an object for each individual namespace, we use that instead of the method on the collection of namespaces.
author Sean Farley <sean.michael.farley@gmail.com>
date Sun, 21 Dec 2014 14:04:20 -0800
parents d7324c242c3f
children b8b246cffdee
comparison
equal deleted inserted replaced
23737:b56400eeefaf 23738:3436e45de2fb
87 87
88 def templatename(self, namespace): 88 def templatename(self, namespace):
89 """method that returns the template name of a namespace""" 89 """method that returns the template name of a namespace"""
90 return self._names[namespace].templatename 90 return self._names[namespace].templatename
91 91
92 def names(self, repo, namespace, node):
93 """method that returns a (sorted) list of names in a namespace that
94 match a given node"""
95 return sorted(self._names[namespace].nodemap(repo, node))
96
97 class namespace(object): 92 class namespace(object):
98 """provides an interface to a namespace 93 """provides an interface to a namespace
99 94
100 Namespaces are basically generic many-to-many mapping between some 95 Namespaces are basically generic many-to-many mapping between some
101 (namespaced) names and nodes. The goal here is to control the pollution of 96 (namespaced) names and nodes. The goal here is to control the pollution of