diff contrib/hg-ssh @ 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 831ebc408ffb
children
line wrap: on
line diff
--- a/contrib/hg-ssh
+++ b/contrib/hg-ssh
@@ -25,6 +25,9 @@ You can use pattern matching of your nor
 command="cd repos && hg-ssh user/thomas/* projects/{mercurial,foo}"
 """
 
+# enable importing on demand to reduce startup time
+from mercurial import demandimport; demandimport.enable()
+
 from mercurial import dispatch
 
 import sys, os