hgext/chgserver.py
changeset 30511 1873563e1ede
parent 30507 dd539e2d89aa
child 30512 cc374292a561
--- 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']