Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 262:3db700146536
implement demand loading hack
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
implement demand loading hack
This attempts to speed up start-up times without pushing imports down
into local scopes.
manifest hash: f9c18897e67f7872b44f5c89bdde00edfc3628ce
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCo0kHywK+sNU5EO8RAg5HAKCxRKAz3FXDyv4wScq1ZbwTgfPa2gCfW9K+
dg5nC3Uvp4FilP8waF6liAY=
=dolF
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Sun, 05 Jun 2005 10:48:39 -0800 |
parents | 45c293b71341 |
children | 4c1d7072d5cd |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Jun 05 10:42:52 2005 -0800 +++ b/mercurial/commands.py Sun Jun 05 10:48:39 2005 -0800 @@ -5,8 +5,10 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -import os, re, sys, signal, time, mdiff -from mercurial import fancyopts, ui, hg +import os, re, sys, signal +import fancyopts, ui, hg +from demandload import * +demandload(globals(), "mdiff time hgweb traceback") class UnknownCommand(Exception): pass @@ -397,7 +399,6 @@ def serve(ui, repo, **opts): """export the repository via HTTP""" - from mercurial import hgweb hgweb.server(repo.root, opts["name"], opts["templates"], opts["address"], opts["port"]) @@ -594,7 +595,6 @@ else: raise except TypeError, inst: - import traceback # was this an argument error? tb = traceback.extract_tb(sys.exc_info()[2]) if len(tb) > 2: # no