DiffMerge with command line arguments on OS X

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
jaavaaguru
Posts: 2
Joined: Sun Nov 04, 2007 6:50 am
Location: Scotland
Contact:

DiffMerge with command line arguments on OS X

Post by jaavaaguru » Sun Nov 04, 2007 6:55 am

Hi.
I am writing a GUI client for the Bazaar version control system. It is a cross platform app, using wxWidgets. I am currently thinking about providing the option of using external dff/merge tools, and would like to provide support for SourceGear's DiffMerge.

I am trying to figure out how to tell DiffMerge to diff two ffrom the command line in OS X at the moment.

I've tried:
open -a /Applications/DiffMerge.app file1.txt file2.txt

This approach works with TextEdit.
Can someone point me in the right direction for opening DiffMerge with two or three files from the OS X terminal?

Thanks,
Sandy

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

OPEN on the Mac behaves somewhat differently than expected.

Post by jeffhostetler » Mon Nov 05, 2007 12:11 pm

From my testing, I couldn't get the Mac's OPEN command to behave as expected.

In the 3.1.0 release, I included a "CommandLine/diffmerge.sh" shell script that should do what you want.

Hope this helps,
j

jaavaaguru
Posts: 2
Joined: Sun Nov 04, 2007 6:50 am
Location: Scotland
Contact:

Post by jaavaaguru » Sat Nov 10, 2007 5:24 am

Thanks, I'll download that and have a play with it. I was using an older version.

dmorgantini
Posts: 1
Joined: Thu Nov 01, 2012 5:07 am

Re: DiffMerge with command line arguments on OS X

Post by dmorgantini » Thu Nov 01, 2012 5:08 am

Can you add a preference that would run this command?

ln -s /Applications/DiffMerge.app/Contents/Resources/diffmerge.sh /usr/local/bin/diffmerge

Would make life easier for the users :-)

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Re: DiffMerge with command line arguments on OS X

Post by jeffhostetler » Thu Nov 01, 2012 8:34 am

I'll log that. Thanks!

jeff

scarpent
Posts: 2
Joined: Wed Mar 20, 2013 7:44 am

Re: DiffMerge with command line arguments on OS X

Post by scarpent » Wed Mar 20, 2013 7:51 am

Hi. This script worked great for setting up DiffMerge as the difftool for git in OSX.

I've seen in another thread where it was mentioned SourceGear doesn't support specifying a folder diff from the command line, with a reason given that this is primarily a GUI tool.

And that's how I want to use it, as my GUI diff tool, but it would be *so* nice to be able to specify a folder diff for git. I'm not interested in scripting anything here -- just to launch with a folder diff when I run git difftool.

I know time is limited and all, but wanted to register my preferences. :-)

Thanks for DiffMerge -- this is my favorite GUI diff tool.

Scott

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Re: DiffMerge with command line arguments on OS X

Post by jeffhostetler » Wed Mar 20, 2013 1:58 pm

Thanks!


we do support taking folder arguments on the command line and
will open a gui window with the 2 folders. what we don't support
is taking folders on the command line and having it print the
list of changed files to the console/stdout.

i haven't looked at git's config settings recently, but it sounds like
you might have a config setting problem or that they have a different
config setting for folder diffing. again, i'm not sure, but you might
give that a try.

jeff

scarpent
Posts: 2
Joined: Wed Mar 20, 2013 7:44 am

Re: DiffMerge with command line arguments on OS X

Post by scarpent » Wed Mar 20, 2013 3:03 pm

Ah! And so it does. I should have tried running directly with diffmerge.sh first. Thanks for your reply -- now to figure out how to make it work in difftool.

(Edited to add the how:)

git difftool --dir-diff

Works great, and now I'm in diff heaven. Thanks again!

Scott

Post Reply