Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
249 views
in Technique[技术] by (71.8m points)

macos - How to use p4merge as the merge/diff tool for Mercurial?

Does anyone know how to setup Mercurial to use p4merge as the merge/diff tool on OS X 10.5?

question from:https://stackoverflow.com/questions/42980/how-to-use-p4merge-as-the-merge-diff-tool-for-mercurial

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This will work for merging:

Place this into your ~/.hgrc (or, optionally, your Mercurial.ini on 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

Requires Mercurial 1.0 or newer. Clearly you'll need to update the path to that executable to reflect where you'd got p4merge installed.


You can't change what hg diff uses; but you can use the extdiff extension to create new diff commands that use the display you want.

So hg pdiff could run p4 merge, etc.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...