# HG changeset patch # User Thomas Arendsen Hein # Date 1186079745 -7200 # Node ID 12a9aa0888ba7f173be1d9c33ef3f56fc4f0c059 # Parent 56ee6438977d7c857c08d80b4a38d129d7ca3e16 Workaround for circular imports if demandimport is disabled (issue605) diff -r 56ee6438977d -r 12a9aa0888ba mercurial/commands.py --- a/mercurial/commands.py Thu Jun 28 16:32:37 2007 +0200 +++ b/mercurial/commands.py Thu Aug 02 20:35:45 2007 +0200 @@ -11,7 +11,7 @@ import ui, hg, util, revlog, bundlerepo, import ui, hg, util, revlog, bundlerepo, extensions import difflib, patch, time, help, mdiff, tempfile import errno, version, socket -import archival, changegroup, cmdutil, hgweb.server, sshserver +import archival, changegroup, cmdutil, sshserver # Commands start here, listed alphabetically @@ -2478,6 +2478,7 @@ def serve(ui, repo, **opts): def init(self): util.set_signal_handler() try: + import hgweb.server #FIXME self.httpd = hgweb.server.create_server(parentui, repo) except socket.error, inst: raise util.Abort(_('cannot start server: ') + inst.args[1]) diff -r 56ee6438977d -r 12a9aa0888ba mercurial/extensions.py --- a/mercurial/extensions.py Thu Jun 28 16:32:37 2007 +0200 +++ b/mercurial/extensions.py Thu Aug 02 20:35:45 2007 +0200 @@ -6,7 +6,7 @@ # of the GNU General Public License, incorporated herein by reference. import imp, os -import commands, hg, util, sys +import hg, util, sys from i18n import _ _extensions = {} @@ -22,6 +22,7 @@ def find(name): raise KeyError(name) def load(ui, name, path): + import commands # FIXME if name in _extensions: return if path: