Global subrepository config option?

Matt Mackall mpm at selenic.com
Wed Sep 15 07:17:11 CDT 2010


On Mon, 2010-09-13 at 14:26 +0200, Martin Geisler wrote:
> Hi everybody,
> 
> The following commands now support the --subrepos flag that lets them
> work transparently on subrepositories:
> 
> * add
> * incoming
> * outgoing
> * status
> * diff
> 
> I expect that people want to use this option almost all the time if they
> are heavy users of subrepos. My client suggests that we make a global
> config option that will enable recursive behavior (or disable it).
> 
> Something like
> 
>   [subrepos]
>   recurse = True
> 
> Perhaps it would also be smart to make the --subrepos option a Boolean
> option, similar to how the --color option behaves:
> 
>   hg status --subrepos=never  # no recursion
>   hg status --subrepos=yes    # yes, please recurse into subrepos
>   hg status --subrepos        # interpret this as yes (True)
> 
> That way, the user can override the config file as needed. This should
> also work for commit, then:
> 
>   hg commit --subrepos=no -m 'Just the top-level files'
> 
> but maybe that is more controversal?

Can you imagine a situation where:

a) a filename is reported by status with this option enabled
b) naively feeding that filename back into hg will cause
highly-confusing breakage

As I've pointed out on this list multiple times now, this is what will
happen with basically EVERY Mercurial wrapper and GUI tool when it
encounters this new option and attempts any number of reasonable things
on the reported files (cat, log, annotate, etc.). We could disable this
option with HGPLAIN, but then we'll instead get questions about why it
has no effect.

It's WAY too early in the game to pretend we can do subrepos
transparently. And when we can do them transparently, it won't need an
option!

Please don't make me be the bad guy every single time and think of these
compatibility issues before posting shiny new ideas.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list