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

后端 未结 6 809
忘掉有多难
忘掉有多难 2021-01-30 16:54

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

6条回答
  •  醉梦人生
    2021-01-30 17:50

    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.

提交回复
热议问题