Mercurial > public > mercurial-scm > hg
comparison mercurial/extensions.py @ 13349:0d3f35394af4
extensions: add an ignore list for old extensions
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 10 Feb 2011 13:46:27 -0600 |
parents | 1aea66b71f4f |
children | d4ab9486e514 |
comparison
equal
deleted
inserted
replaced
13348:31fdb04cb5e8 | 13349:0d3f35394af4 |
---|---|
9 import util, cmdutil, help, error | 9 import util, cmdutil, help, error |
10 from i18n import _, gettext | 10 from i18n import _, gettext |
11 | 11 |
12 _extensions = {} | 12 _extensions = {} |
13 _order = [] | 13 _order = [] |
14 _ignore = ['hbisect'] | |
14 | 15 |
15 def extensions(): | 16 def extensions(): |
16 for name in _order: | 17 for name in _order: |
17 module = _extensions[name] | 18 module = _extensions[name] |
18 if module: | 19 if module: |
43 # unused ui argument kept for backwards compatibility | 44 # unused ui argument kept for backwards compatibility |
44 if name.startswith('hgext.') or name.startswith('hgext/'): | 45 if name.startswith('hgext.') or name.startswith('hgext/'): |
45 shortname = name[6:] | 46 shortname = name[6:] |
46 else: | 47 else: |
47 shortname = name | 48 shortname = name |
49 if shortname in _ignore: | |
50 return None | |
48 if shortname in _extensions: | 51 if shortname in _extensions: |
49 return _extensions[shortname] | 52 return _extensions[shortname] |
50 _extensions[shortname] = None | 53 _extensions[shortname] = None |
51 if path: | 54 if path: |
52 # the module will be loaded in sys.modules | 55 # the module will be loaded in sys.modules |