--- a/mercurial/templatekw.py Mon Sep 18 23:53:05 2017 +0900
+++ b/mercurial/templatekw.py Sat Sep 30 08:50:24 2017 +0100
@@ -618,13 +618,9 @@
repo = ctx.repo()
namespaces = util.sortdict()
- colornames = {}
- builtins = {}
for k, ns in repo.names.iteritems():
namespaces[k] = showlist('name', ns.names(repo, ctx.node()), args)
- colornames[k] = ns.colorname
- builtins[k] = ns.builtin
f = _showlist('namespace', list(namespaces), args)
@@ -632,8 +628,8 @@
return {
'namespace': ns,
'names': namespaces[ns],
- 'builtin': builtins[ns],
- 'colorname': colornames[ns],
+ 'builtin': repo.names[ns].builtin,
+ 'colorname': repo.names[ns].colorname,
}
return _hybrid(f, namespaces, makemap, pycompat.identity)