Comment 7 for bug 307554

Revision history for this message
Martitza (martitzam) wrote : Re: [RFC] branching into existing directory fails

That makes good sense.

-M

On 6/25/09, Martin Pool <email address hidden> wrote:
> 2009/6/26 Maritza Mendez <email address hidden>:
>>
>>
>> On Thu, Jun 25, 2009 at 2:19 AM, Alexander Belchenko <email address hidden>
>> wrote:
>>>
>>> See https://bugs.launchpad.net/qbzr/+bug/307554
>>>
>>> I'd like to get some comments from core bzr.devs because this bug
>>> affects
>>> qbzr plugin (because qbzr launches native bzr commands under the hood).
>>> QBzr
>>> is used in Bazaar Explorer GUI, and the more I'm using bzre the more I
>>> like
>>> it. But such bugs just create bad expression about all 3 programs.
>>>
>>> It seems it could be relatively easy fix, and I'd like to see it fixed
>>> in
>>> 1.17. How can I fix it?
>
> I think if the directory is completely empty it'd be fine to just use
> it. (I thought there was a much older bug asking for the same thing.)
> It should be fairly straightforward.
>
>> Alexander: I know you are asking for iput from core dev's.  Just let me
>> add
>> my voice to saying that you understand the user experience correctly.  I
>> have refrained from saying anything about this in qbzr because I do not
>> have
>> time to develop a fix that will make everyone happy.  But I will say that
>> Bazaar Explorer exposes this issue very strongly.
>>
>> Maybe I'm thinking about htis too simply, but it seems to me that the
>> only
>> check which needs to be performed on the target filesystem when creating
>> a
>> new (non-shared) branch is to make sure the target directory does not
>> already have a .bzr repository.  (Trying to create a shared repo on top
>> of
>> an existing branch (shared or non-shared) needs to be prevented, right?)
>
> You're right that we should be careful about the case where there's
> already a .bzr directory. I think we should also be careful about the
> case where there's non-bzr content - if you then create a working tree
> there, presumably it'll have to merge with those files. (I guess it
> would be a two-way merge with no common base.) It's quite possible
> this would sometimes be useful, when the directory you're extracting
> into contains a slightly modified version of the tree you're
> extracting, perhaps from a tarball or maintained outside of vcs.
> However, it would sometimes be confusing and it would take some care
> that we actually do the merge in a reasonable way. (I think at the
> moment bzr branch just builds the tree regardless of what's there.)
> So extracting into a non-empty directory I would split off into a
> separate bug.
>
> --
> Martin <http://launchpad.net/~mbp/>
>