comparison mercurial/hgweb/hgwebdir_mod.py @ 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 79373ec3f27d
children 05889b6b1468
comparison
equal deleted inserted replaced
5196:86e95b93559a 5197:55860a45bbf2
4 # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> 4 # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
5 # 5 #
6 # This software may be used and distributed according to the terms 6 # This software may be used and distributed according to the terms
7 # of the GNU General Public License, incorporated herein by reference. 7 # of the GNU General Public License, incorporated herein by reference.
8 8
9 from mercurial import demandimport; demandimport.enable()
10 import os, mimetools, cStringIO 9 import os, mimetools, cStringIO
11 from mercurial.i18n import gettext as _ 10 from mercurial.i18n import gettext as _
12 from mercurial import ui, hg, util, templater 11 from mercurial import ui, hg, util, templater
13 from common import get_mtime, staticfile, style_map, paritygen 12 from common import get_mtime, staticfile, style_map, paritygen
14 from hgweb_mod import hgweb 13 from hgweb_mod import hgweb