D351: demandimport: disable if chg is being used

quark (Jun Wu) phabricator at mercurial-scm.org
Wed Aug 16 15:13:18 EDT 2017


quark updated this revision to Diff 1011.

REPOSITORY
  rHG Mercurial

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

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

AFFECTED FILES
  mercurial/dispatch.py

CHANGE DETAILS

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 encoding.environ:
+        # do not enable demandimport for chgserver
+        return
     if sys.version_info[0] < 3 or sys.version_info >= (3, 6):
         demandimport.enable()
 



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


More information about the Mercurial-devel mailing list