mercurial/sshserver.py
changeset 12703 40bb5853fc4b
parent 12337 6a6149487817
child 13719 cc9bf81382f5
equal deleted inserted replaced
12702:f747c085b789 12703:40bb5853fc4b
    77 
    77 
    78     def sendpushresponse(self, rsp):
    78     def sendpushresponse(self, rsp):
    79         self.sendresponse('')
    79         self.sendresponse('')
    80         self.sendresponse(str(rsp.res))
    80         self.sendresponse(str(rsp.res))
    81 
    81 
       
    82     def sendpusherror(self, rsp):
       
    83         self.sendresponse(rsp.res)
       
    84 
    82     def serve_forever(self):
    85     def serve_forever(self):
    83         try:
    86         try:
    84             while self.serve_one():
    87             while self.serve_one():
    85                 pass
    88                 pass
    86         finally:
    89         finally:
    90 
    93 
    91     handlers = {
    94     handlers = {
    92         str: sendresponse,
    95         str: sendresponse,
    93         wireproto.streamres: sendstream,
    96         wireproto.streamres: sendstream,
    94         wireproto.pushres: sendpushresponse,
    97         wireproto.pushres: sendpushresponse,
       
    98         wireproto.pusherr: sendpusherror,
    95     }
    99     }
    96 
   100 
    97     def serve_one(self):
   101     def serve_one(self):
    98         cmd = self.fin.readline()[:-1]
   102         cmd = self.fin.readline()[:-1]
    99         if cmd and cmd in wireproto.commands:
   103         if cmd and cmd in wireproto.commands: