Mihai Fonoage
Mihai Fonoage

Reputation: 478

Getting exit code 255 when trying to launch diffmerge from svn

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!

Upvotes: 2

Views: 2035

Answers (2)

Elijah
Elijah

Reputation: 1322

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

Upvotes: 1

Kosh
Kosh

Reputation: 131

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 ${?}

Upvotes: 3

Related Questions