mercurial/commands.py
changeset 262 3db700146536
parent 259 45c293b71341
child 264 4c1d7072d5cd
--- 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