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

login
register
mail settings
Submitter Yuya Nishihara
Date Nov. 22, 2016, 3:59 p.m.
Message ID <75a0cf247a94e7ca67e9.1479830399@mimosa>
Download mbox | patch
Permalink /patch/17705/
State Accepted
Headers show

Comments

Yuya Nishihara - Nov. 22, 2016, 3:59 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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.

Patch

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']