Patchwork D1161: hghave: disable demandimport when chg is running

login
register
mail settings
Submitter phabricator
Date Oct. 17, 2017, 6:39 p.m.
Message ID <681f458881994de9985008e093ad0bc4@localhost.localdomain>
Download mbox | patch
Permalink /patch/25132/
State Not Applicable
Headers show

Comments

phabricator - Oct. 17, 2017, 6:39 p.m.
singhsrb updated this revision to Diff 2940.
singhsrb edited the summary of this revision.
singhsrb retitled this revision from "hghave: make 'on demand import' unsupported when chg is running" to "hghave: disable demandimport when chg is running".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1161?vs=2936&id=2940

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

AFFECTED FILES
  tests/hghave.py

CHANGE DETAILS




To: singhsrb, #hg-reviewers
Cc: quark, mercurial-devel

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -601,7 +601,8 @@ 
 
 @check("demandimport", "demandimport enabled")
 def has_demandimport():
-    return os.environ.get('HGDEMANDIMPORT') != 'disable'
+    # chg disables demandimport intentionally for performance wins.
+    return ((not has_chg()) and os.environ.get('HGDEMANDIMPORT') != 'disable')
 
 @check("py3k", "running with Python 3.x")
 def has_py3k():