[p4] Diffing renamed files before submitting
Glidden, Richard
rglidden at brocksolutions.com
Wed Oct 10 07:23:12 PDT 2007
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
More information about the perforce-user
mailing list