From patchwork Tue Nov 22 15:59:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [6, of, 8, chgtocore] chgserver: drop CHGINTERNALMARK by chgunixservice() From: Yuya Nishihara X-Patchwork-Id: 17705 Message-Id: <75a0cf247a94e7ca67e9.1479830399@mimosa> To: mercurial-devel@mercurial-scm.org Date: Wed, 23 Nov 2016 00:59:59 +0900 # HG changeset patch # User Yuya Nishihara # 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']