openerp-dev team mailing list archive
-
openerp-dev team
-
Mailing list archive
-
Message #00006
bzr-rebase plugin: upgrade to bzr-rewrite 0.6.0
-
To:
openerp-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Olivier Dony <odo@xxxxxxxxxxx>
-
Date:
Mon, 09 Aug 2010 13:15:40 +0200
-
Organization:
OpenERP s.a.
-
User-agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6
Hello everyone,
Some of you are certainly aware of the bzr-rebase plugin, which is quite
useful to avoid having to commit ugly "merge with same branch" revisions.
Here's an example:
Say you have a number of commits in your local branch and you try to
push them, but meanwhile someone has already pushed other changes so
your push is refused because "these branches have diverged".
You have 2 clean options:
1) do 'bzr uncommit' of your changes, then 'bzr pull' (+solve
conflicts), then commit again and push again your changes
2) do 'bzr rebase', then push again (if the rebase is interrupted by a
conflict, solve the conflict then don't forget to do 'bzr
rebase-continue' until everything is rebased)
Note: No, doing 'bzr merge' is not option 3, because it is broken: it
would hide the latest remote commits behind an artificial merge
revision, it would break the "bzr blame" history (will look like you did
all the changes), and it would even change the sequence of the
revisions. Granted, this looks like a design flaw in bzr, but we have to
learn how to use our tools efficiently. Please avoid doing this at all
cost, and use options 1 or 2.
Now, you should know that version 0.5.5 of the bzr-rebase plugin suffers
from a severe bug that makes it discard silently all merge revisions:
https://bugs.launchpad.net/bzr-rewrite/+bug/266897
This means that if your local commit contains a merge from a feature
branch, it will be lost if you rebase before pushing it.
This bug is fixed in version 0.6.0 of the plugin (which has also been
renamed to bzr-rewrite). Unfortunately, 0.5.5-1 is still the latest
version in the Ubuntu package repositories.
To upgrade to 0.6.0 you can however do one of the following:
1) Use the debian package by downloading it from
http://packages.debian.org/sid/all/bzr-rewrite/download and then install
it with:
$ sudo dpkg -i bzr-rewrite_0.6.0-1_all.deb"
2) Or uninstall the previous package if you had it installed (to avoid
conflicts), for example by doing:
$ sudo aptitude remove bzr-rebase
then install it in your local plugins by grabbing it from LP directly:
$ mkdir -p ~/.bazaar/plugins
$ bzr branch lp:bzr-rewrite/trunk ~/.bazaar/plugins/rewrite
I hope this will save some headaches if you are starting to use
bzr-rebase :-)
--
Olivier Dony