Comments
Patch
@@ -196,6 +196,9 @@ class server(object):
for ui in uis:
# any kind of interaction must use server channels
ui.setconfig('ui', 'nontty', 'true', 'commandserver')
+ # echo-back message shouldn't be written because a client
+ # typically have to parse the output
+ ui.setconfig('ui', 'simulatettyecho', 'false', 'commandserver')
req = dispatch.request(args[:], copiedui, self.repo, self.cin,
self.cout, self.cerr)
@@ -713,9 +713,8 @@ class ui(object):
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')):
+ and self.configbool('ui', 'simulatettyecho', True)):
self.write(r, "\n")
return r
except EOFError:
@@ -178,6 +178,7 @@ check that local configs for the cached
ui.mergemarkers=detailed
ui.foo=bar
ui.nontty=true
+ ui.simulatettyecho=false
*** runcommand init foo
*** runcommand -R foo showconfig ui defaults
defaults.backout=-d "0 0"
@@ -188,6 +189,7 @@ check that local configs for the cached
ui.interactive=False
ui.mergemarkers=detailed
ui.nontty=true
+ ui.simulatettyecho=false
$ rm -R foo