Comment 5 for bug 307554

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 307554] Re: `bzr branch URL .` refuses to create new branch in empty directory

On Thu, 2009-06-25 at 12:42 +0000, Alexander Belchenko wrote:
> Forest Bond пишет:
> > I think that the error should only occur if the directory exists and is
> > non-empty.
>
> Non-empty is not very good condition to check.
> How you check it when destination is bzr+ssh URL?
>
> Much better if bzr simply try to open branch in the existing directory
> and refuse to create new branch if there is already branch.
> IIUC, today check for non-existent directory is needed only to avoid
> branching into existing branch.

The logic and option name for use_existing_dir in push can be used.

As for bzr+ssh urls, I would expect 'bzr push' to be used for them, and
push already has --use-existing-dir.

-Rob