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
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:
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
___
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.
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.
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
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