mercurial/wireprotoserver.py
changeset 48946 642e31cb55f0
parent 48875 6000f5b25c9b
child 49284 d44e3c45f0e4
equal deleted inserted replaced
48945:55d132525155 48946:642e31cb55f0
    54 
    54 
    55     return b''.join(chunks)
    55     return b''.join(chunks)
    56 
    56 
    57 
    57 
    58 @interfaceutil.implementer(wireprototypes.baseprotocolhandler)
    58 @interfaceutil.implementer(wireprototypes.baseprotocolhandler)
    59 class httpv1protocolhandler(object):
    59 class httpv1protocolhandler:
    60     def __init__(self, req, ui, checkperm):
    60     def __init__(self, req, ui, checkperm):
    61         self._req = req
    61         self._req = req
    62         self._ui = ui
    62         self._ui = ui
    63         self._checkperm = checkperm
    63         self._checkperm = checkperm
    64         self._protocaps = None
    64         self._protocaps = None
   372     fout.write(b'\n')
   372     fout.write(b'\n')
   373     fout.flush()
   373     fout.flush()
   374 
   374 
   375 
   375 
   376 @interfaceutil.implementer(wireprototypes.baseprotocolhandler)
   376 @interfaceutil.implementer(wireprototypes.baseprotocolhandler)
   377 class sshv1protocolhandler(object):
   377 class sshv1protocolhandler:
   378     """Handler for requests services via version 1 of SSH protocol."""
   378     """Handler for requests services via version 1 of SSH protocol."""
   379 
   379 
   380     def __init__(self, ui, fin, fout):
   380     def __init__(self, ui, fin, fout):
   381         self._ui = ui
   381         self._ui = ui
   382         self._fin = fin
   382         self._fin = fin
   518             raise error.ProgrammingError(
   518             raise error.ProgrammingError(
   519                 b'unhandled ssh server state: %s' % state
   519                 b'unhandled ssh server state: %s' % state
   520             )
   520             )
   521 
   521 
   522 
   522 
   523 class sshserver(object):
   523 class sshserver:
   524     def __init__(self, ui, repo, logfh=None):
   524     def __init__(self, ui, repo, logfh=None):
   525         self._ui = ui
   525         self._ui = ui
   526         self._repo = repo
   526         self._repo = repo
   527         self._fin, self._fout = ui.protectfinout()
   527         self._fin, self._fout = ui.protectfinout()
   528 
   528