mercurial/extensions.py
branchstable
changeset 24950 e6e7d1cce04d
parent 24734 fb6cb1b82f4f
child 25364 de23a552fc23
equal deleted inserted replaced
24949:890845af1ac2 24950:e6e7d1cce04d
   131         if shortname in _extensions:
   131         if shortname in _extensions:
   132             continue
   132             continue
   133 
   133 
   134         for fn in _aftercallbacks[shortname]:
   134         for fn in _aftercallbacks[shortname]:
   135             fn(loaded=False)
   135             fn(loaded=False)
       
   136 
       
   137     # loadall() is called multiple times and lingering _aftercallbacks
       
   138     # entries could result in double execution. See issue4646.
       
   139     _aftercallbacks.clear()
   136 
   140 
   137 def afterloaded(extension, callback):
   141 def afterloaded(extension, callback):
   138     '''Run the specified function after a named extension is loaded.
   142     '''Run the specified function after a named extension is loaded.
   139 
   143 
   140     If the named extension is already loaded, the callback will be called
   144     If the named extension is already loaded, the callback will be called