[PATCH v2] commands: add editconfig command to edit repo/user hgrc

Mads Kiilerich mads at kiilerich.com
Wed Aug 25 07:03:39 CDT 2010


On 08/25/2010 01:39 PM, Martin Geisler wrote:
> Brodie Rao<brodie at bitheap.org>  writes:
>
>> # HG changeset patch
>> # User Brodie Rao<brodie at bitheap.org>
>> # Date 1282591581 14400
>> # Node ID 6d8b574052369e3a88c37a37a51b0e940bd6ac45
>> # Parent  2315a95ee88759ad2ed250dcbf2fc93be4073688
>> commands: add editconfig command to edit repo/user hgrc
>
> I like this a lot and the patch looks solid. Does anybody have anything
> to add?

Something similar was proposed in 
http://markmail.org/thread/lt5c2ollea4shtzy , and the relevant comments 
there should be considered. I think the result back then was -0.2 .

Some comments to this patch:

The documentation is unix-centric and not correct on windows.

I think this command should be mentioned in hgrc man page and showconfig 
help.

A refactoring introducing something like ui.editfile could perhaps be nice.

I don't like hardcoding templates suggesting extensions. If we have 
templates anyway then I suggest using # for comments instead of ; - I 
think that is more intuitive, despite not being the standard in windows 
ini files. And we definitely don't want comments after the uncommented 
settings - that gives the misleading hint that comments can be placed 
everywhere.

/Mads


More information about the Mercurial-devel mailing list