# HG changeset patch # User Kevin Bullock # Date 2018-03-04 00:02:50 # Node ID 68328202f270c17413d10b2c0adf0b8c6208de49 # Parent 340e4b711df7330342adbc20dffb86c6940267fe dispatch: don't clamp the range of the exit code twice We already limit the range to (0, 255) in the call to sys.exit(). The duplicated operation can't possibly be hurting us, but let's clean it up to avoid confusion. diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -85,7 +85,7 @@ def run(): req = request(pycompat.sysargv[1:]) err = None try: - status = (dispatch(req) or 0) & 255 + status = (dispatch(req) or 0) except error.StdioError as e: err = e status = -1