Patchwork D351: demandimport: disable if chg is being used

login
register
mail settings
Submitter phabricator
Date Aug. 16, 2017, 5:45 p.m.
Message ID <1646e4a04ea913c1c03a8b11fe029259@localhost.localdomain>
Download mbox | patch
Permalink /patch/23087/
State Not Applicable
Headers show

Comments

phabricator - Aug. 16, 2017, 5:45 p.m.
quark updated this revision to Diff 1003.
quark edited the summary of this revision.
quark retitled this revision from "demandimport: disable by default if chg is being used" to "demandimport: disable if chg is being used".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D351?vs=787&id=1003

REVISION DETAIL
  https://phab.mercurial-scm.org/D351

AFFECTED FILES
  mercurial/dispatch.py

CHANGE DETAILS




To: quark, #hg-reviewers, phillco
Cc: phillco, sid0, yuja, mercurial-devel

Patch

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -96,6 +96,9 @@ 
 
 def _enabledemandimport():
     """enable importing on demand to reduce startup time"""
+    if 'CHGINTERNALMARK' in pycompat.environ:
+        # disable demandimport for chgserver
+        return
     if sys.version_info[0] < 3 or sys.version_info >= (3, 6):
         import hgdemandimport; hgdemandimport.enable()