chgserver: drop CHGINTERNALMARK by chgunixservice()
authorYuya Nishihara <yuya@tcha.org>
Sat, 15 Oct 2016 14:24:29 +0900
changeset 30511 1873563e1ede
parent 30510 a0878bc87379
child 30512 cc374292a561
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.
hgext/chgserver.py
--- a/hgext/chgserver.py	Sat Oct 15 14:19:16 2016 +0900
+++ b/hgext/chgserver.py	Sat Oct 15 14:24:29 2016 +0900
@@ -629,6 +629,11 @@
                             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 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']