From patchwork Thu Aug 25 23:09:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2,of,4,v4] hghave: add demandimport checking From: timeless X-Patchwork-Id: 16435 Message-Id: <742a98771290ee1dbeb0.1472166590@gcc2-power8.osuosl.org> To: mercurial-devel@mercurial-scm.org Date: Thu, 25 Aug 2016 23:09:50 +0000 # HG changeset patch # User timeless # Date 1472164235 0 # Thu Aug 25 22:30:35 2016 +0000 # Node ID 742a98771290ee1dbeb069a32ae592a72a5a8007 # Parent 2b368e1f8ac00774b2a1d24c6cf9282e3cd24f1a # Available At https://bitbucket.org/timeless/mercurial-crew # hg pull https://bitbucket.org/timeless/mercurial-crew -r 742a98771290 hghave: add demandimport checking diff -r 2b368e1f8ac0 -r 742a98771290 tests/hghave.py --- a/tests/hghave.py Thu Aug 25 22:51:39 2016 +0000 +++ b/tests/hghave.py Thu Aug 25 22:30:35 2016 +0000 @@ -526,6 +526,10 @@ br'other supported Python versions') return dpkg and dh and dh_py2 +@check("demandimport", "demandimport enabled") +def has_demandimport(): + return os.environ.get('HGDEMANDIMPORT') != 'disable' + @check("absimport", "absolute_import in __future__") def has_absimport(): import __future__