GNOME Bugzilla – Bug 530444
perforce vc support
Last modified: 2017-12-13 18:50:55 UTC
Add perforce vc plugin to browse modified files from a perforce repository
I created this bug to track progress on perforce vc plugin support The attached perforce.py file can be simply dropped into the vc subdirectory of meld to enable that support. The plugin relies upon an available 'p4' command-line client, which will require proper environment variable to be setup: P4USER=joe P4CLIENT=joe_work P4PORT=localhost:1666 There is no "changelist concept" support
A last-minute testing revealed a showstopper, which will delay the release a bit.
I didn't see any attachment to this bug, so I worked on p4 integration myself. I'll attach my current work-in-progress which at least seems usable. Some notes: Currently, functions like diff_command in a vc file simply return a shell command to execute and the main code assume you can just tack the filename on to the end. It'd be better if the vc file could totally override this processing, or perhaps get passed the filename into the function so it could embed it into the middle; see comments in the file and the new meld-p4-diff binary.
Created attachment 117466 [details] [review] Stephen Warren's meld/p4 integration attempt, v1
I'm very interested in getting this working, but when i tried the patch, I got lots on errors on my shell: Traceback (most recent call last):
+ Trace 212242
ret = task()
entries = filter(showable, self.vc.listdir(root))
dirs, files = self.lookup_files(cdirs, cfiles)
raise NotImplementedError() NotImplementedError
I'd copied the supplied two files into the /usr/share/meld/vc directory and chmod 755 on the script. Am I doing something incorrect, or am I jumping the gun? If there's a newer version of this patch available, I'd like to try it. Thanks, Alasdair
I wrote this patch against meld-1.1.5-5.fc9.noarch. What version are you using? Latest SVN has probably moved on a bit since I wrote it.
Hi, I'm using meld-1.1.5-5.el5 (RHEL5 RPM package), but with a patch for bug 505087 (http://bugzilla.gnome.org/show_bug.cgi?id=505087), so I'd hope I'm fairly close to what you wrote against originally. Alasdair
Sorry, I actually developed the patch against svn r1034! Anyway, it looks like you're simply using a feature I never implemented. What's your exact command-line and usage model?
Hi, I started using meld when we used Subversion as our revision control tool. With the Meld-Subversion integration, I could do "meld ." and I would get a directory style diff between the files currently on disk and the version controlled files. I was trying to do the same with Perforce. Basically, cd into a Perforce controlled directory and type "meld .". I then get the mentioned error messages on the console. Is this a feature that can be made to work, or is it SVN / CVS specific? Thanks, Alasdair
Alasdair, That mode of operation should work. I just tested it, and It Works For Me. It's quite possible the patch only works correctly when applied to SVN (and in particular, the particular version of SVN I mention above).
I've grabbed the 1.2.1 release, and fiddled it run on my RHEL5 box. The P4 integration now works - many thanks!! Alasdair
I have just tested this with meld 1.3.0 on Ubuntu 9.10 and it works well enough to be very useful. I think it would be good to get this committed. One minor thing that could be improved is that it would be nice if revert would work on files that have been modified but not added to a changelist.
*** Bug 336262 has been marked as a duplicate of this bug. ***
I'm untagging this from being assigned, since no one is apparently really working on this. If, however, someone would like to push forward perforce support, that would be awesome. Basically, this would need to: * be structured more like our current git/bzr plugins * not require an extra helper shell script * have some instructions that people could use to test it, etc. * make sure it works with Meld's various invocation options (e.g., does it do-the-right-thing when invoked on individual files or subdirectories)
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/meld/issues/17.