[PEBKAC] Bzr mixing up branches?

Alexander Belchenko bialix at ukr.net
Fri Jan 30 20:27:32 GMT 2009


Talden пишет:
> On Sat, Jan 31, 2009 at 8:41 AM, Marius Kruger <amanic at gmail.com> wrote:
>> 2009/1/30 Sohail Somani <sohail at worklogassistant.com>
>>> Marius Kruger wrote:
>>>> 2009/1/30 Sohail Somani <sohail at worklogassistant.com
>>>>
>>>>     Related branches:
>>>>        push branch: /home/sohail/bzr/code/master <--- HUH?
>>>>      parent branch: /home/sohail/bzr/code/master <--- HUH?
>>>>      submit branch: /home/sohail/src/ssci
>>>>
>>>> yeah that bugs me too.
>>>> Checkout and bound branches doesn't have anything to do with the above
>>>> locations.
>>>> So if you are using switch to change between the master and next
>>>> branches you should only use
>>>> update and commit. Other commands like push, pull, merge and missing
>>>> uses the above locations, so they are dangerous in this scenario IMO.
>>>> (I want to fix this but don't know what people would agree on to be a
>>>> fix)
>>> I'd say the fix would be "do what the user expected." In this case, I
>>> would *not* expect it to go to the master since I am working on the
>>> branch. Inter-branch operations should be done solely through merge imo.
>>> It seems that there are multiple ways to do the same thing which I
>>> personally can't appreciate.
>> maybe doing the right thing for bound branches is to us the master branch
>> for the push location.
>>
>>>> 2) after committing did you maybe do a `bzr push` without specifying a
>>>> location?
>>>>    with the above locations this would send your changes to the master.
>>> I think this has to be the problem. I remember doing some push/pulls. In
>>> fact, there is one "missing" as reported by bzr missing ~/bzr/code/next
>>> when I was in the master branch. Indeed, after switching to the next
>>> branch and doing a push, the missing is now in master.
>>>
>>> So... Note to self: use commit, update and merge only. Never use
>>> push/pull again.
>>>
>>> Is that more or less correct for me?
>> yes when working with a checkout, use commit/update, not push/pull.
> 
> Should we then produce an error if using push/pull in a checkout? I
> get as the scenarios document is fleshed out we will be able to
> identify combinations we should treat as errors to ensure that users
> aren't bitten by unexpected behaviour.

No. There is a plenty of legal reasons to want to do push/pull in a checkout.




More information about the bazaar mailing list