Why I can't use '.' as valid TO_LOCATION argument?
John Arbash Meinel
john at arbash-meinel.com
Fri Dec 12 20:23:43 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool wrote:
> On 12 Dec 2008, Alexander Belchenko <bialix at ukr.net> wrote:
>> Is it bug?
>>
>> C:> bzr branch URL .
>> bzr: ERROR: Target directory "." already exists.
>
> Because if only one location is given to bzr branch, it's the source
> location, not the destination location. It mean "branch from this
> directory, creating a new one with the same final component". For the
> particular case of '.' perhaps there's no other interpretation but
> "change this from a checkout to a branch", but if you say "bzr branch
> ../other" do I want to branch it to "./other" or do I want to make
> "../other" branch from it's parent?
>
> Perhaps the message could be better, at least.
>
I think you are missing his argument. Put another way:
mkdir a_dir
bzr branch SOURCE a_dir
fails, but
mkdir a_dir
bzr co SOURCE a_dir
Succeeds.
It happens that the same thing is true when 'a_dir' is simply "."
I believe the reason is... someone had a use case for doing "bzr
checkout SOURCE existing_dir" and so they made the command support it.
And didn't need/expect to do "bzr branch SOURCE existing_dir".
I will also admit that if I'm doing "bzr branch SOURCE existing_dir" 90%
of the time I actually wanted
"bzr branch SOURCE existing_dir/source".
I may be unique in that, in that I put my branches into subdirectories
(repo/1.10-dev/foo, repo/1.11/bar, etc.) to help keep them manageable.
Anyway, you can certainly argue for the capability of "bzr branch URL
.", and I would certainly consider merging it.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAklCyE8ACgkQJdeBCYSNAAOAnwCgoOA3aSjXqlHOKuCr9t1psUO0
gXsAn13xC69uPvloKUb9OnO0PWKQJ/d+
=uOXq
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list