hgrc include

Mick Jordan mick.jordan at oracle.com
Thu Nov 7 17:28:31 CST 2013


On 11/7/13 3:18 PM, Simon King wrote:
> On 7 Nov 2013, at 22:33, Mick Jordan <mick.jordan at oracle.com> wrote:
>
>> I decided to try to use the %include feature to avoid duplication. So my repo hgrc now looks like:
>>
>> %include ../hgrc-include
>>
>> In hgrc-include is:
>>
>> [web]
>> push_ssl = false
>>
>> However, when I now attempt to push, I get an 'abort: HTTP Error 403: ssl required' as if the include is not being processed. These are server-side repos accessed through hgweb. And if I add that back to the repo hgrc, my hooks, which are defined in hgrc-include do not run, more evidence the include is not working. Is this a bug or did I not understand http://www.selenic.com/hg/help/hgrc properly?
>>
>> Mick
> If you’ve got /path/to/repo/.hg/hgrc containing this:
>
>    %include ../hgrc-include
>
> Then mercurial will look for /path/to/repo/hgrc-include. Is that what you’ve actually got, or have you put the hgrc-include file one level higher, at /path/to/hgrc-include? The latter seems more likely if you are trying to share configuration between repositories, in which case you would need to do:
>
>    %include ../../hgrc-include
>
> (includes are resolved relative to the hgrc file, not the repository containing the hgrc file)
>
>
Thank you for pointing out my rather stupid mistake. I had indeed 
forgotten about the .hg dir being in the path!

Mick



More information about the Mercurial mailing list