multiple [paths] sections in .hg/hgrc

Matt Mackall mpm at selenic.com
Tue Sep 6 12:41:39 CDT 2005


On Sun, Sep 04, 2005 at 08:28:53PM -0700, Bryan O'Sullivan wrote:
> On Sun, 2005-09-04 at 17:34 -0700, TK Soh wrote:
> 
> > Okay, but doesn't also zap the comments in hgrc?
> 
> Yes, but it's way harder to avoid that.

Ok, we've got a few choices:

1) copy and append new path (current behavior)
2) copy
3) copy and rewrite (Bryan's fix)
4) create fresh .hgrc (TK's fix)

1 is slightly buggy.

2 loses the parent and makes local clone different from remote clone
by copying rc info. This can be incorrect - if you've got
web:name=official copy and your clone then starts claiming to be the
official copy, that's not what you want.

3 mysteriously loses comments and probably reorders things and makes
local clone different from remote clone. 

I'm fairly convinced that copying rc data in the first place is bad
(if you've got bits you want to be global, put them in ~/.hgrc) but
losing comments and formatting on a file that's ostensibly user-owned
is worse. This is why the localtags got moved out of .hg/hgrc to their
own file - there's no flexibility in the formatting there so hg won't
screw up any hand editing.

4 behaves like remote clone with no surprises (and was in fact the
original intent).

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial mailing list