Mercurial > public > mercurial-scm > hg-stable
diff mercurial/wireprotoserver.py @ 38801:23a00bc90a3c stable
chgserver: do not send system() back to client if stdio redirected (issue5992)
As the chg client doesn't know server-side stdio redirection, the server
shouldn't upcall on "runsystem" request if the stdio streams are redirected.
This patch teaches ui to remember the redirection flag, which is updated by
the caller right now. Future patches (for default) will add ui methods to
manage this flag internally.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 26 Sep 2018 21:24:14 +0900 |
parents | bfe8ef6e370e |
children | a9f56e4501c1 |
line wrap: on
line diff
--- 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: