##// END OF EJS Templates
commandserver: cut import cycle by itself...
Yuya Nishihara -
r27352:9fd8f155 default
parent child Browse files
Show More
@@ -23,6 +23,7 b' import setdiscovery, treediscovery, dagu'
23 import phases, obsolete, exchange, bundle2, repair, lock as lockmod
23 import phases, obsolete, exchange, bundle2, repair, lock as lockmod
24 import ui as uimod
24 import ui as uimod
25 import streamclone
25 import streamclone
26 import commandserver
26
27
27 table = {}
28 table = {}
28
29
@@ -6184,7 +6185,6 b' def serve(ui, repo, **opts):'
6184 s.serve_forever()
6185 s.serve_forever()
6185
6186
6186 if opts["cmdserver"]:
6187 if opts["cmdserver"]:
6187 import commandserver
6188 service = commandserver.createservice(ui, repo, opts)
6188 service = commandserver.createservice(ui, repo, opts)
6189 else:
6189 else:
6190 service = hgweb.createservice(ui, repo, opts)
6190 service = hgweb.createservice(ui, repo, opts)
@@ -16,7 +16,6 b' import traceback'
16
16
17 from .i18n import _
17 from .i18n import _
18 from . import (
18 from . import (
19 dispatch,
20 encoding,
19 encoding,
21 error,
20 error,
22 util,
21 util,
@@ -186,6 +185,7 b' class server(object):'
186 def runcommand(self):
185 def runcommand(self):
187 """ reads a list of \0 terminated arguments, executes
186 """ reads a list of \0 terminated arguments, executes
188 and writes the return code to the result channel """
187 and writes the return code to the result channel """
188 from . import dispatch # avoid cycle
189
189
190 length = struct.unpack('>I', self._read(4))[0]
190 length = struct.unpack('>I', self._read(4))[0]
191 if not length:
191 if not length:
General Comments 0
You need to be logged in to leave comments. Login now