Ry4*_*ase 40
这适用于合并:
将其放入您的~/.hgrc(或者,可选地,Mercurial.ini在Windows上):
[merge-tools]
p4.priority = 100
p4.premerge = True  # change this to False if you're don't trust hg's internal merge
p4.executable = /Applications/p4merge.app/Contents/MacOS/p4merge
p4.gui = True
p4.args = $base $local $other $output
需要Mercurial 1.0或更新版本.显然,您需要更新该可执行文件的路径以反映您安装p4merge的位置.
你无法改变hg diff用途 ; 但您可以使用extdiff扩展来创建使用所需显示的新diff命令.
所以hg pdiff可以运行p4 merge等.
Iva*_*van 15
我发现Ry4an的答案是一个很好的解决方案,除了一个小问题,它让p4merge(在mac os下)混合了命令输入.完成他的答案中描述的所有内容,并在[merge-tools]部分中添加以下行:
p4.args=$base $local $other $output
这一行告诉mercurial p4merge以哪个顺序获取其参数.
mac*_*bug 14
我正在使用TortoiseHg的1.0.1版本,p4merge开箱即用.
只需转到Global Settings - > TortoiseHg并选择以下选项:

我猜有一个用于 p4merge 的 CLI 工具(我对此一无所知)。
我写了一篇关于使用 Changes.app 和 Mercurial 的其他一些 GUI 工具的博客文章:将 Mercurial 与 GUI 工具结合使用。
基本上,您需要了解加载 diff 工具的 CLI 工具的调用期望。IE,如何使其从特定文件加载数据,以及如何使其等待退出。帖子上应该有足够的信息来给你一些想法。