Commit Graph

5 Commits

Author SHA1 Message Date
Jun Wu
3e05e789bc demandimport: disable if chg is being used
In chg's case, making modules lazily loaded could actually slow down things
since chg pre-imports them. Therefore disable demandimport if chg is being
used.

This is not done by setting `HGDEMANDIMPORT` chg client-side because that
has side-effects on child processes (hooks, etc).

Differential Revision: https://phab.mercurial-scm.org/D351
2017-08-16 10:44:06 -07:00
Jun Wu
e60bc9fd17 demandimport: move HGDEMANDIMPORT test to __init__.py
The logic is now shared between demandimport{2,3}.

Differential Revision: https://phab.mercurial-scm.org/D445
2017-08-18 11:08:17 -07:00
Siddharth Agarwal
71d917f14d demandimport: add python 3 implementation
This implementation uses the new importlib finder/loader functionality
available in Python 3.5 and up.

# no-check-commit
2017-05-21 12:23:04 -07:00
Siddharth Agarwal
8ffb99bcb0 demandimport: move ignore list to __init__.py
We're going to use the same ignore list for Python 3.
2017-05-21 12:10:53 -07:00
Siddharth Agarwal
a41c665cd6 demandimport: move to separate package
In Python 3, demand loading is per-package. Keeping demandimport in the
mercurial package would disable demand loading for any modules in
mercurial.
2017-05-21 12:10:53 -07:00