[PATCH] Check for .hgrc files in ancestor directories above the repository

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Sun Jan 13 00:57:22 CST 2008


> I'm still sticking with my last proposal for now, except with a minor
> syntax variant to make it simpler to document and read:
> ...
> [hooks at 9117c6561b0b]
> incoming.build = make all
> [defaults at 9117c6561b0b]
> log = -M

Neat. Much better syntax than before. Allows for easy copy/paste from
.hg/hgrc to ~/.hgrc. Has no mulitple match and consequent include
ordering problems.

+1

-peo


On Jan 13, 2008 3:17 AM, Jesse Glick <jesse.glick at sun.com> wrote:
> Peter Arrenbrecht wrote:
> > I'm happy now. Jesse?
>
> My opinions:
>
> 1. 0-revision matches would do everything I want already. I have not
> heard of a use case to justify the added complexity of repository path
> matching.
>
> 2. Having configuration in ~/.hgrc which then points to additional
> configuration files seems unnecessarily confusing.
>
> I'm still sticking with my last proposal for now, except with a minor
> syntax variant to make it simpler to document and read:
>
> ---%<---
> To set default values for all clones of a repository, just suffix the
> section name with an '@' and the result of 'hg id -r0'.
>
> For example: to hide merge commits and build immediately after pulls,
> but just for copies of Mercurial sources and not other projects, use
>
> [hooks at 9117c6561b0b]
> incoming.build = make all
> [defaults at 9117c6561b0b]
> log = -M
> ---%<---
>
> No globs, no new files, no security issues that I can think of.
>
> Searching for a file such as ~/.hgrc-9117c6561b0b (with normal-looking
> sections and key names) might be reasonable for Unix users, but I fear
> the naming scheme would not work as well on Windows, given both the
> custom of having a file extension such as '.ini' and the current lookup
> of an RC file path in the Registry for use by installers. (I don't
> really follow Maxim's fear of searching for config in more than one
> file, though; Hg already does this on Unix at least. Probably the
> showconfig command should anyway be enhanced to list which config files
> it reads, to make this more transparent.)
>
> Anyone else care about this enough to comment?
>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>


More information about the Mercurial-devel mailing list