[PATCH 0 of 3] Add option for operating on queue repository

Dan Villiom Podlaski Christiansen danchr at gmail.com
Fri Jul 10 16:24:25 CDT 2009


2009/7/10 Martin Geisler <mg at lazybytes.net>:
> Dan Villiom Podlaski Christiansen <danchr at gmail.com> writes:
>
>> On 08/07/2009, at 00.30, Michael Sommerville wrote:
>>
>>> However, IMHO, the suggested '-Q' option is a far more elegant
>>> solution from a users perspective.
>>
>> I couldn't have said it any better myself ;)
>
> Sorry, but I don't think it is more elegant.

With all due respect, you may not be the typical example of a
Mercurial user; for starters, you hack on it ;-)

> There is also a mental difference: I think of "hg..." commands as
> working on my normal repository and "mq..." commands as working on the
> patches. The "hg q..." command do both. Thinking like that makes both
> "hg stat" and "mq stat" single concepts in my mind.
>
> The "hg -Q stat" command mixes these concepts by starting with "hg..."
> but still only touching the patches.

These are good points but…

> I guess it's a matter of training, though :-) And since I can keep my
> shell alias I cannot be opposed to adding a -Q command everywhere. I
> just don't think the argument is that clear cut as you guys make it.

…as you say there's nothing that prevents you from keeping your shell
alias around.[1] On the other hand, there are (IMHO) compelling
reasons for not installing an ‘mq’ script. This means that in order to
provide access to the MQ repository from a stock Mercurial
installation[2] we have to do it within the regular ‘hg’ script. I can
think of two ways to provide this: A prefix command like ‘hg mq *’ or
an option, such as the proposed ‘hg * -Q’. I'd consider the prefix
command a nightmare to describe and document, so the option is what I
implemented :-)

[1] In fact, with the -Q/--queue option the alias can be simplified:
Instead of  ‘alias mq='hg -R $(hg root)’, you can use ‘alias mq='hg
-Q’. It should even be ever so slightly faster…
[2] Asking users to customise their shell doesn't count; not all users
know how to do so or wish to do so, and it shouldn't be required to
use Mercurial. Besides, isn't Mercurial supposed to be more usable
than Git? (Sorry, I couldn't resist…)

-- 
Dan Villiom Podlaski Christiansen
danchr at gmail.com



More information about the Mercurial-devel mailing list