Mercurial > hg
diff tests/test-commandserver.py @ 19132:605deb776abf
tests: fix test-commandserver phase . output for windows
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Fri, 03 May 2013 13:59:58 -0700 |
parents | 1c8e0d6ac3b0 |
children | c57e99386d88 |
line wrap: on
line diff
--- a/tests/test-commandserver.py Fri May 03 15:34:18 2013 -0500 +++ b/tests/test-commandserver.py Fri May 03 13:59:58 2013 -0700 @@ -25,7 +25,11 @@ else: return channel, server.stdout.read(length) -def runcommand(server, args, output=sys.stdout, error=sys.stderr, input=None): +def sep(text): + return text.replace('\\', '/') + +def runcommand(server, args, output=sys.stdout, error=sys.stderr, input=None, + outfilter=lambda x: x): print ' runcommand', ' '.join(args) sys.stdout.flush() server.stdin.write('runcommand\n') @@ -37,7 +41,7 @@ while True: ch, data = readchannel(server) if ch == 'o': - output.write(data) + output.write(outfilter(data)) output.flush() elif ch == 'e': error.write(data) @@ -249,7 +253,8 @@ # make it public; draft marker moves to 4:7966c8e3734d runcommand(server, ['phase', '-p', '.']) - runcommand(server, ['phase', '.']) # load _phasecache.phaseroots + # load _phasecache.phaseroots + runcommand(server, ['phase', '.'], outfilter=sep) # strip 1::4 outside server os.system('hg --config extensions.mq= strip 1')