[PATCH 0 of 2] The ui.ignore config option, one more time
Matt Mackall
mpm at selenic.com
Thu Sep 19 15:46:59 CDT 2013
On Thu, 2013-09-19 at 21:45 +0200, Isaac Jurado wrote:
> Replying Isaac Jurado:
> > This is another attempt to change the behaviour of ui.ignore.*
> > configuration option to a more useful one.
> >
> > The idea is to leave absolute paths as they are, but interpret relative
> > paths from the repository root instead of the current working directory.
> > Specially since the latter can be emulated with something like:
> >
> > [ui]
> > ignore = $PWD/custom-ignore
> >
>
> As Matt requested last time this was brought up, I've been quickly
> reviewing the behaviour of relative paths in other situations where
> external files must be opened in some way.
>
> For all the following cases, absolute paths work fine and
> util.expandpath() is used, so the ~ and $ expansions work as expected.
> The comments are only for cases where a relative path is used (i.e. the
> result of util.expandpath() still being relative):
>
> | relative to | documented
> -------------------+------------------+--------------
> %include | current config | yes
> shell aliases | shell rules | implied
> command hooks | repo root | no
> python hooks | ???? | ??
> .hgsub | repo root | yes
> ui.ignore.* | current wd | no
> paths.* | see NOTE | no
> extensions.* | current wd | no
> merge-tools | $PATH lookup | yes
> email.method | shell rules | yes
> auth.{key,cert} | current wd | no
> web.cacerts | repo root | no
Shiny. Let's sort this differently:
| relative to | documented
-------------------+------------------+--------------
%include | current config | yes
.hgsub | repo root | yes
merge-tools | $PATH lookup | yes
email.method | shell rules | yes
shell aliases | shell rules | implied
command hooks | repo root | no
web.cacerts | repo root | no
paths.* | see NOTE | no
ui.ignore.* | current wd | no
extensions.* | current wd | no
auth.{key,cert} | current wd | no
python hooks | ???? | ??
I think we all agree that "current wd" behavior is pretty much
useless/meaningless for config settings. We once had such behavior for
hooks and changed it. So it becomes a question of "relative to hgrc" or
"relative to repo root". I think the latter is probably the most
sensible choice.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list