[PATCH] Add %includeifexists, a new type of hgrc include
mg at aragost.com
Tue May 31 10:57:08 CDT 2011
Matt Mackall <mpm at selenic.com> writes:
> On Tue, 2011-05-31 at 17:30 +0200, Martin Geisler wrote:
>> Matt Mackall <mpm at selenic.com> writes:
>> > On Tue, 2011-05-31 at 01:19 +0100, Tom Fitzhenry wrote:
>> >> # HG changeset patch
>> >> # User Tom Fitzhenry <tom at tom-fitzhenry.me.uk>
>> >> # Date 1306801124 -3600
>> >> # Node ID 029faced02ef51b7de5c6603f81580267d669c1e
>> >> # Parent f6a433671c06ea7986e0cf2c54686d1af7f22ba1
>> >> Add %includeifexists, a new type of hgrc include
>> >> Use case: a user has a hgrc which is shared across multiple machines,
>> >> /some/ of which have configuration specific to that machine. %include
>> >> allows the user to include another configuration file, but causes a
>> >> parse error if the included file does not exist.
>> > Perhaps we should just drop the parse error. This might make it harder
>> > to debug problems with specifying the filename, but would otherwise be
>> > harmless. Thoughts?
>> I would like that, along with a ui.debug message. Maybe we could then
>> let showconfig output a warning so that it's very clear what's going on.
> Unfortunately, there are no ui objects at this layer.
Then I prefer just ignoring the exception -- I prefer that over
introducing a new %tryinclude directive.
Professional Mercurial support
More information about the Mercurial-devel