changeset 22562:2d85e664c377

cmdserver: get file attributes of 'e'-channel from stdout, not from stderr It seems wrong to get attributes from object different than the underlying file. In the following example, it doesn't make sense to flush stderr after writing to stdout: self.ferr.write(str(a)) if not getattr(self.ferr, 'closed', False): self.ferr.flush()
author Yuya Nishihara <yuya@tcha.org>
date Sat, 27 Sep 2014 12:27:03 +0900
parents 1120b1e2f975
children 8cc5e673cac0
files mercurial/commandserver.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commandserver.py	Sat Sep 27 12:15:01 2014 +0900
+++ b/mercurial/commandserver.py	Sat Sep 27 12:27:03 2014 +0900
@@ -153,7 +153,7 @@
             self.repo = self.repoui = None
 
         if mode == 'pipe':
-            self.cerr = channeledoutput(sys.stderr, sys.stdout, 'e')
+            self.cerr = channeledoutput(sys.stdout, sys.stdout, 'e')
             self.cout = channeledoutput(sys.stdout, sys.stdout, 'o')
             self.cin = channeledinput(sys.stdin, sys.stdout, 'I')
             self.cresult = channeledoutput(sys.stdout, sys.stdout, 'r')