# HG changeset patch # User Idan Kamara # Date 2011-06-07 10:39:09 # Node ID ea8938d3a5aa6efa01f7d26566f20bdcae5d51ad # Parent 4e1ccd4c2b6de909ad54b271a107eb8d0e7861ae dispatch: add I/O descriptors to the request diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -12,11 +12,16 @@ import cmdutil, encoding 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:])))