Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

External diff tool FileMerge don't start when I press the "Diff Externe" button.

Patrick Jeanson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 13, 2012

External diff tool FileMerge don't start when I press the "Diff Externe" button. Other external diff tools works correctly such as DiffMerge, but I had to add a softlink.

For FileMerge tool, nothing is modifiable when we select it. Adding a softlink did not improve the situation:

sudo ln -sf /Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge /usr/bin/FileMerge

This trick worked file for diffmerge but not for FileMerge.

Here are the details of the links I did:


lrwxr-xr-x 1 root wheel 59 12 fév 10:18 /usr/bin/diffmerge -> /Applications/DiffMerge.app/Contents/Resources/diffmerge.sh
lrwxr-xr-x 1 root wheel 72 13 fév 19:51 /usr/bin/filemerge -> /Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge
lrwxr-xr-x 1 root wheel 72 13 fév 19:51 /usr/bin/FileMerge -> /Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge

Thanks for your help.

5 answers

1 accepted

6 votes
Answer accepted
Patrick Jeanson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 14, 2012

Thanks for the tip about opendiff as the name.

I ran opendiff on a command line and got:

Mac-mini-de-Patrick:~ patrickjeanson$ opendiff
xcode-select: Error: No Xcode folder is set. Run xcode-select -switch <xcode_folder_path> to set the path to the Xcode folder.
Error: /usr/bin/xcode-select returned unexpected error.

So I did the following command on a terminal:

Mac-mini-de-Patrick:~ patrickjeanson$ sudo xcode-select -switch /Developer
Password:
Mac-mini-de-Patrick:~ patrickjeanson$ opendiff
2012-02-14 18:43:14.542 opendiff[31684:10f] too few arguments
2012-02-14 18:43:14.547 opendiff[31684:10f] usage: opendiff file1 file2 [-ancestor ancestorFile] [-merge mergeFile]

Bingo!

I set the right parameters in SourceTree and the diff was launched properly.

ie. opendiff $BASE $LOCAL

Thanks to all.

Patrick.

stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2012

Thanks, I'll add this to the Knowledge Base too.

3 votes
laguiz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 2, 2014

Quick tips : I just had to run `sudo opendiff` and then accept the license. After opendiff open properly.

SourceTree 1.9.8

XCode 6.0.1

Becca Owens
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 25, 2016

Thank you, this worked great for me.

Matt July 5, 2018

Worked for me as well. Thank you!

1 vote
Christopher Prince June 24, 2016

When I do `sudo opendiff` at the command line, I get:

xcode-select: error: tool 'opendiff' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Justin Vallely
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 11, 2019

You need to install Command Line Tools in Xcode Preferences -> Locations (as of Xcode 10.2.1)

1 vote
badlydrawnrob March 17, 2012

I've been struggling with this as well — seems it's a problem with other apps, I followed the instructions here http://www.gitboxapp.com/

It doesn't come pre-installed with Command Line tools, install them under Xcode preferences then:

sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer

That seems to do the trick!

0 votes
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2012

SourceTree actually needs to use the command line tool for FileMerge, which is called 'opendiff'. This should have been installed when you installed XCode, it usually lives in /usr/bin/opendiff.

stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2012

OK, I think they moved it to /Developer/usr/bin/opendiff. Probably the best way to resolve this is to add /Developer/usr/bin to your /etc/paths - or you could symlink opendiff to somewhere on one of your existing paths.

stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2012

Hmm, actually I wonder whether this is installed if you've only ever installed XCode from the Mac App Store. If it's missing, that would explain things, but I wonder where it's gone in that case.

Jonathan Ferguson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 26, 2014

I also needed to run

sudo opendiff

as Xcode was complaining that I'd not agreed to the license. After this File Merge worked as expected.

Thank you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events