# HG changeset patch # User Gregory Szorc # Date 1439069439 25200 # Node ID a0847285d207a5359fc21c96927b0a6973f97d6f # Parent 221491bbaf7e82e4453e17e086bfb44591b76f8a commands: break import cycle This was the easiest link in the chain to break as there was only one use of commandserver in commands.py. Other files had multiple users. diff -r 221491bbaf7e -r a0847285d207 mercurial/commands.py --- a/mercurial/commands.py Sat Aug 08 00:47:19 2015 -0700 +++ b/mercurial/commands.py Sat Aug 08 14:30:39 2015 -0700 @@ -13,7 +13,7 @@ import hg, scmutil, util, revlog, copies, error, bookmarks import patch, help, encoding, templatekw, discovery import archival, changegroup, cmdutil, hbisect -import sshserver, hgweb, commandserver +import sshserver, hgweb import extensions from hgweb import server as hgweb_server import merge as mergemod @@ -5713,6 +5713,7 @@ s.serve_forever() if opts["cmdserver"]: + import commandserver service = commandserver.createservice(ui, repo, opts) return cmdutil.service(opts, initfn=service.init, runfn=service.run) diff -r 221491bbaf7e -r a0847285d207 tests/test-module-imports.t --- a/tests/test-module-imports.t Sat Aug 08 00:47:19 2015 -0700 +++ b/tests/test-module-imports.t Sat Aug 08 14:30:39 2015 -0700 @@ -128,5 +128,4 @@ stdlib: formatter relative: config, error, progress, scmutil, util Import cycle: hgext.largefiles.basestore -> hgext.largefiles.localstore -> hgext.largefiles.basestore - Import cycle: mercurial.commands -> mercurial.commandserver -> mercurial.dispatch -> mercurial.commands [1]