diff -r 2f2107c01dee -r 6edc8800dbc3 mercurial/dispatch.py --- a/mercurial/dispatch.py Fri Oct 08 13:36:02 2021 -0700 +++ b/mercurial/dispatch.py Tue Mar 02 09:33:25 2021 -0800 @@ -316,7 +316,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 try: