[PATCH v2] commands: add editconfig command to edit repo/user hgrc
Mads Kiilerich
mads at kiilerich.com
Wed Aug 25 11:16:00 CDT 2010
On 08/25/2010 05:49 PM, Brodie Rao wrote:
> On Aug 25, 2010, at 8:03 AM, Mads Kiilerich wrote:
>> The documentation is unix-centric and not correct on windows.
>
> Are you referring to the use of "$HOME/.hgrc" in the command help? hg
> paths uses it as well, so that's what I went with.
That's a bug in the paths help, IMHO.
> If you mean the "~/.hgrc" in the example config, I'm not sure what I
> could put there without going into a long explanation of all the
> possible locations.
>
> Do you have any suggestions on what to say instead?
My best and primary answer is no. And if we can't describe clearly what
this command does then ... we have a problem.
But incorrect help is worse than no help. A vague reference to the long
and correct explanations would perhaps be better.
>> A refactoring introducing something like ui.editfile could perhaps be
>> nice.
>
> Sure. I didn't use ui.edit() because I thought it'd make more sense to
> edit the file directly. It'd be confusing when the user thought they
> opened up .hg/hgrc but there's a random filename in their editor instead.
I meant something like the patch I just sent
(http://www.selenic.com/pipermail/mercurial-devel/2010-August/024001.html).
Something I needed for another unfinished patch.
> On the other hand, writing the example config directly to .hg/hgrc means
> it'll stay there even if the user didn't change anything in it.
Yes - that is a disadvantage ;-)
/Mads
More information about the Mercurial-devel
mailing list