mercurial/hgweb/protocol.py
changeset 6265 be76e54570f0
parent 6212 e75aab656f46
child 6335 e29557d687c9
--- a/mercurial/hgweb/protocol.py	Fri Mar 14 20:01:50 2008 -0300
+++ b/mercurial/hgweb/protocol.py	Mon Feb 25 09:55:57 2008 -0500
@@ -175,8 +175,8 @@
 
                 # send addchangegroup output to client
 
-                old_stdout = sys.stdout
-                sys.stdout = cStringIO.StringIO()
+                oldio = sys.stdout, sys.stderr
+                sys.stderr = sys.stdout = cStringIO.StringIO()
 
                 try:
                     url = 'remote:%s:%s' % (proto,
@@ -188,7 +188,7 @@
                         ret = 0
                 finally:
                     val = sys.stdout.getvalue()
-                    sys.stdout = old_stdout
+                    sys.stdout, sys.stderr = oldio
                 req.write('%d\n' % ret)
                 req.write(val)
             finally: