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

Dan Villiom Podlaski Christiansen danchr at gmail.com
Wed Jul 15 04:06:16 CDT 2009


On 13/07/2009, Matt Mackall <mpm at selenic.com> wrote:
> Here's another alternative:
>
> hg -R mq push/pull/in/out..
>
> where 'mq' is a magic name that gets added to 'hg paths' when mq is
> enabled (and is of course equal to .hg/patches). We already have a
> precedent for adding magic paths in the zeroconf modules.

I haven't used the Zeroconf extension,[1] but I suspect there's a major difference to your proposal: the ‘mq’ alias would be fixed and present whenever the extension is loaded, and the user cannot change it. After all, directories named ‘mq’ do exist out there.[2] Additionally, I believe there are usability issues with a path alias. It seems too magic, and whilst Zeroconf also adds ‘magic’ paths, I don't think its comparable to queues; where such paths are the sole purpose of one extension, they are a side effect of the other, and might surprise some users.

I can't help but find the acceptance of your proposal a bit suprising, considering the criticism ‘hg -Q <command>’ was too verbose compared to the currently recommended ‘mq <command>’ alias. The option added two extra characters/keystrokes, but the path alias would add four or seven[3] characters/keystrokes.

However, I'm probably emotionally attached to using an option, having proposed it :) For now, I think I'll just clean the prerequisite patches up and submit them; they ought to be useful anyway…

[1] I tried once, but I wasn't able to get it to work with the DNS responder built into Mac OS X…
[2] It may not be a common directory name, but it does see use. Consider these search results, for example: <http://www.google.com/codesearch?as_case=on&as_filename=%2Fmq%2F>
[3] Ignoring whitespace, and depending on whether ‘-R’ or ‘--cwd’ is used.


--

– Dan Villiom Podlaski Christiansen
stud.scient., danchr at gmail.com



More information about the Mercurial-devel mailing list