diff mercurial/sshserver.py @ 14614:afccc64eea73

ui: use I/O descriptors internally and as a result: - fix webproto to redirect the ui descriptors instead of sys.stdout/err - fix sshserver to use the ui descriptors
author Idan Kamara <idankk86@gmail.com>
date Wed, 08 Jun 2011 01:39:20 +0300
parents 659f34b833b9
children f4522df38c65
line wrap: on
line diff
--- a/mercurial/sshserver.py	Tue Jun 07 13:39:09 2011 +0300
+++ b/mercurial/sshserver.py	Wed Jun 08 01:39:20 2011 +0300
@@ -14,11 +14,11 @@
         self.ui = ui
         self.repo = repo
         self.lock = None
-        self.fin = sys.stdin
-        self.fout = sys.stdout
+        self.fin = ui.fin
+        self.fout = ui.fout
 
         hook.redirect(True)
-        sys.stdout = sys.stderr
+        ui.fout = repo.ui.fout = ui.ferr
 
         # Prevent insertion/deletion of CRs
         util.setbinary(self.fin)