diff mercurial/commandserver.py @ 20631:5d4606bec54c

cmdserver: mask return code of runcommand in the same way as dispatch.run "hg help" does not state that the code for abort is 255, but it's confusing to have different code between hg command and command server. Tests of python-hglib 1.2 passed with this change.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 03 Mar 2014 15:50:51 +0900
parents a42ea6d209e6
children e811b93f2cb1
line wrap: on
line diff
--- a/mercurial/commandserver.py	Mon Mar 03 15:50:48 2014 +0900
+++ b/mercurial/commandserver.py	Mon Mar 03 15:50:51 2014 +0900
@@ -193,7 +193,7 @@
         req = dispatch.request(args[:], copiedui, self.repo, self.cin,
                                self.cout, self.cerr)
 
-        ret = dispatch.dispatch(req) or 0 # might return None
+        ret = (dispatch.dispatch(req) or 0) & 255 # might return None
 
         # restore old cwd
         if '--cwd' in args: