[PATCH 0 of 6] Recursive status and diff for subrepositories
mg at lazybytes.net
Thu Sep 2 03:23:13 CDT 2010
Adrian Buehlmann <adrian at cadifra.com> writes:
> On 01.09.2010 17:24, Martin Geisler wrote:
>> You can use defaults for now:
>> status = --subrepos
>> diff = --subrepos
>> But I think it would be nicer to have a general setting like you suggest
>> that turns recursion on or off in general.
> Beware of http://mercurial.selenic.com/wiki/Defaults, section
> "Controversy" :-)
Interesting, I had no idea we had such a wiki page.
From that page, it seems that the biggest "problem" with default is that
you cannot selectively turn them off. It would indeed be great to be
able to turn off all command line options with a counter-option so that
hg clone --pull --no-pull
would somehow cancel each other. Some programs have that and it works
nicely for boolean options, though I have no idea how to make it nice
for options that take arguments.
So if you dislike that you cannot turn them off like this, then by all
means please use an alias.
The fundamental advantage of the defaults is that they modify the
*existing* commands: I want my diff to always have color output, so I
setup a default for that. I don't want to use diff normally and a cdiff
alias when piping to less in order to force colors. Or maybe I always
want new mq patches to include my name, so I add --currentuser as a
Maybe the argument is that there should be ways to make the color or mq
extensions do what I want without default command line options? That may
be, but that still does not make it easy to turn off the behavior on a
per-command basis so using the defaults section is just a cheap way of
implementing this instead of doing it again and again for each
Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the Mercurial-devel