Mercurial > hg > mercurial-crew-with-dirclash
diff hg @ 5197:55860a45bbf2
Enable demandimport only in scripts, not in importable modules (issue605)
This way other applications can choose if and when they want this feature,
because it might be problematic if those applications rely on ImportError.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sat, 18 Aug 2007 11:37:08 +0200 |
parents | 18a9fbb5cd78 |
children |
line wrap: on
line diff
--- a/hg +++ b/hg @@ -7,5 +7,8 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. +# enable importing on demand to reduce startup time +from mercurial import demandimport; demandimport.enable() + import mercurial.dispatch mercurial.dispatch.run()