2

我正在尝试按照此处提供的步骤将 DiffMerge 与雪豹上的 svn(版本 1.6.16)集成。我做了以下更改:

1)创建了一个看起来像这样的脚本:


#!/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) 跑chmod +x ~/Scripts/diffmerge-svnmerge.sh

3) 将以下命令添加到 ~/.subversion/config 文件中:

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

4) 出于测试目的,我确保在尝试更新文件时会发生冲突,并使用“l”选项启动 DiffMerge 以解决冲突。我每次都会收到以下错误消息:The external merge tool exited with exit code 255

任何想法我做错了什么?

谢谢!

4

2 回答 2

3

这对我有用(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 ${?}
于 2012-07-09T01:15:05.643 回答
0

找不到路径时似乎会出现退出代码 255。对我来说,使用 ~/(波浪号)路径到我的外部差异工具时也会发生这种情况。我使用 IntelliJ 的idea merge

于 2018-10-22T15:28:35.053 回答