如何将kdiff3设置为SVN的合并工具 [英] How to set kdiff3 as merge tool for SVN
问题描述
当SVN通知我有关冲突时,我希望能够使用kdiff3解决冲突.如何将其设置为默认工具?
I would like to be able to resolve conflicts using kdiff3, when SVN notifies me about the conflict. How can I set it as a default tool for this?
推荐答案
转到Subversion配置文件(/etc/subversion/config
或~/.subversion/config
),然后使用您喜欢的工具设置merge-tool-cmd
变量:
Go to the Subversion configuration file (/etc/subversion/config
or ~/.subversion/config
), and set merge-tool-cmd
variable with your favourite tool:
### Set merge-tool-cmd to the command used to invoke your external
### merging tool of choice. Subversion will pass 4 arguments to
### the specified command: base theirs mine merged
# merge-tool-cmd = merge_command
尽管kdiff3存在一个问题,它不支持四个普通参数(SVN将四个普通参数传递给kdiff3,并且不起作用),因此通常使用一个简单的脚本来调用它来翻译这些参数,例如,"kdiff3caller":
Although there is a problem with kdiff3 which does not support four plain arguments (SVN passes four plain arguments to kdiff3, and it does not work), so it is usually called with a simple script to translate the arguments, e.g., "kdiff3caller":
#!/bin/sh
kdiff3 "$1" "$2" "$3" -o "$4"