##// END OF EJS Templates
extensions: don't get confused by aliasing between "foo" and "hgext.foo"
Bryan O'Sullivan -
r5031:af099526 default
parent child Browse files
Show More
@@ -24,7 +24,11 b' def find(name):'
24 raise KeyError(name)
24 raise KeyError(name)
25
25
26 def load(ui, name, path):
26 def load(ui, name, path):
27 if name in _extensions:
27 if name.startswith('hgext.'):
28 shortname = name[6:]
29 else:
30 shortname = name
31 if shortname in _extensions:
28 return
32 return
29 if path:
33 if path:
30 # the module will be loaded in sys.modules
34 # the module will be loaded in sys.modules
@@ -49,7 +53,7 b' def load(ui, name, path):'
49 mod = importh("hgext.%s" % name)
53 mod = importh("hgext.%s" % name)
50 except ImportError:
54 except ImportError:
51 mod = importh(name)
55 mod = importh(name)
52 _extensions[name] = mod
56 _extensions[shortname] = mod
53
57
54 uisetup = getattr(mod, 'uisetup', None)
58 uisetup = getattr(mod, 'uisetup', None)
55 if uisetup:
59 if uisetup:
General Comments 0
You need to be logged in to leave comments. Login now