Relative Path Names for extensions in hgrc
Mads Kiilerich
mads at kiilerich.com
Sun Apr 8 14:31:44 CDT 2012
A. S. Budden wrote, On 04/08/2012 08:18 PM:
> All,
>
> It would be really useful (for me) if I could use relative path names
> when loading extensions in hgrc.
This is almost TL;DR and hard to quote properly. But as far as I can see
you are only discussing global configuration - not configuration
specific or relative to the actual repo.
In general regarding the subject of relative paths in hgrc: There seems
to be some inconsistencies in this area, and Matt requested an audit in
http://markmail.org/message/fcgvz5zij62triwk . The core issue is to
figure out what relative paths are relative to.
One backward compatible workaround could be to introduce some
'$HG_CONFIGFILE' pseudo variable that could be used to specify that an
otherwise relative path is relative to the config file it is specified
in. (Yes, that is almost what you proposed.) (Another handy and
potentially dangerous variable could perhaps be $HG_ROOT.)
See also http://selenic.com/hg/rev/4e3eda05189b regarding silent failing
imports. The commit message is not very helpful, but you might be able
to find some mailing list discussion. I suggest starting a new thread if
you want to discuss that particular behaviour.
/Mads
More information about the Mercurial-devel
mailing list