add -d and -s to show/set default paths

Matt Mackall mpm at
Tue Sep 6 20:16:46 CDT 2005

On Tue, Sep 06, 2005 at 05:57:21PM -0700, TK Soh wrote:
> --- Matt Mackall <mpm at> wrote:
> > On Sun, Sep 04, 2005 at 10:52:31PM -0700, TK Soh wrote:
> > > Thought it should be more convient than having to manually edit
> > > hgrc, and user shouldn't need to be aware that symbolic name
> > > 'default' carries a special meaning. Though I seemed to recall Matt
> > > saying it's bad to have Hg editing the file.
> > 
> > Yes, it is.
> > 
> > The syntax for .hgrc is non-trivial. Thus, hg should not be editing
> > it. Creation is an exception to this rule as there's no user-created
> > content there to mangle.
> I just saw your other post on .hg/hgrc regarding local tags. Shall
> we consider a special hg-editable rc file for holding the default
> repo path? Or we can simply make it another rc file maintained by
> hg, so that we can stuff more settings into it, in anticipation of
> Hg's future growth? We can even move the local tags into it, so that
> we don't need to have zillion rc files running around in .hg
> directory.


The reason the rc files exist is to avoid the need for endless
proliferation of command line options and environment variables. It is
perfectly reasonable to require that people edit rc files from time to
time to have access to obscure or persistent settings.

I have yet to see a strong claim for hg editing said rc files, aside
from the initial localtags implementation. Paths is specifically not
one. Your hg paths patch completely neglected default-push, which is a
good example of why that approach is trouble. Instead of two settings,
we now have four switches and a bunch more code.

We must avoid the trap of overcomplicating things. Perfect is the
enemy of the good.

Mathematics is the supreme nostalgia of our time.

More information about the Mercurial mailing list