I'm using SourceTree with P4Merge. Everytime I click external diff it launches a separate P4Merge process. Is this deliberate? Not a huge issue just I end up having to close lots of P4Merge processes after checking a diffs for a checkin
Appears I wasn't 100% right.
P4Merge.app contains both
p4merge.app/Contents/Resources/launchp4merge
and
p4merge.app/Contents/MacOS/p4merge
and both can be called directly without needing to be wrapped in a shell script i.e. in SourceTree you can set Diff Tool to Other and put in the values :
Diff command:p4merge.app/Contents/Resources/launchp4merge Arguements:"$LOCAL" "$REMOTE"
And this works fine for committed files - it will diff them in the single p4merge process but it fails when diffing uncommited changes. If p4merge isn't loaded it will load it but no window appears. Strange
Hi Steve - thanks for your reply.
This works for me (now all diff windows open in a single p4merge process):
create /usr/local/bin/launchp4merge.sh with content
#!/bin/sh
/Applications/p4merge.app/Contents/Resources/launchp4merge $*
and make this executable
chmod +x /usr/local/bin/launcp4merge.sh
then in SourceTree go to preferences -> diff and switch Visual Diff Tool and Merge Tool to Other and put in the values
Diff Command: /usr/local/bin/launchp4merge.sh Arguements:"$LOCAL" "$REMOTE"
Merge Command: /usr/local/bin/launchp4merge.sh Arguements:"$BASE" "$LOCAL" "$REMOTE" "$MERGED"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks - unfortunately calling 'launchp4merge' directly doesn't work, you do have to do it via a wrapper shell script which hard-codes the path, which is tricky when you don't always know where p4merge will have been installed. I'll see if I can find a nice way to make this work in future!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tracking this here: SRCTREE-735
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Appears I wasn't 100% right.
P4Merge.app contains both
p4merge.app/Contents/Resources/launchp4merge
and
p4merge.app/Contents/MacOS/p4merge
and both can be called directly without needing to be wrapped in a shell script i.e. in SourceTree you can set Diff Tool to Other and put in the values :
Diff command:/Applications/p4merge.app/Contents/Resources/launchp4merge Arguements:"$LOCAL" "$REMOTE"
And this works fine for committed files - it will diff them in the single p4merge process but it fails when diffing uncommited changes. If p4merge isn't loaded it will load it but no window appears. Strange
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This just appears to be a limitation of P4Merge as far as I can tell - SourceTree simply sets it up as a diff/merge tool for git & hg in the normal way, and I haven't seen any other way of doing it. Other tools don't behave like this!
If you find something in the config (.hgrc / .gitconfig) that can be done to change this behaviour, please let me know, but as far as I can tell the setup is correct.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.