Mercurial > hg
comparison mercurial/namespaces.py @ 44728:59ad165f6cdb
templatekw: fix shownames() to check if namespace exists in repo (issue6301)
Namespace registration is dynamic, but the corresponding template keyword
is registered statically.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 16 Apr 2020 22:30:11 +0900 |
parents | d783f945a701 |
children | 6000f5b25c9b |
comparison
equal
deleted
inserted
replaced
44727:694d40416d62 | 44728:59ad165f6cdb |
---|---|
81 return self._names[namespace] | 81 return self._names[namespace] |
82 | 82 |
83 def __iter__(self): | 83 def __iter__(self): |
84 return self._names.__iter__() | 84 return self._names.__iter__() |
85 | 85 |
86 def get(self, namespace, default=None): | |
87 return self._names.get(namespace, default) | |
88 | |
86 def items(self): | 89 def items(self): |
87 return pycompat.iteritems(self._names) | 90 return pycompat.iteritems(self._names) |
88 | 91 |
89 iteritems = items | 92 iteritems = items |
90 | 93 |