Confused about the revision handling on our main branch!
Alexander Belchenko
bialix at ukr.net
Fri Aug 28 21:03:21 BST 2009
I'll omit the explanation why bzr do this strange thing for other people, and explain what you need
to do to solve your problem.
Set option in the .bzr/branch/branch.conf file in the branch on your server:
append_revisions_only = True
to prevent changing of revision numbers.
But you and your colleague must use different merge technique.
You need to have on local disk 3 branches:
mirror
work
integration
mirror -- is the exact mirror of the branch on server, you only pull there.
work -- is your local branch where all development goes.
integration -- you need to create this branch when you need to merge your changes with branch on the
server. So you do:
bzr branch mirror integration
cd integration
bzr merge ../work
bzr status | bzr diff | bzr resolve
bzr commit -m "merge my new cool stuff into trunk"
Now you're ready to push your changes to the server, run this command in integration branch:
bzr push xxx:server/url/
Once you pushed you can update your mirror (bzr pull in mirror) and delete your integration branch
until you need merge again.
Woxman пишет:
> Hey,
>
> I am pretty new to bazaar and a bit confused about the revision handling of
> our main branch.
> We have a shared branch of which me and my colleage has made own branches
> from. We both work at the same time making lots of local commits before we
> push it to the shared branch. And this is what I have observerd:
>
> Lets say the main branch is on revision 10 as well as my local branch. Then
> I make 5 local commits so my local branch is now on revision 15. Then I push
> my changes which makes the main branch move to revision 15 as well. Later my
> colleage wants to push his changes and lets say he only made 2 local commits
> so he is on revision 12 now (assuming he was on 10 as well from the
> beginning), now he must merge with the main branch because I have pushed new
> stuff there. Now when he pushes his code that is merged with the main branch
> all of the sudden the main branch is on revision 12 instead of 15. And the
> revisions I pushed earlier are seen as 10.1.1, 10.1.2 and so on, instead of
> 11,12,13,14,15. So the main branch went from revision 15 to 12 when using
> the "bzr revno". I get pretty confused by this, why is it doing that? I do
> understand that our submissions has to be merged, but why couldnt the main
> branch go to revision 11 instead then when I pushed and show the 10.1.1
> stuff under that revision 11 as it does after my colleage has pushed his new
> stuff?
>
> The more concrete problem we have with this is that we have connected
> RedMine to the bazaar repo, and that get very confused when the revision
> number goes down all of the sudden.
>
> I hope someone can shed some light of my problem!
>
> Thanks
> Wox
More information about the bazaar
mailing list