[rfc] bzr --cd=/any/where rocks

Jelmer Vernooij jelmer at samba.org
Tue Jan 27 22:21:01 GMT 2009


On Wed, 2009-01-28 at 00:04 +0200, Marius Kruger wrote:
> hi
> I'm very eager to implement a global option to change the current dir
> where bzr is going to execute from.
> It will be very useful for scripts and commandline usage.
> I find it a pain to cd into a dir to run a single arbitrary command
> and to cd out again.
> 
> I know some commands have this feature but they took it further to
> support any branch url.
> I want a generic way which works for local dirs for any command
> without needing to think about it or having to read the docs to see if
> its implemented for a command.
> 
> I mention it here to gauge if there are any strong objections to this
> before I do the effort.
> (and maybe I get some tips)
I think it makes more sense to add a generic option to Bazaar that can
be easily used and make use of that in more places than to add a global
option. 

E.g. allowing "directory" in the takes_options array like we already
allow "revision". What commands are there that you think could use -d
but don't support it at the moment?

There is not actually a need for every command to support this option.
E.g. "bzr log", "bzr branch", "bzr checkout" and "bzr diff" take a path
already.

I also don't think it is actually necessary to change the directory in a
lot of situations and that it can actually be harmful since *all* paths
would be interpreted relative to the option specified in --cd. For
example, take "bzr push -d ../somedir subdir". This would behave
differently when used with an option that does an actual chdir.

That said, I very much like the -d option, and agree it should be
available in more places.

Cheers,

Jelmer
-- 
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at jabber.fsfe.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090127/cf36ac49/attachment-0001.pgp 


More information about the bazaar mailing list