Mercurial > public > mercurial-scm > hg-stable
comparison tests/test-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 | 0b04ee8e789d |
children | 9524938c8ff8 |
comparison
equal
deleted
inserted
replaced
20630:0b04ee8e789d | 20631:5d4606bec54c |
---|---|
101 # --config | 101 # --config |
102 runcommand(server, ['id', '--config', 'ui.quiet=True']) | 102 runcommand(server, ['id', '--config', 'ui.quiet=True']) |
103 | 103 |
104 # make sure --config doesn't stick | 104 # make sure --config doesn't stick |
105 runcommand(server, ['id']) | 105 runcommand(server, ['id']) |
106 | |
107 # negative return code should be masked | |
108 runcommand(server, ['id', '-runknown']) | |
106 | 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') |
110 # close stdin while server is waiting for input | 113 # close stdin while server is waiting for input |