# HG changeset patch # User Bryan O'Sullivan # Date 2015-11-25 00:38:54 # Node ID 9de814b35808827d55980a438be18a2846612b13 # Parent f04bd381e8c09a5d42bac305fc9fee51a924ce71 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. diff --git a/mercurial/extensions.py b/mercurial/extensions.py --- a/mercurial/extensions.py +++ b/mercurial/extensions.py @@ -24,7 +24,8 @@ from . import ( _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 @@ 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]