522 password: 1234 |
522 password: 1234 |
523 *** runcommand debugprompt --config ui.interactive=True |
523 *** runcommand debugprompt --config ui.interactive=True |
524 prompt: 5678 |
524 prompt: 5678 |
525 |
525 |
526 |
526 |
|
527 run commandserver in commandserver, which is silly but should work: |
|
528 |
|
529 >>> import cStringIO |
|
530 >>> from hgclient import readchannel, runcommand, check |
|
531 >>> @check |
|
532 ... def nested(server): |
|
533 ... print '%c, %r' % readchannel(server) |
|
534 ... class nestedserver(object): |
|
535 ... stdin = cStringIO.StringIO('getencoding\n') |
|
536 ... stdout = cStringIO.StringIO() |
|
537 ... runcommand(server, ['serve', '--cmdserver', 'pipe'], |
|
538 ... output=nestedserver.stdout, input=nestedserver.stdin) |
|
539 ... nestedserver.stdout.seek(0) |
|
540 ... print '%c, %r' % readchannel(nestedserver) # hello |
|
541 ... print '%c, %r' % readchannel(nestedserver) # getencoding |
|
542 o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob) |
|
543 *** runcommand serve --cmdserver pipe |
|
544 o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob) |
|
545 r, '*' (glob) |
|
546 |
|
547 |
527 start without repository: |
548 start without repository: |
528 |
549 |
529 $ cd .. |
550 $ cd .. |
530 |
551 |
531 >>> from hgclient import readchannel, runcommand, check |
552 >>> from hgclient import readchannel, runcommand, check |