When importing mercurial.commands or mercurial.hgweb.hgwebdir_mod demandimport
is automatically activated, but not for many other modules.
This is not consistent, e.g. for hgweb.cgi or other tools importing parts of
mercurial.
My suggestion:
Add "import mercurial.demandimport; mercurial.demandimport.enable()" to the hg
and cgi scripts and let other applications decide for themselves whether they
want to use it or not.
Currently even our own setup.py uses
mercurial.demandimport.enable = lambda: None
to disable it ... |