# HG changeset patch # User Bryan O'Sullivan # Date 2007-07-30 21:53:03 # Node ID af0995261f021f46c2fa9635e2eed90a5dcc7160 # Parent c89671c3b062875258b22e673c8d7120dbe5cafe extensions: don't get confused by aliasing between "foo" and "hgext.foo" diff --git a/mercurial/extensions.py b/mercurial/extensions.py --- a/mercurial/extensions.py +++ b/mercurial/extensions.py @@ -24,7 +24,11 @@ def find(name): raise KeyError(name) def load(ui, name, path): - if name in _extensions: + if name.startswith('hgext.'): + shortname = name[6:] + else: + shortname = name + if shortname in _extensions: return if path: # the module will be loaded in sys.modules @@ -49,7 +53,7 @@ def load(ui, name, path): mod = importh("hgext.%s" % name) except ImportError: mod = importh(name) - _extensions[name] = mod + _extensions[shortname] = mod uisetup = getattr(mod, 'uisetup', None) if uisetup: