mercurial/chgserver.py
changeset 46001 aab70f05d6ec
parent 45887 7eb221b9af6c
child 46113 59fa3890d40a
equal deleted inserted replaced
46000:c1bb02738f96 46001:aab70f05d6ec
   502         If neither "reconnect" nor "redirect" is included in the instruction
   502         If neither "reconnect" nor "redirect" is included in the instruction
   503         list, the client can continue with this server after completing all
   503         list, the client can continue with this server after completing all
   504         the instructions.
   504         the instructions.
   505         """
   505         """
   506         args = self._readlist()
   506         args = self._readlist()
       
   507         errorraised = False
   507         try:
   508         try:
   508             self.ui, lui = _loadnewui(self.ui, args, self.cdebug)
   509             self.ui, lui = _loadnewui(self.ui, args, self.cdebug)
       
   510         except error.RepoError as inst:
       
   511             # RepoError can be raised while trying to read shared source
       
   512             # configuration
       
   513             self.ui.error(_(b"abort: %s\n") % stringutil.forcebytestr(inst))
       
   514             if inst.hint:
       
   515                 self.ui.error(_(b"(%s)\n") % inst.hint)
       
   516             errorraised = True
   509         except error.Abort as inst:
   517         except error.Abort as inst:
   510             self.ui.error(inst.format())
   518             self.ui.error(inst.format())
       
   519             errorraised = True
       
   520 
       
   521         if errorraised:
   511             self.ui.flush()
   522             self.ui.flush()
   512             self.cresult.write(b'exit 255')
   523             self.cresult.write(b'exit 255')
   513             return
   524             return
   514         newhash = hashstate.fromui(lui, self.hashstate.mtimepaths)
   525         newhash = hashstate.fromui(lui, self.hashstate.mtimepaths)
   515         insts = []
   526         insts = []