Mercurial > hg
comparison mercurial/chgserver.py @ 30643:dfb19aed409e
chgserver: store csystem separately
Previously, the "system" channel is inside the ui object. In the future, chg
will let dispatch to create a new ui object from scratch, to maximize
compatibility. And chgserver will use a "uisetup" like an extension to wrap
ui.system. To be able to do that cleanly, the system channel needs to be
accessed directly.
author | Jun Wu <quark@fb.com> |
---|---|
date | Fri, 16 Dec 2016 14:46:34 +0000 |
parents | a150173da1c1 |
children | 2bb8c53be961 |
comparison
equal
deleted
inserted
replaced
30642:e995f00a9e9a | 30643:dfb19aed409e |
---|---|
325 ('cerr', 'ferr', 'wb'), | 325 ('cerr', 'ferr', 'wb'), |
326 ] | 326 ] |
327 | 327 |
328 class chgcmdserver(commandserver.server): | 328 class chgcmdserver(commandserver.server): |
329 def __init__(self, ui, repo, fin, fout, sock, hashstate, baseaddress): | 329 def __init__(self, ui, repo, fin, fout, sock, hashstate, baseaddress): |
330 self._csystem = channeledsystem(fin, fout, 'S') | |
330 super(chgcmdserver, self).__init__( | 331 super(chgcmdserver, self).__init__( |
331 _newchgui(ui, channeledsystem(fin, fout, 'S')), repo, fin, fout) | 332 _newchgui(ui, self._csystem), repo, fin, fout) |
332 self.clientsock = sock | 333 self.clientsock = sock |
333 self._oldios = [] # original (self.ch, ui.fp, fd) before "attachio" | 334 self._oldios = [] # original (self.ch, ui.fp, fd) before "attachio" |
334 self.hashstate = hashstate | 335 self.hashstate = hashstate |
335 self.baseaddress = baseaddress | 336 self.baseaddress = baseaddress |
336 if hashstate is not None: | 337 if hashstate is not None: |