Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/demandimport.py @ 4626:eb99af2d845e
Fix for demandimport.py and Windows compiled version.
From Shun-ichi Goto in BTS issue 457 http://www.selenic.com/mercurial/bts/msg2780
author | Lee Cantey <lcantey@gmail.com> |
---|---|
date | Mon, 18 Jun 2007 15:03:55 -0700 |
parents | b9dcee25be8e |
children | e3afa670e484 |
line wrap: on
line diff
--- a/mercurial/demandimport.py +++ b/mercurial/demandimport.py @@ -96,6 +96,8 @@ def _demandimport(name, globals=None, lo mod = _origimport(name, globals, locals) # recurse down the module chain for comp in name.split('.')[1:]: + if not hasattr(mod, comp): + setattr(mod, comp, _demandmod(comp, mod.__dict__, mod.__dict__)) mod = getattr(mod, comp) for x in fromlist: # set requested submodules for demand load