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