##// END OF EJS Templates
ui: disable echo back of prompt input if ui is set to non-tty purposely...
Yuya Nishihara -
r22783:524b786b default
parent child Browse files
Show More
@@ -684,7 +684,9 b' class ui(object):'
684 684 r = default
685 685 # sometimes self.interactive disagrees with isatty,
686 686 # show response provided on stdin when simulating
687 if not util.isatty(self.fin):
687 # but commandserver
688 if (not util.isatty(self.fin)
689 and not self.configbool('ui', 'nontty')):
688 690 self.write(r, "\n")
689 691 return r
690 692 except EOFError:
@@ -497,6 +497,9 b' check that local configs for the cached '
497 497 > @command("debuggetpass", norepo=True)
498 498 > def debuggetpass(ui):
499 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 503 > EOF
501 504 $ cat <<EOF >> .hg/hgrc
502 505 > [extensions]
@@ -511,8 +514,13 b' check that local configs for the cached '
511 514 ... runcommand(server, ['debuggetpass', '--config',
512 515 ... 'ui.interactive=True'],
513 516 ... input=cStringIO.StringIO('1234\n'))
517 ... runcommand(server, ['debugprompt', '--config',
518 ... 'ui.interactive=True'],
519 ... input=cStringIO.StringIO('5678\n'))
514 520 *** runcommand debuggetpass --config ui.interactive=True
515 521 password: 1234
522 *** runcommand debugprompt --config ui.interactive=True
523 prompt: 5678
516 524
517 525
518 526 start without repository:
General Comments 0
You need to be logged in to leave comments. Login now