##// END OF EJS Templates
Minor hgweb fixup for new diff code...
Minor hgweb fixup for new diff code -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Minor hgweb fixup for new diff code manifest hash: a80a817fa1511c6ea76f07b2e03691539c19de55 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCxO7lywK+sNU5EO8RArAkAJ49Piw1lKwhno5XtTdE0J2B3KIeJQCgpeZW JbFuy/zzo2e45xu6Uez8CMw= =sQOB -----END PGP SIGNATURE-----

File last commit:

r262:3db70014 default
r539:44b29b98 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