changeset 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 e995f00a9e9a
children 2bb8c53be961
files mercurial/chgserver.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/chgserver.py	Mon Dec 19 02:26:41 2016 +0530
+++ b/mercurial/chgserver.py	Fri Dec 16 14:46:34 2016 +0000
@@ -327,8 +327,9 @@
 
 class chgcmdserver(commandserver.server):
     def __init__(self, ui, repo, fin, fout, sock, hashstate, baseaddress):
+        self._csystem = channeledsystem(fin, fout, 'S')
         super(chgcmdserver, self).__init__(
-            _newchgui(ui, channeledsystem(fin, fout, 'S')), repo, fin, fout)
+            _newchgui(ui, self._csystem), repo, fin, fout)
         self.clientsock = sock
         self._oldios = []  # original (self.ch, ui.fp, fd) before "attachio"
         self.hashstate = hashstate