[PATCH 4 of 6] namespaces: record and expose whether namespace is built-in

Yuya Nishihara yuya at tcha.org
Sun Jun 25 07:31:33 EDT 2017


On Sat, 24 Jun 2017 15:13:50 -0700, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1498341135 25200
> #      Sat Jun 24 14:52:15 2017 -0700
> # Node ID 009938bcc518c07b8a077b28e6df01bae66de4fa
> # Parent  3839334c22d631b956b036130387585c04f3b747
> namespaces: record and expose whether namespace is built-in

Queued the series, thanks.

I have no expertise about the namespace, so CCed Sean.

>      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)
>  
> @@ -568,6 +570,7 @@ def shownamespaces(**args):
>          return {
>              'namespace': ns,
>              'names': namespaces[ns],
> +            'builtin': builtins[ns],
>              'colorname': colornames[ns],

Nit: these can simply be repo.names[ns].builtin and .colorname.


More information about the Mercurial-devel mailing list