##// END OF EJS Templates
namespaces: generate template keyword when registering a namespace...
Sean Farley -
r23610:9266d1dd default
parent child Browse files
Show More
@@ -1,5 +1,6 b''
1 from i18n import _
1 from i18n import _
2 from mercurial import util
2 from mercurial import util
3 import templatekw
3
4
4 def tolist(val):
5 def tolist(val):
5 """
6 """
@@ -74,6 +75,13 b' class namespaces(object):'
74 else:
75 else:
75 self._names[namespace] = val
76 self._names[namespace] = val
76
77
78 # we only generate a template keyword if one does not already exist
79 if namespace not in templatekw.keywords:
80 def generatekw(**args):
81 return templatekw.shownames(namespace, **args)
82
83 templatekw.keywords[namespace] = generatekw
84
77 def singlenode(self, repo, name):
85 def singlenode(self, repo, name):
78 """
86 """
79 Return the 'best' node for the given name. Best means the first node
87 Return the 'best' node for the given name. Best means the first node
General Comments 0
You need to be logged in to leave comments. Login now