##// END OF EJS Templates
chgserver: catch RepoError while loading configuration...
Pulkit Goyal -
r46616:aab70f05 default
parent child Browse files
Show More
@@ -504,10 +504,21 b' class chgcmdserver(commandserver.server)'
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
General Comments 0
You need to be logged in to leave comments. Login now