diff mercurial/ui.py @ 39809: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 fe3ca1e6f786
children a9f56e4501c1
line wrap: on
line diff
--- a/mercurial/ui.py	Wed Sep 26 21:21:05 2018 +0900
+++ b/mercurial/ui.py	Wed Sep 26 21:24:14 2018 +0900
@@ -231,6 +231,7 @@
             self.fout = src.fout
             self.ferr = src.ferr
             self.fin = src.fin
+            self._finoutredirected = src._finoutredirected
             self.pageractive = src.pageractive
             self._disablepager = src._disablepager
             self._tweaked = src._tweaked
@@ -255,6 +256,7 @@
             self.fout = procutil.stdout
             self.ferr = procutil.stderr
             self.fin = procutil.stdin
+            self._finoutredirected = False
             self.pageractive = False
             self._disablepager = False
             self._tweaked = False