Show More
@@ -505,6 +505,7 b' class chgcmdserver(commandserver.server)' | |||||
505 | """ |
|
505 | """ | |
506 | args = self._readlist() |
|
506 | args = self._readlist() | |
507 | errorraised = False |
|
507 | errorraised = False | |
|
508 | detailed_exit_code = 255 | |||
508 | try: |
|
509 | try: | |
509 | self.ui, lui = _loadnewui(self.ui, args, self.cdebug) |
|
510 | self.ui, lui = _loadnewui(self.ui, args, self.cdebug) | |
510 | except error.RepoError as inst: |
|
511 | except error.RepoError as inst: | |
@@ -515,12 +516,17 b' class chgcmdserver(commandserver.server)' | |||||
515 | self.ui.error(_(b"(%s)\n") % inst.hint) |
|
516 | self.ui.error(_(b"(%s)\n") % inst.hint) | |
516 | errorraised = True |
|
517 | errorraised = True | |
517 | except error.Abort as inst: |
|
518 | except error.Abort as inst: | |
|
519 | if isinstance(inst, error.InputError): | |||
|
520 | detailed_exit_code = 10 | |||
518 | self.ui.error(inst.format()) |
|
521 | self.ui.error(inst.format()) | |
519 | errorraised = True |
|
522 | errorraised = True | |
520 |
|
523 | |||
521 | if errorraised: |
|
524 | if errorraised: | |
522 | self.ui.flush() |
|
525 | self.ui.flush() | |
523 | self.cresult.write(b'exit 255') |
|
526 | exit_code = 255 | |
|
527 | if self.ui.configbool(b'ui', b'detailed-exit-code'): | |||
|
528 | exit_code = detailed_exit_code | |||
|
529 | self.cresult.write(b'exit %d' % exit_code) | |||
524 | return |
|
530 | return | |
525 | newhash = hashstate.fromui(lui, self.hashstate.mtimepaths) |
|
531 | newhash = hashstate.fromui(lui, self.hashstate.mtimepaths) | |
526 | insts = [] |
|
532 | insts = [] |
General Comments 0
You need to be logged in to leave comments.
Login now