diff mercurial/ui.py @ 30473:39d13b8c101d

py3: bulk replace sys.stdin/out/err by util's Almost all sys.stdin/out/err in hgext/ and mercurial/ are replaced by util's. There are a few exceptions: - lsprof.py and statprof.py are untouched since they are a kind of vendor code and they never import mercurial modules right now. - ui._readline() needs to replace sys.stdin and stdout to pass them to raw_input(). We'll need another workaround here.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 20 Oct 2016 23:53:36 +0900
parents 9df29b7c62cf
children b0a8337ba9af
line wrap: on
line diff
--- a/mercurial/ui.py	Thu Oct 20 23:40:24 2016 +0900
+++ b/mercurial/ui.py	Thu Oct 20 23:53:36 2016 +0900
@@ -130,9 +130,9 @@
 
             self.httppasswordmgrdb = src.httppasswordmgrdb
         else:
-            self.fout = sys.stdout
-            self.ferr = sys.stderr
-            self.fin = sys.stdin
+            self.fout = util.stdout
+            self.ferr = util.stderr
+            self.fin = util.stdin
 
             # shared read-only environment
             self.environ = os.environ