[PATCH 4 of 4] chgserver: move wrapchgui to runcommand

Jun Wu quark at fb.com
Fri Dec 16 10:01:21 EST 2016


# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1481900282 0
#      Fri Dec 16 14:58:02 2016 +0000
# Node ID 8fe60192f17f6ae99fa66c6bce1ec306772e31df
# Parent  eb3017f14d56dfdc9870b06a684ef9bcf7a030e6
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r 8fe60192f17f
chgserver: move wrapchgui to runcommand

The wrapping logic changes ui.system, which should only affect runcommand.
This makes future refactoring a bit cleaner.

diff --git a/mercurial/chgserver.py b/mercurial/chgserver.py
--- a/mercurial/chgserver.py
+++ b/mercurial/chgserver.py
@@ -330,5 +330,4 @@ class chgcmdserver(commandserver.server)
     def __init__(self, ui, repo, fin, fout, sock, hashstate, baseaddress):
         self._csystem = channeledsystem(fin, fout, 'S')
-        _wrapchgui(ui, self._csystem)
         super(chgcmdserver, self).__init__(ui, repo, fin, fout)
         self.clientsock = sock
@@ -507,4 +506,5 @@ class chgcmdserver(commandserver.server)
 
     def runcommand(self):
+        _wrapchgui(self.ui, self._csystem)
         return super(chgcmdserver, self).runcommand()
 


More information about the Mercurial-devel mailing list