Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
14612:4e1ccd4c2b6d | 14613:ea8938d3a5aa |
---|---|
10 import util, commands, hg, fancyopts, extensions, hook, error | 10 import util, commands, hg, fancyopts, extensions, hook, error |
11 import cmdutil, encoding | 11 import cmdutil, encoding |
12 import ui as uimod | 12 import ui as uimod |
13 | 13 |
14 class request(object): | 14 class request(object): |
15 def __init__(self, args, ui=None, repo=None): | 15 def __init__(self, args, ui=None, repo=None, fin=None, fout=None, ferr=None): |
16 self.args = args | 16 self.args = args |
17 self.ui = ui | 17 self.ui = ui |
18 self.repo = repo | 18 self.repo = repo |
19 | |
20 # input/output/error streams | |
21 self.fin = fin | |
22 self.fout = fout | |
23 self.ferr = ferr | |
19 | 24 |
20 def run(): | 25 def run(): |
21 "run the command in sys.argv" | 26 "run the command in sys.argv" |
22 sys.exit(dispatch(request(sys.argv[1:]))) | 27 sys.exit(dispatch(request(sys.argv[1:]))) |
23 | 28 |