MacHG and Kdiff3?

195 views
Skip to first unread message

Victor Hooi

unread,
Oct 5, 2011, 9:29:06 AM10/5/11
to machg_m...@googlegroups.com
heya,

I've installed the latest version of Kdiff3 via Homebrew.

The binary for this is located in /usr/local/bin/kdiff3.

However, MacHG doesn't seem to find this - when I try to select kdiff3 via the Preference, it says "kdiff3 not found".

Using "Other", and setting the diff command to "/usr/local/bin/kdiff3" doesn't work either.

Is there any way to get MacHg to represent Kdiff3 like this?

Cheers,
Victor

Jason Harris

unread,
Oct 5, 2011, 10:47:24 AM10/5/11
to machg_m...@googlegroups.com
Hi Victor,

Well MacHg is looking for the Kdiff3 application.

You can get it from eg:

http://downloads.sourceforge.net/kdiff3/kdiff3-0.9.95-Mac-Universal-2.zip

This is the thing which you need to install on your machine, run it once and you should be good to go...

Cheers,
Jas

Victor Hooi

unread,
Oct 5, 2011, 10:49:24 AM10/5/11
to machg_m...@googlegroups.com
heya,

Yeah, I know I can install it from the official site.

However, the OSX binaries there are from a third-party, and are for 0.9.95 (older version).

I've used Homebrew to build the latest version, which has put the binary at /usr/local/bin/kdiff3.

However, there doesn't seem to be any way to get MacHg to pick this up - either thorugh selecting Kdiff3 in the menu, or by setting Other and the field to "/usr/local/bin/kdiff3".

Cheers,
Victor

Jason Harris

unread,
Oct 5, 2011, 12:20:27 PM10/5/11
to machg_m...@googlegroups.com

Ok. Well... Everything at /usr/local/bin should really be a unix tool or a unix tool which launches an application.

So where is the application located, and then look at the binary within that and maybe try setting Other in the MacHg > Mercurial preferences.

One other question, can you get this going without MacHg in the picture. Ie get it going from the command line version of Mercurial?

Cheers,
Jas

Victor Hooi

unread,
Oct 6, 2011, 7:34:31 AM10/6/11
to machg_m...@googlegroups.com
heya,

The binary lives at /usr/local/bin/kdiff3:

victor-mbp<1:~ victorhooi$ file /usr/local/bin/kdiff3 
/usr/local/bin/kdiff3: Mach-O 64-bit executable x86_64

I have the following in my ~/.hgrc

[extensions]
hgext.extdiff =
mq =

[extdiff]
cmd.kdiff3 =

From the commandline, I am able to startup kdiff3 to compare revisions manually. E.g.:

hg kdiff3 -r 1 -r 20

In MacHg I've tried selecting kdiff3 as the diff tool ("kdiff3 not found"), as well as using Other with the path set to "/usr/local/bin/kdiff3" - nothing seems to happen when I bring up a diff.

Is there anything else I can do to get MacHg to pickup homebrew's kdiff3?

Cheers,
Victor

Dan Parent

unread,
Oct 6, 2011, 7:44:19 AM10/6/11
to machg_m...@googlegroups.com
Have you tried creating a symlink from wherever machg expects kdiff3 to exist and have it point to your version in /usr/local ?  I'm not at my computer right now so I'm not entirely sure where machg expects kdiff3 to exist.

Dan

--
Sent from my phone

Jason

unread,
Oct 8, 2011, 6:40:07 AM10/8/11
to MacHg
Yep, to use an external tool.

Add something like the following to your ~/.hgrc

---------

[extensions]
hgext.extdiff =
mq =

[extdiff]
cmd.mykdiff3 = /Users/jason/bin//kdiff3.app/Contents/MacOS/kdiff3

---------

Then in (MacHg preferences > Mercurial > For Diffs use Other) set the
field to mykdiff3

This should work...

Thanks,
Jas
Reply all
Reply to author
Forward
0 new messages