mercurial/namespaces.py
changeset 36593 900e5ee44307
parent 36592 b0054f3c055a
child 37068 aa97e06a1912
equal deleted inserted replaced
36592:b0054f3c055a 36593:900e5ee44307
    87             self._names[namespace.name] = namespace
    87             self._names[namespace.name] = namespace
    88 
    88 
    89         # we only generate a template keyword if one does not already exist
    89         # we only generate a template keyword if one does not already exist
    90         if namespace.name not in templatekw.keywords:
    90         if namespace.name not in templatekw.keywords:
    91             templatekeyword = registrar.templatekeyword(templatekw.keywords)
    91             templatekeyword = registrar.templatekeyword(templatekw.keywords)
    92             @templatekeyword(namespace.name)
    92             @templatekeyword(namespace.name, requires={'repo', 'ctx', 'templ'})
    93             def generatekw(**args):
    93             def generatekw(context, mapping):
    94                 return templatekw.shownames(namespace.name, **args)
    94                 return templatekw.shownames(context, mapping, namespace.name)
    95 
    95 
    96     def singlenode(self, repo, name):
    96     def singlenode(self, repo, name):
    97         """
    97         """
    98         Return the 'best' node for the given name. Best means the first node
    98         Return the 'best' node for the given name. Best means the first node
    99         in the first nonempty list returned by a name-to-nodes mapping function
    99         in the first nonempty list returned by a name-to-nodes mapping function