diff --git a/mercurial/namespaces.py b/mercurial/namespaces.py --- a/mercurial/namespaces.py +++ b/mercurial/namespaces.py @@ -1,5 +1,6 @@ from i18n import _ from mercurial import util +import templatekw def tolist(val): """ @@ -74,6 +75,13 @@ class namespaces(object): else: self._names[namespace] = val + # we only generate a template keyword if one does not already exist + if namespace not in templatekw.keywords: + def generatekw(**args): + return templatekw.shownames(namespace, **args) + + templatekw.keywords[namespace] = generatekw + def singlenode(self, repo, name): """ Return the 'best' node for the given name. Best means the first node