##// END OF EJS Templates
revlog: add a children function...
revlog: add a children function -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 revlog: add a children function manifest hash: eda39cb99d0df5b3262d97a9e161a8acceb1da3d -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCsPZ0ywK+sNU5EO8RAiAcAJ9D+y8zQ/Gai7CpTkfTamPFxmvVRACcDRv9 5HkupYyrxslGnGJpELaF1is= =zf1d -----END PGP SIGNATURE-----

File last commit:

r262:3db70014 default
r370:c90385d8 default
Show More
demandload.py
15 lines | 384 B | text/x-python | PythonLexer
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