Cannot find FileMerge (opendiff tool) but I have xcode 4.6 installed
Asked Answered
B

4

6

When I attempt to run FileMerge as a GUI for Opendiff, I receive an error:

$ git mergetool -t opendiff
Merging:
Gemfile
Gemfile.lock
...

Normal merge conflict for 'Gemfile':
  {local}: modified file
  {remote}: modified file
Hit return to start merge resolution tool (opendiff): 
2013-12-26 20:00:20.248 opendiff[22367:e07] Couldn't find FileMerge
Gemfile seems unchanged.
Was the merge successful? [y/n] ^C
$

I have installed XCode 4.6.3 and Command Line Tools for Xcode April 2013. I am running OSX 10.7.5

I have tried solutions from the following two links with no success:

git diff with opendiff gives "Couldn't launch FileMerge" error

Is filemerge still available after Xcode 4.3 installation?

When I go to Xcode -> Open Developer Tool I do not see FileMerge in the list of options. There is a More Developer Tools link that takes me here: https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-

How do I get FileMerge working?

Borate answered 27/12, 2013 at 1:10 Comment(3)
I think FileMerge is supposed to be installed by default. Do you not have /Applications/Xcode.app/Contents/Applications/FileMerge.app?Fingered
ls /Applications/Xcode.app/Contents/ does not show an Applications folderBorate
Hm, I have Xcode 5. I think the tools might have been in a different directory in 4. Try searching inside the entire Xcode.app package (use find).Fingered
A
6

Strange. "XCode 4.5, where is FileMerge ?" suggests:

The FileMerge that is bundled with Xcode 4.5 doesn't work as a standalone application. I tried compressing it from the application bundle. I was able to expand it to show the FileMerge app on the desktop. But when I tried to run it I got an error saying it couldn't be opened.

Apple's developer downloads site has every version of Xcode. You could try trashing your current version of Xcode 4.5, downloading Xcode 4.5 from the developer downloads site, and see if FileMerge is there. If not, you can download Xcode 4.4 and see if that has FileMerge.

Indeed, I downloaded a fresh new install of XCode 4.5 and put my updated 4.4 to 4.5 upgraded version into the trash and I have now all the developer tools again, including FileMerge. Weird...


The other option, from that same thread:

Why not just install the Command Line Tools? That will give you the "opendiff" tool. Then, you create a little script like this one to make it useful and actually do a merge.

#!/bin/sh

# Get a hold of the last parameter.
eval LAST=\${$#}

# Now run opendiff with the previous version and the current version.
opendiff ${*} -merge "$LAST"
Ake answered 10/1, 2014 at 7:46 Comment(0)
C
22

FileMerge is located at within Xcode.

From the command-line:

cd /Applications/Xcode.app/Contents/Applications/
open .

Go into that directory once it opens:

  1. Right-click on the app
  2. Choose "Make alias"
  3. Move that alias to your Applications directory

You're all set.

Cookshop answered 21/5, 2014 at 15:26 Comment(0)
A
6

Strange. "XCode 4.5, where is FileMerge ?" suggests:

The FileMerge that is bundled with Xcode 4.5 doesn't work as a standalone application. I tried compressing it from the application bundle. I was able to expand it to show the FileMerge app on the desktop. But when I tried to run it I got an error saying it couldn't be opened.

Apple's developer downloads site has every version of Xcode. You could try trashing your current version of Xcode 4.5, downloading Xcode 4.5 from the developer downloads site, and see if FileMerge is there. If not, you can download Xcode 4.4 and see if that has FileMerge.

Indeed, I downloaded a fresh new install of XCode 4.5 and put my updated 4.4 to 4.5 upgraded version into the trash and I have now all the developer tools again, including FileMerge. Weird...


The other option, from that same thread:

Why not just install the Command Line Tools? That will give you the "opendiff" tool. Then, you create a little script like this one to make it useful and actually do a merge.

#!/bin/sh

# Get a hold of the last parameter.
eval LAST=\${$#}

# Now run opendiff with the previous version and the current version.
opendiff ${*} -merge "$LAST"
Ake answered 10/1, 2014 at 7:46 Comment(0)
E
1

if you have xcode installed, then you can probably run the following from the command line to open FileMerge directly

open /Applications/Xcode.app/Contents/Applications/FileMerge.app/
Evante answered 31/5, 2019 at 10:27 Comment(0)
F
0

Try reinstalling Xcode. I had the same issue and it fixed it for me! It appears the Merge utility got corrupt somehow.

Fugate answered 11/1, 2014 at 0:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.