[PATCH] extensions: rename _ignore to _builtin, add descriptive comment

Augie Fackler raf at durin42.com
Tue Nov 24 17:51:56 CST 2015


On Tue, Nov 24, 2015 at 02:22:31PM -0800, Bryan O'Sullivan wrote:
> # HG changeset patch
> # User Bryan O'Sullivan <bos at serpentine.com>
> # Date 1448403748 28800
> #      Tue Nov 24 14:22:28 2015 -0800
> # Node ID 13ea495874193443b27f11435b1a313ddd82ed71
> # Parent  c14247bb084c0d448e86fb59631eabf90e6a2277
> extensions: rename _ignore to _builtin, add descriptive comment

+1 from me, but I'll not take it since it doesn't apply without the
pager-in-core patch.

>
> It was previously not at all obvious what this was for.
>
> diff --git a/mercurial/extensions.py b/mercurial/extensions.py
> --- a/mercurial/extensions.py
> +++ b/mercurial/extensions.py
> @@ -24,8 +24,9 @@ from . import (
>  _extensions = {}
>  _aftercallbacks = {}
>  _order = []
> -_ignore = set(['hbisect', 'bookmarks', 'parentrevspec', 'pager', 'interhg',
> -               'inotify'])
> +# former extensions now in core - we ignore these if found in hgrc
> +_builtin = set(['hbisect', 'bookmarks', 'parentrevspec', 'pager', 'interhg',
> +                'inotify'])
>
>  def extensions(ui=None):
>      if ui:
> @@ -76,7 +77,7 @@ def load(ui, name, path):
>          shortname = name[6:]
>      else:
>          shortname = name
> -    if shortname in _ignore:
> +    if shortname in _builtin:
>          return None
>      if shortname in _extensions:
>          return _extensions[shortname]
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list