How to: Use GUI edit/diff/merge tools on Mac OS X

If you are having a problem using SourceOffSite, post a message here.

Moderator: SourceGear

Post Reply

How to: Use GUI edit/diff/merge tools on Mac OS X

Post by tfield1974 » Mon Jan 10, 2005 2:37 pm

To convince SOS 4.1.1 to view or edit files in your favourite editor, use a command like this in the first field of the "External Programs" dialog box:

open -a /Applications/BBEdit\ 6.5/BBEdit\ 6.5 "%s"

In my case, I use BBEdit. If you want to use your "default" registered editor, drop the "-a /Applications/BBEdit\ 6.5/BBEdit\ 6.5" part. SOS will bomb though, if no editor is registered for the file type, so I always force the use of BBEdit. You can look at the command options for "open" from the terminal window.

To convince SOS 4.1.1 to use the groovy FileMerge utility that comes with the Apple developer tools, enter this in the two diff fields of the "External Programs" dialog box:

opendiff "%s" "%s"

OpenDiff is the command line interface to FileMerge. You can also use it for merging, as its usage is:
opendiff file1 file2 [-ancestor ancestorFile] [-merge mergeFile]

Trial and error is fun. Can we have this put into some sort of document, SourceGear?


Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Mon Jan 17, 2005 3:41 pm

Thanks for the information. We'll try to do a write up on installing SOS on a Mac and using the diff tool.
Linda Bauer
Technical Support Manager


Post by tfield1974 » Sun Jul 17, 2005 7:01 pm

If you've installed a version of BBEdit and you installed the command-line tools, you can use their view/merge tools as well - FileMerge doesn't really work very well but BBEdit works great.

/usr/bin/bbedit "%s"
/usr/bin/bbdiff "%s" "%s"

Post Reply