##// END OF EJS Templates
namespaces: add logname member to namespace object...
Sean Farley -
r23874:fef1146b default
parent child Browse files
Show More
@@ -120,12 +120,14 b' class namespace(object):'
120 120
121 121 """
122 122
123 def __init__(self, name, templatename=None, listnames=None, namemap=None,
124 nodemap=None):
123 def __init__(self, name, templatename=None, logname=None, listnames=None,
124 namemap=None, nodemap=None):
125 125 """create a namespace
126 126
127 127 name: the namespace to be registered (in plural form)
128 128 templatename: the name to use for templating
129 logname: the name to use for log output; if not specified templatename
130 is used
129 131 listnames: function to list all names
130 132 namemap: function that inputs a node, output name(s)
131 133 nodemap: function that inputs a name, output node(s)
@@ -133,10 +135,15 b' class namespace(object):'
133 135 """
134 136 self.name = name
135 137 self.templatename = templatename
138 self.logname = logname
136 139 self.listnames = listnames
137 140 self.namemap = namemap
138 141 self.nodemap = nodemap
139 142
143 # if logname is not specified, use the template name as backup
144 if self.logname is None:
145 self.logname = self.templatename
146
140 147 def names(self, repo, node):
141 148 """method that returns a (sorted) list of names in a namespace that
142 149 match a given node"""
General Comments 0
You need to be logged in to leave comments. Login now