changeset 30511:1873563e1ede

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.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 15 Oct 2016 14:24:29 +0900
parents a0878bc87379
children cc374292a561
files hgext/chgserver.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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']