3

Kaleidoscope is a really useful diff tool for Mac. It integrates with git difftool by adding this to your ~/.gitconfig:

[difftool "Kaleidoscope"]
    cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
    prompt = false

How do you make it work with Mercurial / hg?

I found this documentation for Mercurial's Extdiff extension, which references some kdiff3 thing that does not appear to take the same args as ksdiff. When Kaleidoscope opens, it's a really frustrating UI that makes you click down into directories (deal breaker for those Java devs out there ✌️), and it does not have the useful sidebar.

aaronstacy
  • 6,189
  • 13
  • 59
  • 72

2 Answers2

2

UPDATE: @catlan's approach is cleaner

Add this to your ~/.hgrc:

[extdiff]
cmd.difftool = bash
opts.difftool = -c 'for f in `find $1 -type f`; do ksdiff --partial-changeset --relative-path ${f#$1/} -- ${0}${f#$1} $f; done'

If you can add a script to your $PATH, you could have a cleaner message in the Kaleidoscope title bar by using something like this ruby script from gregawoods.

aaronstacy
  • 6,189
  • 13
  • 59
  • 72
1

The instruction to use Kaleidoscope with Mercurial / hg can be found in the Kaleidoscope > Integrations window.

Kaleidoscope Mercurial Integration

Add this to your ~/.hgrc:

[extensions]
hgext.extdiff =

[extdiff]
cmd.ksdiff = /usr/local/bin/ksdiff
opts.ksdiff = --changeset --wait --filelist

[ui]
merge = Kaleidoscope

[merge-tools]
Kaleidoscope.executable = /usr/local/bin/ksdiff
Kaleidoscope.args = --merge --output $output --base $base -- $local $other
catlan
  • 25,100
  • 8
  • 67
  • 78