hgrc include

Mick Jordan mick.jordan at oracle.com
Thu Nov 7 17:13:45 CST 2013


On 11/7/13 3:09 PM, Mads Kiilerich wrote:
> On 11/07/2013 11:33 PM, Mick Jordan 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?
>
> I guess the problem is caused by
> 1. confusion about what relative paths are relative to (where it first 
> of all is Mercurial that is confused)
> 2. failing includes being silent
>
Well the spec is quite clear that the include is relative to the hgrc 
file that it is found in. Hard to imagine any other interpretation.

" A line of the form "%include file" will include "file" into the 
current configuration file. The inclusion is recursive, which means that 
included files can include other files. Filenames are relative to the 
configuration file in which the "%include" directive is found. 
Environment variables and "~user" constructs are expanded in "file". 
This lets you do something like: "

Mick

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20131107/c4a47ec8/attachment.html>


More information about the Mercurial mailing list