How to merge trunk conflicts safely in bzr (bazaar.canonical.com/)

2011 August 23
tags: ,
by mcgrue

Sadly, the openstack community currently uses bzr instead of git. Instead of rebasing, this is the process by which I have to deal with tree conflicts “safely”?

bzr branch lp:trunk_project merge_temp_dir
cd merge_temp_dir && bzr merge ../your_original_branch
vi path_to_the_conflicted_files #and make your merges
bzr resolved
bzr commit -m "resolving commits."
bzr push --overwrite lp~myusername/path/to/my/branch

I hate this. And I’m storing it here so I can reference it in the future.

2 Comments leave one →
2011 August 23
troll boss permalink


function bzr_rebase {
head=$1
curr=$(pwd)
merge_dir="merge_${curr##*/}"

cd ..

bzr branch $head $merge_dir
if [ $? -ne 0 ]; then
echo "Something went wrong, you should fix that shit"
exit
fi

cd $merge_dir
bzr merge $curr
}

2013 April 17
Samuel permalink

There is a plugin to Bazaar that handles this problem for you.
“Rewrite” install that and you can do a
bzr rebase
similar to Git rebase i think.

Find a description here: http://wiki.bazaar.canonical.com/Rewrite
code : https://launchpad.net/bzr-rewrite
Ubuntu: apt-get install bzr-rebase

Leave A Comment

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS