D351: demandimport: disable by default if chg is being used

2017-08-15 Thread quark (Jun Wu)
quark added a comment. > That seems less bad since the hg script doesn't have to know the chg stuff. Having `HGDEMANDIMPORT` set may affect `hg` ran by child process (like hooks). How about moving the demandimport stuff to `dispatch.py`? I think eventually `dispatch.py` will have

D351: demandimport: disable by default if chg is being used

2017-08-15 Thread yuja (Yuya Nishihara)
yuja added a comment. > Setting `HGDEMANDIMPORT` for both the forked and non-forked chg client processes seems less cleaner. That seems less bad since the hg script doesn't have to know the chg stuff. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D351 To:

D351: demandimport: disable by default if chg is being used

2017-08-15 Thread phillco (Phil Cohen)
phillco accepted this revision. phillco added a comment. lgtm, pending sid's comment. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D351 To: quark, #hg-reviewers, phillco Cc: phillco, sid0, yuja, mercurial-devel ___

D351: demandimport: disable by default if chg is being used

2017-08-15 Thread sid0 (Siddharth Agarwal)
sid0 added a comment. > I tried that approach. If we only set HGDEMANDIMPORT for the forked process to execute hg server, it will be an infinite loop - environment config hash will mismatch. Setting HGDEMANDIMPORT for both the forked and non-forked chg client processes seems less cleaner.

D351: demandimport: disable by default if chg is being used

2017-08-15 Thread quark (Jun Wu)
quark added a comment. I tried that approach. If we only set `HGDEMANDIMPORT` for the forked process to execute chg, it will be an infinite loop - environment config hash will mismatch. Setting `HGDEMANDIMPORT` for both the forked and non-forked chg client process seems less cleaner.

D351: demandimport: disable by default if chg is being used

2017-08-15 Thread yuja (Yuya Nishihara)
yuja added a comment. Perhaps the chg executable can simply set `HGDEMANDIMPORT=disable` if it isn't specified by user. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D351 To: quark, #hg-reviewers Cc: yuja, mercurial-devel

D351: demandimport: disable by default if chg is being used

2017-08-11 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY 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. Users