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 46293a0c7e9f
line wrap: on
line diff
--- a/contrib/hg-ssh	Fri Aug 17 23:20:13 2007 -0300
+++ b/contrib/hg-ssh	Sat Aug 18 11:37:08 2007 +0200
@@ -25,6 +25,9 @@
 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