[PATCH 6 of 8 chgtocore] chgserver: drop CHGINTERNALMARK by chgunixservice()

Yuya Nishihara yuya at tcha.org
Tue Nov 22 10:59:59 EST 2016


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1476509069 -32400
#      Sat Oct 15 14:24:29 2016 +0900
# Node ID 75a0cf247a94e7ca67e9280f6335ce95c8d6a5ad
# Parent  ac7e304b598a4f05e96605602679ea868b4fe38d
chgserver: drop CHGINTERNALMARK by chgunixservice()

Prepares for the removal of uisetup(). We just need to do that at the start
of the chg server, so chgunixservice() should be fine.

diff --git a/hgext/chgserver.py b/hgext/chgserver.py
--- a/hgext/chgserver.py
+++ b/hgext/chgserver.py
@@ -629,6 +629,11 @@ class chgunixservicehandler(object):
                             self._hashstate, self._baseaddress)
 
 def chgunixservice(ui, repo, opts):
+    # CHGINTERNALMARK is temporarily set by chg client to detect if chg will
+    # start another chg. drop it to avoid possible side effects.
+    if 'CHGINTERNALMARK' in os.environ:
+        del os.environ['CHGINTERNALMARK']
+
     if repo:
         # one chgserver can serve multiple repos. drop repo information
         ui.setconfig('bundle', 'mainreporoot', '', 'repo')
@@ -637,8 +642,3 @@ def chgunixservice(ui, repo, opts):
 
 def uisetup(ui):
     server._cmdservicemap['chgunix'] = chgunixservice
-
-    # CHGINTERNALMARK is temporarily set by chg client to detect if chg will
-    # start another chg. drop it to avoid possible side effects.
-    if 'CHGINTERNALMARK' in os.environ:
-        del os.environ['CHGINTERNALMARK']


More information about the Mercurial-devel mailing list