[rfc] bzr --cd=/any/where rocks
Colin D Bennett
colin at gibibit.com
Wed Jan 28 05:47:44 GMT 2009
On Tue, 27 Jan 2009 23:52:08 +0100
Jelmer Vernooij <jelmer at samba.org> wrote:
> On Wed, 2009-01-28 at 00:37 +0200, Marius Kruger wrote:
> > 2009/1/28 Jelmer Vernooij <jelmer at samba.org>
> > thats sort of my point: some commands take a "directory" option and
> > others
> > take a -d option, and some does not implement something like this eg.
> > missing
> These options are the same thing -d is the short option name and
> --directory is the long option name. I don't think there is
> inconsistency in how this option works for the different commands,
> except that it is not yet available for all commands.
Yes, I posted about this a while back. It is really confusing to me at
times when to specify a directory as a plain argument and when to use
'-d' as the option. For instance:
export
This command takes a destination as the first argument, and the
source as the second argument (!). I use this often enough that I
can remember this oddity, and I understand the reasoning behind it
(the first argument, destination, is required, but the second
argument, source, is optional) but it still seems like a wart.
switch
I'd like to switch a checkout to another branch with fewer keystrokes
when I'm in the parent directory, for instance. This command should
support the '-d' / '--directory' option.
missing
As Marius pointed out, the 'missing' command should support the '-d'
option.
tags vs. info/version-info
I think the 'tags' command and the 'info' and 'version-info' commands
are similar in purpose, but for some reason, 'tags' uses the '-d'
option to specify the subject to operate on, while 'info' and
'version-info' accept a plain argument to specify the subject.
ls vs. ignored
While 'ls' accepts a path, the similarly-used 'ignored' command
accepts neither a path argument nor the '-d' option.
I think the appropriate solution is to make '-d' / '--directory' an
option that is accepted by all commands that are affected by the
current directory. The semantics of this option should be such that it
is the same as if the specified directory was the current directory for
the purposes of inferring the branch/tree/repository.
Basically, it should never be *required* to change the current
directory in order to execute a bzr command; the '-d' option should be
an alternative to changing to that directory.
I wonder whether references to files on the command line should then be
interpreted as relative to the '--directory' value specified (acting
as if the user had actually changed the current directory to that
directory), or not.
Regards,
Colin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090127/701400f7/attachment.pgp
More information about the bazaar
mailing list