Mercurial > hg-stable
changeset 27111:9de814b35808
extensions: rename _ignore to _builtin, add descriptive comment
It was previously not at all obvious what this was for.
We also change it to a set to avoid iterating over an admittedly
small list repeatedly at startup time.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue, 24 Nov 2015 16:38:54 -0800 |
parents | f04bd381e8c0 |
children | 39c14e89b881 |
files | mercurial/extensions.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/extensions.py Sun Nov 22 14:44:55 2015 -0800 +++ b/mercurial/extensions.py Tue Nov 24 16:38:54 2015 -0800 @@ -24,7 +24,8 @@ _extensions = {} _aftercallbacks = {} _order = [] -_ignore = ['hbisect', 'bookmarks', 'parentrevspec', 'interhg', 'inotify'] +# former extensions now in core - we ignore these if found in hgrc +_builtin = set(['hbisect', 'bookmarks', 'parentrevspec', 'interhg', 'inotify']) def extensions(ui=None): if ui: @@ -75,7 +76,7 @@ shortname = name[6:] else: shortname = name - if shortname in _ignore: + if shortname in _builtin: return None if shortname in _extensions: return _extensions[shortname]