comparison 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
comparison
equal deleted inserted replaced
20630:0b04ee8e789d 20631:5d4606bec54c
191 self.repo.invalidateall() 191 self.repo.invalidateall()
192 192
193 req = dispatch.request(args[:], copiedui, self.repo, self.cin, 193 req = dispatch.request(args[:], copiedui, self.repo, self.cin,
194 self.cout, self.cerr) 194 self.cout, self.cerr)
195 195
196 ret = dispatch.dispatch(req) or 0 # might return None 196 ret = (dispatch.dispatch(req) or 0) & 255 # might return None
197 197
198 # restore old cwd 198 # restore old cwd
199 if '--cwd' in args: 199 if '--cwd' in args:
200 os.chdir(self.cwd) 200 os.chdir(self.cwd)
201 201