mercurial/commandserver.py
changeset 22563 8cc5e673cac0
parent 22562 2d85e664c377
child 22988 32b77aba2772
--- a/mercurial/commandserver.py	Sat Sep 27 12:27:03 2014 +0900
+++ b/mercurial/commandserver.py	Sat Sep 27 12:37:53 2014 +0900
@@ -28,8 +28,7 @@
     data length (unsigned int),
     data
     """
-    def __init__(self, in_, out, channel):
-        self.in_ = in_
+    def __init__(self, out, channel):
         self.out = out
         self.channel = channel
 
@@ -43,7 +42,7 @@
     def __getattr__(self, attr):
         if attr in ('isatty', 'fileno'):
             raise AttributeError(attr)
-        return getattr(self.in_, attr)
+        return getattr(self.out, attr)
 
 class channeledinput(object):
     """
@@ -138,7 +137,7 @@
             global logfile
             if logpath == '-':
                 # write log on a special 'd' (debug) channel
-                logfile = channeledoutput(sys.stdout, sys.stdout, 'd')
+                logfile = channeledoutput(sys.stdout, 'd')
             else:
                 logfile = open(logpath, 'a')
 
@@ -153,10 +152,10 @@
             self.repo = self.repoui = None
 
         if mode == 'pipe':
-            self.cerr = channeledoutput(sys.stdout, sys.stdout, 'e')
-            self.cout = channeledoutput(sys.stdout, sys.stdout, 'o')
+            self.cerr = channeledoutput(sys.stdout, 'e')
+            self.cout = channeledoutput(sys.stdout, 'o')
             self.cin = channeledinput(sys.stdin, sys.stdout, 'I')
-            self.cresult = channeledoutput(sys.stdout, sys.stdout, 'r')
+            self.cresult = channeledoutput(sys.stdout, 'r')
 
             self.client = sys.stdin
         else: