[PATCH] Check for .hgrc files in ancestor directories above the repository
Maxim Dounin
mdounin at mdounin.ru
Sat Jan 12 08:31:14 CST 2008
Hello!
On Sat, Jan 12, 2008 at 08:46:59AM +0100, Peter Arrenbrecht wrote:
>On Jan 11, 2008 10:22 PM, Jesse Glick <jesse.glick at sun.com> wrote:
>> John Coomes wrote:
>> > Here's a modified proposal: If .hg/hgrc has a [clonable] section,
>> > then the items listed there should be copied when the repo is cloned,
>> > subject to the usual user restrictions. Items in the [clonable]
>> > section are just names without values.
>>
>> I would be happy with this too. Simpler to explain than any of the
>> include-file proposals, handles the basic use case. Anyone else?
>
>I still like includes better (see my latest re-explained proposal with
>.hginclude files).
>
>I normally have a dedicated parent folder for all of my clones of a
>particular project (for example hg, hg-stable, crew, ... all within a
>parent "hg" folder). Now when I clone another remote repo
>(crew-stable, or some contributor's, for instance), the include file
>approach would work immediately. The copy-on-clone approach would not.
>
>Sometimes I also start the remote clones from scratch again (my way of
>reestablishing hardlinks - maybe not the best way). Same problem then.
>
>So while I could live with copy-on-clone, I would prefer includes.
What about
[include]
~/hg/ = ~/.hgrc-hg
~/mutt/ = ~/.hgrc-mutt
syntax in config?
The first one is directory prefix to match, the second is config
to include if repo directory matches.
Basically we get:
1. No security risks.
2. Flexibility.
3. Single config, so easy to debug.
Maxim Dounin
More information about the Mercurial-devel
mailing list