GNOME Bugzilla – Bug 336262
Add Perforce support
Last modified: 2011-01-14 20:56:03 UTC
Perforce calls third-party merge tools with four filename parameters. Perforce refers to these files as: "base", "theirs", "yours", and "merge". And, these filenames are passed in that order. Meld accepts a subset of these (meld <file> <file> [file] to Start with 2 or 3 way file comparison) and it would be ideal if it could come with a wrapper to allow it to be used as a drop-in replacement for the default Perforce merge tool.
I use both perforce and meld at work, and find they work very well together. To enable meld within p4v (Perforce's GUI), I made the following changes in P4V: - Bring up the Preferences dialog box (Edit -> Preferences) - Click on the Diff tab - Select 'Other application' - Set 'Location /usr/bin/meld' - Set 'Arguments %1 %2' - This will give old on the left and new on the right - Hit Apply - Click on the Merge tab - Select 'Other Application' - Set 'Location /usr/bin/meld' - Set 'Arguments %1 %2 %r' --- %1 - Their / Source file --- %2 - Your / Target File --- %r - Results file --- %b - Base File - Hit Apply There's more information on this in the P4V Help: <Perforce installation>/P4VResources/p4vhelp/Configuring_display_preferences.html The one thing that I feel is lacking is something Meld does very well with CVS & SVN: 'meld .'. This compares the current directory with the version checked in on the server. I think adding this feature for Perforce would be very good! That's what I think this bug should really be about. I'm happy to test any changes for this, but unfortunately can't offer help in development.
FYI Vincent Legoll is developing a perforce plugin for meld. You can reach him on the meld list.
I have preliminary perforce vc support working (the one thing you feel meld is lacking, not the thing this bug report is about...) I'll need to clean the code up a bit and commit it to meld repo... Stephen, what is the procedure before committing code myself, is the a review procedure, a signed-of-by thing, or what ? Should I attach the patch to a bug report for a while, ask interested people to test it a bit before ?
Hi Vincent, perforce is pretty self contained so just go ahead and commit directly - that makes it easier for people to test too. It's worthwhile posting in the mailing list too, there have been a few enqiries.
I'll do that when I manage to get some free time to spend on meld, thanks for the clue.
Meld now supports a --output parameter, which should satisfy the original query. As there is a (somewhat outdated) patch for a perforce plugin at bug 530444, I'm marking this bug as a duplicate of that. *** This bug has been marked as a duplicate of bug 530444 ***