> On Jun 18, 2017, at 21:59, Augie Fackler <r...@durin42.com> wrote: > >> >> On Jun 17, 2017, at 01:01, Yuya Nishihara <y...@tcha.org> wrote: >> >>>> I have no idea how we should process values which are only set in untrusted >>>> config. Using hasconfig(untrusted=True) might be a bit safer, but there >>>> would >>>> still be inconsistency. >>> >>> I thought untrusted was the default? Or do you just want it explicit? >> >> untrusted is False by default. I think this and the repo config problems can >> be mitigated by not setting tweaked values to _ocfg. >> >> if not tcfg.hasitem(section, name): >> tcfg.set(section, name, value, "<tweakdefaults>") >> if not ucfg.hasitem(section, name): >> ucfg.set(section, name, value, "<tweakdefaults>") >> fixconfig() > > Oh, I see the problem now. I'm not sure how to address that. It was > intentional that tweakdefaults is only respected if it's a trusted config > entry, so all its items can be treated as trusted. > > I think your fix sounds reasonable for the setting of the config items. > Should I roll a v3 that moves the tweakdefaults() call to dispatch and make > it work this way instead of on (ab)using ui.setconfig?
I just noticed the tweakdefaults patch is pretty far back in the stack at this point. I can do a followup if the items I've mentioned here sound good (tomorrow, since it's time for me to sleep now...) > > Thanks! > Augie
_______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel