mercurial/hgweb.py
changeset 1161 7654d8f2ccf6
parent 1160 0da98529a476
child 1162 91db1c90b20d
--- a/mercurial/hgweb.py	Tue Aug 30 14:52:58 2005 +0100
+++ b/mercurial/hgweb.py	Tue Aug 30 16:25:46 2005 +0200
@@ -912,13 +912,12 @@
 
             save = sys.argv, sys.stdin, sys.stdout, sys.stderr
             try:
-                sys.stdin = self.rfile
-                sys.stdout = self.wfile
+                req = hgrequest(self.rfile, self.wfile, os.environ)
                 sys.argv = ["hgweb.py"]
                 if '=' not in query:
                     sys.argv.append(query)
                 self.send_response(200, "Script output follows")
-                hg.run()
+                hg.run(req)
             finally:
                 sys.argv, sys.stdin, sys.stdout, sys.stderr = save