[MERGE] Make cmd_branch check the destination before doing any I/O on the source.
Michael Ellerman
michael at ellerman.id.au
Fri Jul 7 04:14:33 BST 2006
On Thu, 2006-07-06 at 09:06 -0500, John Arbash Meinel wrote:
> Michael Ellerman wrote:
> > Hi list,
> >
> > This rearranges some logic in cmd_branch so that we check the destination
> > before doing any I/O on the source branch. This is nice for branching
> > from a remote to a local branch on slow links, if there's something wrong
> > with the destination you find out quickly. A test is included.
>
> Good but not great. The reason we connect to the remote branch first is
> that we don't want to create the local directory if the user types the
> wrong remote path. Which is probably more common than a user running
> into a local error.
>
> Probably it would be okay if we removed the directory if we failed to
> connect to the remote branch.
>
> Otherwise you probably tend to get this:
>
> $ bzr branch http://boo/bar
> bzr: ERROR: Could not connect to http://boo/bar
>
> *Oops it is foo bar
>
> $ bzr branch http://foo/bar
> bzr: ERROR: Target directory 'bar' already exists
>
> * grumble grumble
> $ ls bar
> $ ls -a bar
> * there is nothing there (grumble)
>
> $ rm bar
> $ rmdir bar
> $ bzr branch http://foo/bar
>
>
> (grumble added for effect, but I do think it would be more frustrating)
Yeah, fair enough, that would be annoying. Scrap it.
cheers
--
Michael Ellerman
IBM OzLabs
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060707/508332d8/attachment.pgp
More information about the bazaar
mailing list