WinMerge is not available for Mac but there are plenty of alternatives that runs on macOS with similar functionality. The best Mac alternative is Meld, which is both free and Open Source.
You could use Apple's FileMerge tool, or Kaleidoscope. Both of these have command-line invocations:
opendiff
ksdiff
KDiff is an open source , visual text difference program. You can use it in windows,unix, linux and Mac OSX . Give it try. On windows , it automatically adds itself for svn diff. I do not use Mac OSX therefore can not say this function is also available there.
compares or merges two or three text input files or directories,
Following image url from kdiff3 site shows that it compare directories.
DiffMerge is both free and great. Also does 3 way comparison and merging.
There is kompare for Mac OS. It is a part of KDE SDK and one can get it using MacPorts:
sudo port install kdesdk4
launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
export PATH="/Applications/MacPorts/KDE4/kompare.app/Contents/MacOS:"$PATH
and it works!
Svn supports so called external diff.
To use it one should create svn-wrapper script, which will take parameters returned by "svn diff" command and call differ with required parameters.
here is an example of parameters "svn diff" returns:
-u -L code/Class1.h (revision 16518) -L code/Class1.h (working copy) code/.svn/text-base/Class1.h.svn-base code/Class1.h
opendiff needs last two. Therefore next bash script will be appropriate:
#!/bin/sh
if [ $# -lt 2 ]; then
echo "usage: $0 [ignored args...] file1 file2" >&2
exit 1
fi
# The last two arguments passed to this script are the paths to the files
# to diff.
while [ $# -gt 2 ]; do
shift
done
exec opendiff $*
put this script in svnwrapper.sh file. Made file executable:
chmod +x svnwrapper.sh
and put it in some common path, which is added to $PATH variable. Now you can call svn using
svn diff --diff-cmd=svnwrapper.sh
or just add at the section [helpers] in ~/.subversion/config file:
diff-cmd = svnwrapper.sh
Kaleidoscope is a really good choice if you want to switch fast from comparing directory structures and files in directories. It is also possible to compare more then 2 copies. I have also impression that the algorithm to compare files (match blocks and colorcode changes) is really good. At the end, a 15 day trial is available, than you need to pay.
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