如何配置Apple的FileMerge程序以充当Mercurial的合并工具?我在我的主目录中设置了.hgrc文件,我只想将FileMerge配置为合并程序.
正如hg wiki中所描述的,这对我有各种版本的hg:
在你的某个地方创建一个脚本$PATH
,比如/usr/local/bin
:
$ vim /usr/local/bin/opendiff-w #!/bin/sh # opendiff returns immediately, without waiting for FileMerge to exit. # Piping the output makes opendiff wait for FileMerge. opendiff "$@" | cat
将以下部分添加到您的~/.hgrc
:
[extdiff] cmd.interdiff = hg-interdiff cmd.opendiff = opendiff-w [merge-tools] filemerge.executable = opendiff-w filemerge.args = $local $other -ancestor $base -merge $output [extensions] extdiff =
现在你可以用它了$hg opendiff
.