##// END OF EJS Templates
cmdserver: mask return code of runcommand in the same way as dispatch.run...
Yuya Nishihara -
r20631:5d4606be default
parent child Browse files
Show More
@@ -193,7 +193,7 b' class server(object):'
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:
@@ -104,6 +104,9 b' def checkruncommand(server):'
104 # make sure --config doesn't stick
104 # make sure --config doesn't stick
105 runcommand(server, ['id'])
105 runcommand(server, ['id'])
106
106
107 # negative return code should be masked
108 runcommand(server, ['id', '-runknown'])
109
107 def inputeof(server):
110 def inputeof(server):
108 readchannel(server)
111 readchannel(server)
109 server.stdin.write('runcommand\n')
112 server.stdin.write('runcommand\n')
@@ -43,6 +43,9 b' 000000000000 tip'
43 000000000000
43 000000000000
44 runcommand id
44 runcommand id
45 000000000000 tip
45 000000000000 tip
46 runcommand id -runknown
47 abort: unknown revision 'unknown'!
48 [255]
46
49
47 testing inputeof:
50 testing inputeof:
48
51
General Comments 0
You need to be logged in to leave comments. Login now