[PATCH 0 of 2 stable,rfc] paths in config files

Matt Mackall mpm at selenic.com
Thu Nov 17 16:13:38 CST 2011


On Thu, 2011-11-17 at 01:37 +0100, Mads Kiilerich wrote:
> Matt Mackall wrote, On 11/16/2011 10:56 PM:
> > On Tue, 2011-11-15 at 02:40 +0100, Mads Kiilerich wrote:
> >> Is this how 'configpath' should work, similar to how %include works?
> >>
> >> Or should it be more like the way fixconfig handles relative paths by making
> >> them relative to the repo root - at least if it is a repo config?
> > An excellent question. I think we generally want the latter. But there
> > may already exist situations where we're doing both, which may make
> > standardizing hard.
> 
> A relative path in a config file %included from .hgrc should thus be 
> relative to $HOME, while the same file %included from .hg/hgrc should 
> make paths relative to repo root? And the same relative path in --config 
> should be relative to cwd?

Maybe? Off the top of my head, I don't know all the current rules. That
requires an audit, followed by an evaluation of which rules are
obviously right, which rules might be wrong, and whether any of them are
subject to change.

feature       relative to    expansion    comment
%include      config file    expandpath   people probably use this with ..
paths.X       'root'?        expandpath
...

> That works for [paths] handling in fixconfig, but it would be a more 
> tricky to do for arbitrary config settings later on in .configpath.
> 
> What was the intention with configpath? Should it replace the [paths] 
> handling in fixconfig?

I think that was the goal, yes.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list