How do I configure ExamDiff Pro as the external merge tool for SourceTree

1.7k Views Asked by At

I have got this working as a difference tool with the following setup:

Diff Command: C:\Program Files (x86)\ExamDiff Pro\ExamDiff.exe

Arguments: $LOCAL $REMOTE

If I set similar for the merge settings:

Diff command: C:\Program Files (x86)\ExamDiff Pro\ExamDiff.exe

Arguments: /merge $REMOTE $BASE $LOCAL

I get an ExamDiff console window come up, sort of like an info window, but not the GUI as expected.

If I construct the merge command manually and run it at the command line, it works no problem, so I think it must be something SourceTree is doing.

If anyone has this working and can help, it would be much appreciated!

4

There are 4 best solutions below

1
Thomas On

I found a webpage for general usage of ExamDiff Pro with git here: http://www.prestosoft.com/edp_versioncontrol.asp

From that I had the idea to try this:

Diff Command: C:/Program Files/ExamDiff Pro/ExamDiff.exe

Arguments: //merge $REMOTE $BASE $LOCAL //o:$MERGED //dn1:Theirs //dn2:Base //dn3:Yours //dno:Output //nh

The //nh stands for no history and keeps ExamDiff from storing repo paths in it's diff history. The same can be added to the diff comand's arguments.

Worked for me, hope it works for you. Cheers

PS: note there's double slashes in front of the merge command

0
Ralf E. On

The answer given by Thomas did work only partially for me. It didn't work for files in subdirectories. After adding "Quotes" around the filenames and after reading the page http://www.prestosoft.com/edp_versioncontrol.asp I came up with:

Diff Command: C:/Program Files/ExamDiff Pro/ExamDiff.exe (same as Thomas' version)

Arguments: -merge "$REMOTE" "$BASE" "$LOCAL" -o:"$MERGED" -dn1:Theirs -dn2:Base -dn3:Yours -nh

Yes, you can use -option instead of /option with ExamDiff which is quite usefull when using Unix style file paths.

BTW: If you would like to use ExamDiff as git diff-/mergetool on the commandline too, here is my config to get this working: (the config given on the above page did not work!)

In your Git Bash window, enter the following commands:

git config --global diff.tool edp
git config --global difftool.edp.cmd '"C:/Program Files/ExamDiff Pro/ExamDiff.exe" "$REMOTE" "$LOCAL" -nh'
git config --global difftool.prompt false

git config --global merge.tool edp
git config --global mergetool.edp.cmd '"C:/Program Files/ExamDiff Pro/ExamDiff.exe" -merge "$REMOTE" "$BASE" "$LOCAL" -o:"$MERGED" -dn1:Theirs -dn2:Base -dn3:Yours -nh'
git config --global mergetool.edp.trustExitCode false
git config --global mergetool.prompt false
git config --global mergetool.keepBackup false

Hint: You might need to adjust the path to ExamDiff.exe.

This works for me (SourceTree 1.6.22.0 with external git 2.6.1 64bit, ExamDiff Pro 6.0.3.12 64bit on Windows 8.1 Pro 64bit)

0
VonC On

Starting git 2.9 (June 2016), you won't have to do anything more that

git config --global merge.tool examdiff
git mergetool --tool=examdiff

See commit 35d62bb, commit e36d716 (25 Mar 2016) by Jacob Nisnevich (jacobnisnevich).
(Merged by Junio C Hamano -- gitster -- in commit 34e859d, 13 Apr 2016)

"git mergetools" learned to drive ExamDiff.

mergetools: add support for ExamDiff

0
Dave C On

I have a situation where GIT is quite happy using ExamDiff Pro but Sourcetree isn't.

  • Sourcetree 3.3.8
  • Git 2.24.1.windows.2 (embedded, installed as part of Sourcetree)
  • ExamDiff Pro 11.0 (beta)

To start with, I followed the advice (which has already been mentioned) on http://www.prestosoft.com/edp_versioncontrol.asp#git

After much investigation, it seems that Sourcetree does not use the global git config at C:\Users\myusername\.gitconfig

but uses a different file at C:\Users\myusername\AppData\Local\Atlassian\SourceTree\git_local\etc\gitconfig

This is highly counter-intuitive because opening a terminal from Sourcetree and running git from the command line, it uses the first config file, but right-clicking and selecting "External Diff" it uses the second config file.

I fixed the problem by copying my settings from the first file to the second file, and now the terminal and the right-click behave exactly the same.

Anyway, I hope that helps someone.