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.
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.
The instruction to use Kaleidoscope with Mercurial / hg can be found in the Kaleidoscope > Integrations window.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With