##// END OF EJS Templates
templatekw: get rid of temporary dicts from shownamespaces()
Yuya Nishihara -
r34541:1c7c4445 default
parent child Browse files
Show More
@@ -618,13 +618,9 b' def shownamespaces(**args):'
618 repo = ctx.repo()
618 repo = ctx.repo()
619
619
620 namespaces = util.sortdict()
620 namespaces = util.sortdict()
621 colornames = {}
622 builtins = {}
623
621
624 for k, ns in repo.names.iteritems():
622 for k, ns in repo.names.iteritems():
625 namespaces[k] = showlist('name', ns.names(repo, ctx.node()), args)
623 namespaces[k] = showlist('name', ns.names(repo, ctx.node()), args)
626 colornames[k] = ns.colorname
627 builtins[k] = ns.builtin
628
624
629 f = _showlist('namespace', list(namespaces), args)
625 f = _showlist('namespace', list(namespaces), args)
630
626
@@ -632,8 +628,8 b' def shownamespaces(**args):'
632 return {
628 return {
633 'namespace': ns,
629 'namespace': ns,
634 'names': namespaces[ns],
630 'names': namespaces[ns],
635 'builtin': builtins[ns],
631 'builtin': repo.names[ns].builtin,
636 'colorname': colornames[ns],
632 'colorname': repo.names[ns].colorname,
637 }
633 }
638
634
639 return _hybrid(f, namespaces, makemap, pycompat.identity)
635 return _hybrid(f, namespaces, makemap, pycompat.identity)
General Comments 0
You need to be logged in to leave comments. Login now