##// END OF EJS Templates
ui: separate option to show prompt echo, enabled only in tests (issue4417)...
Yuya Nishihara -
r23053:5ba11ab4 stable
parent child Browse files
Show More
@@ -711,11 +711,7 b' class ui(object):'
711 r = self._readline(self.label(msg, 'ui.prompt'))
711 r = self._readline(self.label(msg, 'ui.prompt'))
712 if not r:
712 if not r:
713 r = default
713 r = default
714 # sometimes self.interactive disagrees with isatty,
714 if self.configbool('ui', 'promptecho'):
715 # show response provided on stdin when simulating
716 # but commandserver
717 if (not util.isatty(self.fin)
718 and not self.configbool('ui', 'nontty')):
719 self.write(r, "\n")
715 self.write(r, "\n")
720 return r
716 return r
721 except EOFError:
717 except EOFError:
@@ -681,6 +681,7 b' class Test(unittest.TestCase):'
681 hgrc.write('slash = True\n')
681 hgrc.write('slash = True\n')
682 hgrc.write('interactive = False\n')
682 hgrc.write('interactive = False\n')
683 hgrc.write('mergemarkers = detailed\n')
683 hgrc.write('mergemarkers = detailed\n')
684 hgrc.write('promptecho = True\n')
684 hgrc.write('[defaults]\n')
685 hgrc.write('[defaults]\n')
685 hgrc.write('backout = -d "0 0"\n')
686 hgrc.write('backout = -d "0 0"\n')
686 hgrc.write('commit = -d "0 0"\n')
687 hgrc.write('commit = -d "0 0"\n')
@@ -8,6 +8,7 b' Create a repository:'
8 ui.slash=True
8 ui.slash=True
9 ui.interactive=False
9 ui.interactive=False
10 ui.mergemarkers=detailed
10 ui.mergemarkers=detailed
11 ui.promptecho=True
11 $ hg init t
12 $ hg init t
12 $ cd t
13 $ cd t
13
14
@@ -5,6 +5,11 b''
5 #endif
5 #endif
6 $ export PYTHONPATH
6 $ export PYTHONPATH
7
7
8 typical client does not want echo-back messages, so test without it:
9
10 $ grep -v '^promptecho ' < $HGRCPATH >> $HGRCPATH.new
11 $ mv $HGRCPATH.new $HGRCPATH
12
8 $ hg init repo
13 $ hg init repo
9 $ cd repo
14 $ cd repo
10
15
General Comments 0
You need to be logged in to leave comments. Login now