Location Specific Configuration

Wagner Bruna wagner.bruna+mercurial at gmail.com
Fri Feb 24 15:43:43 UTC 2012


On 02/24/2012 01:27 PM, A. S. Budden wrote:
> Is there a Mercurial equivalent to Bazaar's location.conf for setting
> configuration options based on paths?
> 
> I know I can configure a per-project .hg/hgrc, but for some situations
> it would be more convenient to have a global setting.  For example,
> I'd like to do something like:
> 
>     [ui]
>     username = A. S. Budden <home at myhome.com>
> 
>     [path /home/al/work_stuff/*]
>     ui.username = A. S. Budden <myemail at mywork.com>
> 
> and have Mercurial automatically use my work email address for any
> projects I'm working on that I've cloned into /home/al/work_stuff, but
> use my home email address otherwise.  I'd rather not have to remember
> to edit every .hg/hgrc.
> 
> Is this possible?

There is an extension for that:

http://mercurial.selenic.com/wiki/ReposettingsExtension

Regards,
Wagner



More information about the Mercurial mailing list