[PEBKAC] Bzr mixing up branches?
Sohail Somani
sohail at worklogassistant.com
Fri Jan 30 19:22:37 GMT 2009
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.
I come from a P4/SVN background where there is pretty much only one way
to merge branches.
> Yesterday, I wanted to fix a bug in the master branch so I switched to
> it. Looking at the log however, I noticed that all the checkins I had
> made to the next branch are in the master directory, although under the
> branch nick "next".
>
> Some stabs in the dark:
> 1) how did you create next?
> if you did `bzr checkout master next` , that would explain how it
> ended up in master. (anything going to next would go to master
> automatically)
This was done via "bzr branch master next"
> 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?
Also, can you tell me how I can "unpull" these changes?
> regards
> marius
Thank you very much Marius.
More information about the bazaar
mailing list