Mercurial > hg
diff mercurial/dispatch.py @ 14613:ea8938d3a5aa
dispatch: add I/O descriptors to the request
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Tue, 07 Jun 2011 13:39:09 +0300 |
parents | 25c1f3ddd927 |
children | 9fba795dd030 |
line wrap: on
line diff
--- 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:])))