dispatch: add I/O descriptors to the request
authorIdan Kamara <idankk86@gmail.com>
Tue, 07 Jun 2011 13:39:09 +0300
changeset 14613 ea8938d3a5aa
parent 14612 4e1ccd4c2b6d
child 14614 afccc64eea73
dispatch: add I/O descriptors to the request
mercurial/dispatch.py
--- a/mercurial/dispatch.py	Tue Jun 07 13:39:09 2011 +0300
+++ b/mercurial/dispatch.py	Tue Jun 07 13:39:09 2011 +0300
@@ -12,11 +12,16 @@
 import ui as uimod
 
 class request(object):
-    def __init__(self, args, ui=None, repo=None):
+    def __init__(self, args, ui=None, repo=None, fin=None, fout=None, ferr=None):
         self.args = args
         self.ui = ui
         self.repo = repo
 
+        # input/output/error streams
+        self.fin = fin
+        self.fout = fout
+        self.ferr = ferr
+
 def run():
     "run the command in sys.argv"
     sys.exit(dispatch(request(sys.argv[1:])))