equal
deleted
inserted
replaced
495 > cmdtable = {} |
495 > cmdtable = {} |
496 > command = cmdutil.command(cmdtable) |
496 > command = cmdutil.command(cmdtable) |
497 > @command("debuggetpass", norepo=True) |
497 > @command("debuggetpass", norepo=True) |
498 > def debuggetpass(ui): |
498 > def debuggetpass(ui): |
499 > ui.write("%s\\n" % ui.getpass()) |
499 > ui.write("%s\\n" % ui.getpass()) |
|
500 > @command("debugprompt", norepo=True) |
|
501 > def debugprompt(ui): |
|
502 > ui.write("%s\\n" % ui.prompt("prompt:")) |
500 > EOF |
503 > EOF |
501 $ cat <<EOF >> .hg/hgrc |
504 $ cat <<EOF >> .hg/hgrc |
502 > [extensions] |
505 > [extensions] |
503 > dbgui = dbgui.py |
506 > dbgui = dbgui.py |
504 > EOF |
507 > EOF |
509 ... def getpass(server): |
512 ... def getpass(server): |
510 ... readchannel(server) |
513 ... readchannel(server) |
511 ... runcommand(server, ['debuggetpass', '--config', |
514 ... runcommand(server, ['debuggetpass', '--config', |
512 ... 'ui.interactive=True'], |
515 ... 'ui.interactive=True'], |
513 ... input=cStringIO.StringIO('1234\n')) |
516 ... input=cStringIO.StringIO('1234\n')) |
|
517 ... runcommand(server, ['debugprompt', '--config', |
|
518 ... 'ui.interactive=True'], |
|
519 ... input=cStringIO.StringIO('5678\n')) |
514 *** runcommand debuggetpass --config ui.interactive=True |
520 *** runcommand debuggetpass --config ui.interactive=True |
515 password: 1234 |
521 password: 1234 |
|
522 *** runcommand debugprompt --config ui.interactive=True |
|
523 prompt: 5678 |
516 |
524 |
517 |
525 |
518 start without repository: |
526 start without repository: |
519 |
527 |
520 $ cd .. |
528 $ cd .. |