This is an archive of the discontinued Mercurial Phabricator instance.

demandimport: test whether to enable or not in hg script
AbandonedPublic

Authored by quark on Aug 11 2017, 2:24 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

This allows us to avoid side effects caused by importing demandimport if
demandimport is disabled. It also gives the hg script more control about
choosing whether to enable or disable demandimport.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

quark created this revision.Aug 11 2017, 2:24 PM
yuja added a subscriber: yuja.Aug 15 2017, 2:59 AM

Seems fine, but what is the "side effects caused by importing demandimport" ?

sys.modules['hgdemandimport'] being set? Maybe I should remove it from commit message.

yuja added a comment.Aug 15 2017, 10:46 PM

sys.modules['hgdemandimport'] being set? Maybe I should remove it from commit message.

So there's no point to duplicate the HGDEMANDIMPORT check?

quark abandoned this revision.Aug 15 2017, 11:44 PM

So there's no point to duplicate the HGDEMANDIMPORT check?

Hmm... I cannot remember why I did this at the first place. Just checking chg alone should be enough.