Show More
@@ -8,19 +8,15 b'' | |||||
8 | $ hg init repo |
|
8 | $ hg init repo | |
9 | $ cd repo |
|
9 | $ cd repo | |
10 |
|
10 | |||
11 | >>> import re |
|
|||
12 | >>> from hgclient import readchannel, runcommand, check |
|
11 | >>> from hgclient import readchannel, runcommand, check | |
13 | >>> @check |
|
12 | >>> @check | |
14 | ... def hellomessage(server): |
|
13 | ... def hellomessage(server): | |
15 | ... ch, data = readchannel(server) |
|
14 | ... ch, data = readchannel(server) | |
16 | ... # escaping python tests output not supported |
|
15 | ... print '%c, %r' % (ch, data) | |
17 | ... print '%c, %r' % (ch, re.sub('encoding: [a-zA-Z0-9-]+', |
|
|||
18 | ... 'encoding: ***', data)) |
|
|||
19 | ... |
|
|||
20 | ... # run an arbitrary command to make sure the next thing the server |
|
16 | ... # run an arbitrary command to make sure the next thing the server | |
21 | ... # sends isn't part of the hello message |
|
17 | ... # sends isn't part of the hello message | |
22 | ... runcommand(server, ['id']) |
|
18 | ... runcommand(server, ['id']) | |
23 |
o, 'capabilities: getencoding runcommand\nencoding: * |
|
19 | o, 'capabilities: getencoding runcommand\nencoding: *' (glob) | |
24 | runcommand id |
|
20 | runcommand id | |
25 | 000000000000 tip |
|
21 | 000000000000 tip | |
26 |
|
22 | |||
@@ -523,19 +519,15 b' start without repository:' | |||||
523 |
|
519 | |||
524 | $ cd .. |
|
520 | $ cd .. | |
525 |
|
521 | |||
526 | >>> import re |
|
|||
527 | >>> from hgclient import readchannel, runcommand, check |
|
522 | >>> from hgclient import readchannel, runcommand, check | |
528 | >>> @check |
|
523 | >>> @check | |
529 | ... def hellomessage(server): |
|
524 | ... def hellomessage(server): | |
530 | ... ch, data = readchannel(server) |
|
525 | ... ch, data = readchannel(server) | |
531 | ... # escaping python tests output not supported |
|
526 | ... print '%c, %r' % (ch, data) | |
532 | ... print '%c, %r' % (ch, re.sub('encoding: [a-zA-Z0-9-]+', |
|
|||
533 | ... 'encoding: ***', data)) |
|
|||
534 | ... |
|
|||
535 | ... # run an arbitrary command to make sure the next thing the server |
|
527 | ... # run an arbitrary command to make sure the next thing the server | |
536 | ... # sends isn't part of the hello message |
|
528 | ... # sends isn't part of the hello message | |
537 | ... runcommand(server, ['id']) |
|
529 | ... runcommand(server, ['id']) | |
538 |
o, 'capabilities: getencoding runcommand\nencoding: * |
|
530 | o, 'capabilities: getencoding runcommand\nencoding: *' (glob) | |
539 | runcommand id |
|
531 | runcommand id | |
540 | abort: there is no Mercurial repository here (.hg not found) |
|
532 | abort: there is no Mercurial repository here (.hg not found) | |
541 | [255] |
|
533 | [255] |
General Comments 0
You need to be logged in to leave comments.
Login now