[p4] Diffing renamed files before submitting
Alen Ladavac
alenl-ml at croteam.com
Thu Oct 11 02:41:13 PDT 2007
Thanks for this hint, Richard!
Seems that p4win doesn't have that option though. But we've found
another workaround - we show history on the deleted file, then
right-click on the last (non-deleted revision) and choose "View
using/other viewer..." then choose BeyondCompare, which effectively
does "p4 print" and puts it in the left pane, then we drag-and-drop the new
file from p4win into the right pane.
Thanks!
Alen
Richard wrote:
> Using P4V:
> 1) Right-click on the renamed and edited file. Choose "Diff against..."
> 2) Make sure the depot path to the new name of the file is the "1st
> Path". (ie: //depot/NewFile.cpp)
> 3) Choose "Workspace version on local disk" under 1st Path.
> 4) Enter the depot path to the old name of the file as the "2nd Path".
> (ie: //depot/OldFile.cpp)
> 5) Choose "Latest Revision" under 2nd Path.
> 6) Click "Diff"
> Using P4V and P4D 2007.2. I haven't tried it in older versions.
> I can't seem to find a way to do it via the command-line either. P4V
> appears to use the "p4 print" command to retrieve the contents of the
> deleted file into a temporary local file before passing both files to
> P4Merge to do the diff. (Basically automating what you are already
> doing by manually comparing the files on another client).
> - Richard
> -----Original Message-----
> From: perforce-user-bounces at perforce.com
> [mailto:perforce-user-bounces at perforce.com] On Behalf Of Alen Ladavac
> Sent: Wednesday, October 10, 2007 5:50 am
> To: perforce-user at perforce.com
> Subject: [p4] Diffing renamed files before submitting
> A curious problem came up by one of my colleagues and I was certain
> that p4 could handle that nicely even in p4win, but even resolving to
> manual command line option wizardry didn't help.
> The scenario is:
> 1) open a file for rename, which turns out as a delete and an add
> (branch)
> 2) reopen it for edit (because you need to change the #include
> filenames in it, if you are to submit e.g. .h and .cpp both renamed in
> one go.)
> 3) now try to check the diffs you did in this edit.
> It is weird that once you submit this, the history is very easy to
> access and the diffs work normally, but we'd like to see the diffs
> before submition - to be sure what was done. Somehow seems that there
> is no way to force p4 to compare one file in depot with another file
> on client. The only way around it we've found was to use another
> client to sync the deleted file and manually compare two files on the
> disk using BeyondCompare.
> Is there something we are missing here? Is there some reason why this
> should be so complicated?
> Thanks,
> Alen
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
--
Alen
More information about the perforce-user
mailing list