diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -711,11 +711,7 @@ class ui(object): r = self._readline(self.label(msg, 'ui.prompt')) if not r: r = default - # sometimes self.interactive disagrees with isatty, - # show response provided on stdin when simulating - # but commandserver - if (not util.isatty(self.fin) - and not self.configbool('ui', 'nontty')): + if self.configbool('ui', 'promptecho'): self.write(r, "\n") return r except EOFError: diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -681,6 +681,7 @@ class Test(unittest.TestCase): hgrc.write('slash = True\n') hgrc.write('interactive = False\n') hgrc.write('mergemarkers = detailed\n') + hgrc.write('promptecho = True\n') hgrc.write('[defaults]\n') hgrc.write('backout = -d "0 0"\n') hgrc.write('commit = -d "0 0"\n') diff --git a/tests/test-basic.t b/tests/test-basic.t --- a/tests/test-basic.t +++ b/tests/test-basic.t @@ -8,6 +8,7 @@ Create a repository: ui.slash=True ui.interactive=False ui.mergemarkers=detailed + ui.promptecho=True $ hg init t $ cd t diff --git a/tests/test-commandserver.t b/tests/test-commandserver.t --- a/tests/test-commandserver.t +++ b/tests/test-commandserver.t @@ -5,6 +5,11 @@ #endif $ export PYTHONPATH +typical client does not want echo-back messages, so test without it: + + $ grep -v '^promptecho ' < $HGRCPATH >> $HGRCPATH.new + $ mv $HGRCPATH.new $HGRCPATH + $ hg init repo $ cd repo