##// END OF EJS Templates
chgserver: pass hashstate and base server address to chgcmdserver...
Jun Wu -
r28328:e00e57d8 default
parent child Browse files
Show More
@@ -334,11 +334,13 class channeledsystem(object):
334 ]
334 ]
335
335
336 class chgcmdserver(commandserver.server):
336 class chgcmdserver(commandserver.server):
337 def __init__(self, ui, repo, fin, fout, sock):
337 def __init__(self, ui, repo, fin, fout, sock, hashstate, baseaddress):
338 super(chgcmdserver, self).__init__(
338 super(chgcmdserver, self).__init__(
339 _newchgui(ui, channeledsystem(fin, fout, 'S')), repo, fin, fout)
339 _newchgui(ui, channeledsystem(fin, fout, 'S')), repo, fin, fout)
340 self.clientsock = sock
340 self.clientsock = sock
341 self._oldios = [] # original (self.ch, ui.fp, fd) before "attachio"
341 self._oldios = [] # original (self.ch, ui.fp, fd) before "attachio"
342 self.hashstate = hashstate
343 self.baseaddress = baseaddress
342
344
343 def cleanup(self):
345 def cleanup(self):
344 # dispatch._runcatch() does not flush outputs if exception is not
346 # dispatch._runcatch() does not flush outputs if exception is not
@@ -493,7 +495,8 class _requesthandler(SocketServer.Strea
493 os.setpgid(0, 0)
495 os.setpgid(0, 0)
494 ui = self.server.ui
496 ui = self.server.ui
495 repo = self.server.repo
497 repo = self.server.repo
496 sv = chgcmdserver(ui, repo, self.rfile, self.wfile, self.connection)
498 sv = chgcmdserver(ui, repo, self.rfile, self.wfile, self.connection,
499 self.server.hashstate, self.server.baseaddress)
497 try:
500 try:
498 try:
501 try:
499 sv.serve()
502 sv.serve()
@@ -588,6 +591,8 class chgunixservice(commandserver.unixs
588 SocketServer.UnixStreamServer):
591 SocketServer.UnixStreamServer):
589 ui = self.ui
592 ui = self.ui
590 repo = self.repo
593 repo = self.repo
594 hashstate = self.hashstate
595 baseaddress = self.baseaddress
591 self.server = cls(self.address, _requesthandler)
596 self.server = cls(self.address, _requesthandler)
592 self.server.idletimeout = self.ui.configint(
597 self.server.idletimeout = self.ui.configint(
593 'chgserver', 'idletimeout', self.server.idletimeout)
598 'chgserver', 'idletimeout', self.server.idletimeout)
General Comments 0
You need to be logged in to leave comments. Login now