Mercurial > public > mercurial-scm > hg-stable
comparison tests/test-commandserver.py @ 14864:1b872599f39f stable
cmdserver: restore old working dir after dispatch when we have --cwd
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Mon, 11 Jul 2011 17:49:45 +0300 |
parents | 95a8c0f5dd3f |
children | 5233df79deed |
comparison
equal
deleted
inserted
replaced
14863:1c148e935244 | 14864:1b872599f39f |
---|---|
118 """ | 118 """ |
119 | 119 |
120 runcommand(server, ['import', '-'], input=cStringIO.StringIO(patch)) | 120 runcommand(server, ['import', '-'], input=cStringIO.StringIO(patch)) |
121 runcommand(server, ['log']) | 121 runcommand(server, ['log']) |
122 | 122 |
123 def cwd(server): | |
124 """ check that --cwd doesn't persist between requests """ | |
125 readchannel(server) | |
126 os.mkdir('foo') | |
127 open('foo/bar', 'w').write('a') | |
128 runcommand(server, ['--cwd', 'foo', 'st', 'bar']) | |
129 runcommand(server, ['st', 'foo/bar']) | |
130 os.remove('foo/bar') | |
131 | |
123 if __name__ == '__main__': | 132 if __name__ == '__main__': |
124 os.system('hg init') | 133 os.system('hg init') |
125 | 134 |
126 check(hellomessage) | 135 check(hellomessage) |
127 check(unknowncommand) | 136 check(unknowncommand) |
128 check(checkruncommand) | 137 check(checkruncommand) |
129 check(inputeof) | 138 check(inputeof) |
130 check(serverinput) | 139 check(serverinput) |
140 check(cwd) |