Show More
@@ -25,7 +25,11 b' def readchannel(server):' | |||||
25 | else: |
|
25 | else: | |
26 | return channel, server.stdout.read(length) |
|
26 | return channel, server.stdout.read(length) | |
27 |
|
27 | |||
28 | def runcommand(server, args, output=sys.stdout, error=sys.stderr, input=None): |
|
28 | def sep(text): | |
|
29 | return text.replace('\\', '/') | |||
|
30 | ||||
|
31 | def runcommand(server, args, output=sys.stdout, error=sys.stderr, input=None, | |||
|
32 | outfilter=lambda x: x): | |||
29 | print ' runcommand', ' '.join(args) |
|
33 | print ' runcommand', ' '.join(args) | |
30 | sys.stdout.flush() |
|
34 | sys.stdout.flush() | |
31 | server.stdin.write('runcommand\n') |
|
35 | server.stdin.write('runcommand\n') | |
@@ -37,7 +41,7 b' def runcommand(server, args, output=sys.' | |||||
37 | while True: |
|
41 | while True: | |
38 | ch, data = readchannel(server) |
|
42 | ch, data = readchannel(server) | |
39 | if ch == 'o': |
|
43 | if ch == 'o': | |
40 | output.write(data) |
|
44 | output.write(outfilter(data)) | |
41 | output.flush() |
|
45 | output.flush() | |
42 | elif ch == 'e': |
|
46 | elif ch == 'e': | |
43 | error.write(data) |
|
47 | error.write(data) | |
@@ -249,7 +253,8 b' def phasecacheafterstrip(server):' | |||||
249 |
|
253 | |||
250 | # make it public; draft marker moves to 4:7966c8e3734d |
|
254 | # make it public; draft marker moves to 4:7966c8e3734d | |
251 | runcommand(server, ['phase', '-p', '.']) |
|
255 | runcommand(server, ['phase', '-p', '.']) | |
252 |
|
|
256 | # load _phasecache.phaseroots | |
|
257 | runcommand(server, ['phase', '.'], outfilter=sep) | |||
253 |
|
258 | |||
254 | # strip 1::4 outside server |
|
259 | # strip 1::4 outside server | |
255 | os.system('hg --config extensions.mq= strip 1') |
|
260 | os.system('hg --config extensions.mq= strip 1') |
General Comments 0
You need to be logged in to leave comments.
Login now