##// END OF EJS Templates
test-commandserver: flush stdout
Idan Kamara -
r16117:6ecf5fb2 stable
parent child Browse files
Show More
@@ -27,6 +27,7 b' def readchannel(server):'
27
27
28 def runcommand(server, args, output=sys.stdout, error=sys.stderr, input=None):
28 def runcommand(server, args, output=sys.stdout, error=sys.stderr, input=None):
29 print ' runcommand', ' '.join(args)
29 print ' runcommand', ' '.join(args)
30 sys.stdout.flush()
30 server.stdin.write('runcommand\n')
31 server.stdin.write('runcommand\n')
31 writeblock(server, '\0'.join(args))
32 writeblock(server, '\0'.join(args))
32
33
@@ -56,6 +57,7 b' def check(func, repopath=None):'
56 print
57 print
57 print 'testing %s:' % func.__name__
58 print 'testing %s:' % func.__name__
58 print
59 print
60 sys.stdout.flush()
59 server = connect(repopath)
61 server = connect(repopath)
60 try:
62 try:
61 return func(server)
63 return func(server)
@@ -4,10 +4,10 b' testing hellomessage:'
4 o, 'capabilities: getencoding runcommand\nencoding: ***'
4 o, 'capabilities: getencoding runcommand\nencoding: ***'
5 runcommand id
5 runcommand id
6 000000000000 tip
6 000000000000 tip
7 abort: unknown command unknowncommand
8
7
9 testing unknowncommand:
8 testing unknowncommand:
10
9
10 abort: unknown command unknowncommand
11
11
12 testing checkruncommand:
12 testing checkruncommand:
13
13
@@ -134,11 +134,11 b' testing setphase:'
134 3: draft
134 3: draft
135 runcommand phase -r .
135 runcommand phase -r .
136 3: public
136 3: public
137 no phases changed
138
137
139 testing rollback:
138 testing rollback:
140
139
141 runcommand phase -r . -p
140 runcommand phase -r . -p
141 no phases changed
142 runcommand commit -Am.
142 runcommand commit -Am.
143 runcommand rollback
143 runcommand rollback
144 repository tip rolled back to revision 3 (undo commit)
144 repository tip rolled back to revision 3 (undo commit)
General Comments 0
You need to be logged in to leave comments. Login now