External diff tool

Asked by philw

I'm starting to use Bazaar and I'm just checking out that it all works before I commit to it in anger. My development environment is exclusively win7. Some basic tests work ok - I can get everything to work including networked repositories and branches etc, so now I'm checking that I can diverge and merge. Scenario, this in "Bazaar Explorer":

(1) Create a test repository (test1) and put one ASCII file in it, commit that file.
(2) Push that repository to a new network location via SFTP.
(3) Create a second test repository ("test2") and pull the file from SFTP down to it.

Now I have two repositories both with identical content. Make a change in one, commit it, push it, then synchronize the other repository... that all works as expected. Then...

(4) Modify the file separately in each test repository and commit.
(5) Push the file from test1 to the SFTP repository - results in "working tree is up to date at revision 3".
(6) Try to do the same from test2 and it whines that test2 is out of date (this written from memory - I've been trying to fix this for a few hours).

Ok, so that makes sense...
- I now have a screen which says "working tree differs from revision 3". Correct.
- It says I have a "conflict" in the test document, also correct.
- It has created three files test.txt.BASE, test.OTHER test.txt.THIS.

I can work out from the documentation
what those are. The UI points out that they are "unversioned", which they of course are: they're not "source" files.

Question 1: Do I have to explicitly set "ignores" on *.THIS, *.OTHER and *.BASE in order to keep these files out of my way?

Ok, so I can ignore the files, or I could go and find them in Windows Explorer and then somehow resolve the differences by hand and eventually replace test.txt with a "merged" version, and then push that back. This seems rather error prone and not quite what I had in mind - if merging is that hard, I think I'd be better off with a traditional "lock" approach to VC. That can't be right.

"Show differences" works ok, and shows me my differences as expected. What's next.... "resolve conflicts". Up pops a dialo. Right click the file and select "merge conflict", and... "Error while running merge tool (code 0)." I could not get anything sensible to happen here. I get the same error if I come at it from the tortoise UI also. Ok, so I try to switch from the internal diff tool to one of the others I already have installed - winMerge for example. I configure that according to various sources including this:
In summary I put an "alias" into the conf file, then restart the app. Then I put "wdiff" into the "merge" tab of the configuration dialog. Although I'm pointing at the right place, with my slashes the right way around, I can't get away from this code zero error. This tinkering seems to make no difference at all.

Question 2: Does anyone know how configure this to merge simple text files?
I absolutely don't care which or what merge tool I use, although I'd rather it was full screen - my days of hacking
green screens, coding sheets and card readers are far enough behind me that I don't want to go back.

What does "use configured default" do - there's some interesting looking gray text appears in the box when I clieck that and it says something about "qconfig under merge tab" - what's that all about? It seems to make no difference.

I can see from here: https://answers.launchpad.net/bzr-explorer/+question/85545 how to add WinMerge as a "tool"
   <tool action="C:/Program Files/Tools/WinMerge/WinMergeU.exe" title="WinMerge" type="application" />
I did that too, but it just puts winmerge on the tools menu, which works pretty much as well as starting it from the windows start menu. Have I missed something there?

Question information

English Edit question
Bazaar Explorer Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
philw (philip-wigglesworth) said :

Ok, "Error 0" means "there's something wrong with the command line you're using to launch your external merge tool. If I try (for example):
  "C:/Program Files (x86)/WinMerge/WinMergeU.exe" %o %t %r
then I see no error zero. So either the alias is not working as I'd guess it should, or I specified the target of the alias incorrectly. The above isn't quite right in that the "%o" is not being translated, but at least I get no error zero.

Revision history for this message
philw (philip-wigglesworth) said :

Ok, Question 2 is answered: you don't need to provide any parameters to WinMerge, just set it in qbzr.conf (no idea what "qbzr" stands for, but the ui tool-tip seems to call it "qconfig" - I think that's the right file. Anyway, the line seems to be:
 merge_tool = C:/Program Files (x86)/WinMerge/WinMergeU.exe
That starts it up ok. But I've no iea what it does with the output file... doh!

Revision history for this message
philw (philip-wigglesworth) said :

Ok, I switched to perforce merge and I can make that work by:
(1) In C:\Users\philw\AppData\Roaming\bazaar\2.0\bazaar.conf under [ALIASES] add: p4mrg = C:\Program Files\Perforce\p4merge.exe
(2) when exiting the tool, tell it to "save" over the original file name, by hand.
I assume that's how it is supposed to work.

Revision history for this message
Alexander Belchenko (bialix) said :


1) WinMergeU.exe requires only one parameter to resolve conflicts: path to file with conflict marjers, which is obviously your original file test.txt

2) You don't need to explicitly ignore THIS/BASE/OTHER files, because they will gone when you successfully resolving conflict.

3) Please, don't put so much questions in one question.

Can you file a simpler separate questions for every issue you're encounter? Maybe it's better to use bazaar mailing list for such long posts instead?

Can you help with this problem?

Provide an answer of your own, or ask philw for more information if necessary.

To post a message you must log in.