diff -r 1b9be0b26511 -r 23a00bc90a3c mercurial/wireprotoserver.py --- a/mercurial/wireprotoserver.py Wed Sep 26 21:21:05 2018 +0900 +++ b/mercurial/wireprotoserver.py Wed Sep 26 21:24:14 2018 +0900 @@ -785,6 +785,8 @@ self._ui = ui self._repo = repo self._fin, self._fout = procutil.protectstdio(ui.fin, ui.fout) + # TODO: manage the redirection flag internally by ui + ui._finoutredirected = (self._fin, self._fout) != (ui.fin, ui.fout) # Log write I/O to stdout and stderr if configured. if logfh: