[PATCH 0 of 2] The ui.ignore config option, one more time

Isaac Jurado diptongo at gmail.com
Thu Sep 19 12:26:36 CDT 2013


Replying Thomas Arendsen Hein:
> * Laurens Holst <laurens.nospam at grauw.nl> [20130918 12:07]:
>> Op 12-09-13 00:29, Isaac Jurado schreef:
>>> 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
>>
>> IMO it should be relative to the configuration file in which it is
>> specified.
>
> Instinctively I would have assumed that they are relative to the repo
> root, so something like this in ~/.hgrc would be possible:
>
>   [ui]
>   ignore = .hg/localignore
>
>> (See previous discussions.)
>
> But reading this previous discussions I am no in favour of reading it
> relative to the config file to match the behaviour of %include, even
> if this differs from the behaviour of [paths].

I hope it is obvious that the current behaviour is not really practical,
specially since it can be achieved with the PWD environment variable
(however, I'm not sure if that works on Windows too).

And given that it is not documented *at all*, changing its semantics
does not seem so grave.  I wonder how many users are relying on the
current behaviour for relative paths.

Having said that, I can't decide whether it is better to be relative to
the current configuration file or to the repository root.  I've never
used %include myself so for me it feel more natural basing relative
paths on the repository root, and also much easier to change as it can
be seen in the patch.

Any more opinions?

-- 
Isaac Jurado

"The noblest pleasure is the joy of understanding."
                                  Leonardo da Vinci


More information about the Mercurial-devel mailing list