rewrite demandload module

Vadim Gelfer vadim.gelfer at gmail.com
Fri Mar 3 16:57:31 UTC 2006


i have put change in crew that rewrites demandload module.

original demandload module only let you import simple python modules:

  import foo, bar -> demandload(globals(), "foo bar")

new demandload module is nicer. it lets you use demandload to replace
these python statements now:

  import foo.bar.baz  ->  demandload(globals(), "foo.bar.baz")
  from foo.bar import quux, zot  ->  demandload(globals(), "foo.bar:quux,zot")

speed is same as before, tested hundreds of times on commands that
should be fast. documentation is much better (old demandload had no
documentation at all).




More information about the Mercurial mailing list