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

后端 未结 6 823
忘掉有多难
忘掉有多难 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:23

    I use the following bit of Python to launch p4merge and use it with git :

    #!/usr/bin/python
    import sys
    import os
    
    os.system('/Applications/p4merge.app/Contents/MacOS/p4merge "%s" "%s"' % (sys.argv[2], sys.argv[5]))
    

    I'm not sure how mercurial looks to launch an external diff tool though ? Hopefully it's as simple as adjusting 2 & 5 in the above line to being the index of the arguments for 'checked in' and 'current working copy'.

提交回复
热议问题