comparison 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
comparison
equal deleted inserted replaced
5196:86e95b93559a 5197:55860a45bbf2
23 23
24 You can use pattern matching of your normal shell, e.g.: 24 You can use pattern matching of your normal shell, e.g.:
25 command="cd repos && hg-ssh user/thomas/* projects/{mercurial,foo}" 25 command="cd repos && hg-ssh user/thomas/* projects/{mercurial,foo}"
26 """ 26 """
27 27
28 # enable importing on demand to reduce startup time
29 from mercurial import demandimport; demandimport.enable()
30
28 from mercurial import dispatch 31 from mercurial import dispatch
29 32
30 import sys, os 33 import sys, os
31 34
32 cwd = os.getcwd() 35 cwd = os.getcwd()