diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -306,7 +306,10 @@ except IOError as inst: if inst.errno != errno.EPIPE: raise - ret = -1 + if req.ui.configbool(b'ui', b'detailed-exit-code'): + ret = 250 + else: + ret = -1 finally: duration = util.timer() - starttime req.ui.flush() # record blocked times diff --git a/tests/test-commandserver.t b/tests/test-commandserver.t --- a/tests/test-commandserver.t +++ b/tests/test-commandserver.t @@ -778,7 +778,7 @@ *** runcommand debugsuicide interrupted! killed! - [255] + [250] #endif