Mercurial > hg > mercurial-crew-with-dirclash
view mercurial/demandload.py @ 558:0ceea19182a9
transaction: __del__ should do nothing if the journal already exists
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
transaction: __del__ should do nothing if the journal already exists
manifest hash: c85f747ca762b7c446d306cbd7a20f8e566557fb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCxXbTywK+sNU5EO8RAvjsAKCcTSzN9OjtoAdaZgtjDs9380ia7ACfcXsx
FcNESqr4nX9b97WTGszJs48=
=C2sL
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Fri, 01 Jul 2005 09:01:07 -0800 |
parents | 3db700146536 |
children | f3abe0bdccdd |
line wrap: on
line source
def demandload(scope, modules): class d: def __getattr__(self, name): mod = self.__dict__["mod"] scope = self.__dict__["scope"] scope[mod] = __import__(mod, scope, scope, []) return getattr(scope[mod], name) for m in modules.split(): dl = d() dl.mod = m dl.scope = scope scope[m] = dl