[PATCH 1 of 2] showconfig: add --edit option for editing .hg/hgrc

Matt Mackall mpm at selenic.com
Mon May 3 15:20:33 CDT 2010


On Sun, 2010-05-02 at 18:29 +0200, Laurens Holst wrote:
> Op 29-4-2010 1:48, Matt Mackall schreef:
> > (The related idea that using your editor on a text file is hard for
> > people using an SCM is just ridiculous. Please, folks, don't bring it up
> > or I will be forced to ridicule it.)
> >    
> 
> Not for a human, but when you want to reliably script modifications to 
> configuration files, something like git-config would be really convenient.

Reliably? That's just not gonna happen, folks. There are includes, there
are ordering issues, there are repeated sections, there are directives
to cancel earlier definitions, there are comments to preserve, etc. You
can very easily make something that works for the simple cases[1], yes,
but making something that handles the interesting cases correctly is
hard to impossible and I'm just not interested in going down that road.
I'm also not interesting in making people think automated editing of
hgrc files with scripts is a great idea.

[1] echo -e '[wow]\nthat=really -was- easy' >> .hg/hgrc

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list