[PATCH RFC] ui: introduce sysdefault section for pager and editor configuration

Jun Wu quark at fb.com
Thu Mar 9 21:52:34 EST 2017


Excerpts from Sean Farley's message of 2017-03-09 18:49:18 -0800:
> Kevin Bullock <kbullock+mercurial at ringworld.org> writes:
> 
> >> On Mar 8, 2017, at 18:06, Jun Wu <quark at fb.com> wrote:
> >> 
> >> A "sysdefault" section sounds a bit weird. Usually files under "/etc" are
> >> defining "system defaults". A new section also makes it harder to see what
> >> configs they are overriding.
> >> 
> >> How about appending ":sysdefault" to normal configs? The idea was also
> >> mentioned by Yuya at [1] and we use them in "[paths]":
> >> 
> >>  [ui]
> >>  pager:sysdefault = sensible-pager
> >>  editor:sysdefault = sensible-editor
> >> 
> >> This makes it easier to see what configs they are overriding, and makes the
> >> section less crowded if we want the same thing for other sections.
> >
> > I like that idea.
> 
> I guess I don't follow since I think of things in /etc as the system
> defaults to begin with. Are we having a namespace clash with users
> having 'foo=BAR' set so that setting 'foo' in /etc won't override that?

The point is to define configs that cannot be overrided by environment
variables. If we check "source", and treat things in "/etc" differently, we
may get rid of this. But that may make the config system more complicated.


More information about the Mercurial-devel mailing list