Bazaar doesn’t do much for you, by default, when it comes to resolving conflicts. If a conflict occurs, the file in question will be merged with sections of text indicating the conflict. In addition, three files will be created using the original file name and appending THIS (the file before the merge), OTHER (the file being merged) and BASE (the revision THIS and OTHER have in common). With this information, it would be possible to manually correct the conflict, but this can be tedious and error prone. It’s easier to use a graphical merge tool to do this. There’s a great merge tool available for free called P4Merge. You could manually use P4Merge to open the respective versions of the file in order to perform the merge, but that can be a pain when there’s a lot of conflicting files.
A better solution exists. There’s a Bazaar plugin that adds an extmerge command. Once this plugin is installed (follow the directions in the plugin link), you need to configure it to use P4Merge.
PS> notepad $env:APPDATA\bazaar\2.0\bazaar.conf
Add a line like this.
external_merge = p4merge %b %t %o %r
Here’s an explanation of the replaceable parameters, in case you want to use a different graphical merge utility.
|%r||results file, or the original file|
With this all set up, when a conflict occurs, you simply do this:
PS> bzr extmerge --all PS> bzr resolve --all
This will first run your external merge program and then tell Bazaar that the conflicts have been resolved. The "–all" option does this for all conflicting files. You could instead specify which conflicting file to operate on. Once resolved, you’ll still need to commit the changes.