[PATCH 2 of 2] Treat extension load paths as relative to the defining hgrc

Alexis S. L. Carvalho alexis at cecm.usp.br
Tue Mar 4 00:28:28 CST 2008

Thus spake Jesse Glick:
> Thomas Arendsen Hein wrote:
> > Imagine having a ~/.hgrc.d/paths.rc and ~/.hgrc ... should paths 
> > defined in one file be handled differently from those defined in the 
> > other?
> How do you mean "differently"? Values in the [paths] section will be 
> resolved relative to the location of the configuration file, which seems 
> intuitive to me. My proposed patch simply does the same for 
> [extensions]. I guess I don't understand what your objection is.

Actually [paths] in global config files (e.g. /etc/mercurial/hgrc,
~/.hgrc) are always resolved relative to $HOME

$ echo '[paths]' > /tmp/bleh
$ echo 'foo = bar' >> /tmp/bleh 
$ HGRCPATH=/tmp/bleh hg paths
foo = /home/alexis/bar


More information about the Mercurial-devel mailing list