2

I'm trying to integrate DiffMerge with svn (version 1.6.16) on snow leopard, following the steps provided here. I made the following changes:

1) Created a script that looks like:


#!/bin/bash
DIFFMERGE_PATH=/Applications/DiffMerge/DiffMerge.app
DIFFMERGE_EXEC=${DIFFMERGE_PATH}/Contents/MacOS/DiffMerge
${DIFFMERGE_EXEC} --nosplash -m -t1="Incoming"  -t2="Original" -t3="Current" -r="$4" "$2" "$1" "$3"

2) Ran chmod +x ~/Scripts/diffmerge-svnmerge.sh

3) Added the following command to ~/.subversion/config file:

merge-tool-cmd = <HOME>/Scripts/diffmerge-svnmerge.sh

4) For testing purposes, I made sure to get a conflict when trying to update a file, and used the 'l' option to launch DiffMerge to resolve the conflict. I get the following error message every time: The external merge tool exited with exit code 255

Any ideas what I'm doing wrong?

Thanks!

malenkiy_scot
  • 16,415
  • 6
  • 64
  • 87
Mihai Fonoage
  • 478
  • 2
  • 8
  • 23

2 Answers2

3

This worked for me (Subversion 1.7.5)

#!/bin/bash
DIFFMERGE_PATH=/Applications/DiffMerge.app
DIFFMERGE_EXEC=${DIFFMERGE_PATH}/Contents/MacOS/DiffMerge
DIFFMERGE_ARGS=()
COLCOUNT=1
for I in "$@"; do
    case "${I}" in
        "-E")
            ;;
        "-L")
            DIFFMERGE_ARGS[${#DIFFMERGE_ARGS[*]}]="-t${COLCOUNT}"
            COLCOUNT=$((${COLCOUNT}+1))
            ;;
        *)
            DIFFMERGE_ARGS[${#DIFFMERGE_ARGS[*]}]="${I}"
            ;;
    esac
    echo "Arg: ${I}" >> /Users/kosh/tmp/diffmerge.cmd
done
${DIFFMERGE_EXEC} --nosplash "${DIFFMERGE_ARGS[@]}"
exit ${?}
Kijewski
  • 25,517
  • 12
  • 101
  • 143
Kosh
  • 121
  • 1
  • 3
0

exit code 255 seems to happen when path is not found. For me it also happened when using ~/ (tilde) path to my external diff tool. I use IntelliJ's idea merge

Elijah
  • 1,252
  • 3
  • 21
  • 32