Does anyone know how to setup Mercurial to use p4merge as the merge/diff tool on OS X 10.5?
相关问题
- slurm: use a control node also for computing
- Xcode debugger displays incorrect values for varia
- Is there a way to report errors in Apple documenta
- Advice for supporting both Mac and Windows Desktop
- Avoid cmake to add the flags -search_paths_first a
相关文章
- 现在使用swift开发ios应用好还是swift?
- Visual Studio Code, MAC OS X, OmniSharp server is
- Mercurial Commit Charts / Graphs [closed]
- xcode 4 garbage collection removed?
- What is the tortoisehg gui equivalent of doing “hg
- IntelliJ IDEA can't open projects or add SDK o
- Automator: How do I use the Choose from List actio
- How to use Mercurial from Visual Studio 2010?
This will work for merging:
Place this into your
~/.hgrc
(or, optionally, yourMercurial.ini
on Windows):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 theextdiff
extension to create new diff commands that use the display you want.So
hg pdiff
could run p4 merge, etc.Maybe because I'm working on Windows, but the proposed solution didn't work for me. Instead, the following does work.
In your
~/.hgrc/
/Mercurial.ini
, I applied the following changes:Enabled "ExtDiff" extension:
Added P4 extdiff command:
Configured it as the default visual diff tool:
I found Ry4an's answer to be a good solution, except for a minor problem, which left p4merge (under mac os) mixing up the command inputs. Do everything described in his answer and add the following line in the [merge-tools] section:
This line tells mercurial in which order p4merge takes its arguments.
I'm guessing there's a CLI tool for p4merge (which I know nothing about).
I wrote a blog post about using Changes.app, and some other GUI tools with Mercurial: Using Mercurial with GUI Tools.
Basically, you need to know the calling expectations of the CLI tool that loads up the diff tool. IE, how to make it load data from a particular file, and how to make it wait for exit. There should be enough info on the post to give you some ideas.
I am using version 1.0.1 of TortoiseHg and p4merge works out of the box.
Just go to Global Settings -> TortoiseHg and select the following options:
I use the following bit of Python to launch p4merge and use it with git :
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'.