mercurial/extensions.py
changeset 5130 b3cc62268a91
parent 4635 63b9d2deed48
child 5131 3edd6fedc33a
child 5132 1fd3248b8aa4
equal deleted inserted replaced
5128:86cd6fd61042 5130:b3cc62268a91
    22         raise KeyError(name)
    22         raise KeyError(name)
    23 
    23 
    24 def load(ui, name, path):
    24 def load(ui, name, path):
    25     if name in _extensions:
    25     if name in _extensions:
    26         return
    26         return
       
    27     _extensions[shortname] = None
    27     if path:
    28     if path:
    28         # the module will be loaded in sys.modules
    29         # the module will be loaded in sys.modules
    29         # choose an unique name so that it doesn't
    30         # choose an unique name so that it doesn't
    30         # conflicts with other modules
    31         # conflicts with other modules
    31         module_name = "hgext_%s" % name.replace('.', '_')
    32         module_name = "hgext_%s" % name.replace('.', '_')