[p4] Reverting binary files

Ismael Arroyo Ismael.Arroyo at macrovision.com
Mon Sep 18 09:52:04 PDT 2006


Hello everybody.

I have quick question regarding to the process of reverting files to a
previous version.
Quite often we have this scenario:
//depot/foo#1
//depot/bar#1

And we create a new revision by edditing those files:
//depot/foo#2
//depot/bar#2

But sometimes, we realize that the good stuff was in the previous
revision. What I do in this case is:
P4 sync //depot/foo#1 //depot/bar#1
P4 edit //depot/foo //depot/bar
P4 sync //depot/foo //depot/bar
P4 resolve -ay
P4 submit

At the end, we have
//depot/foo#3
//depot/bar#3

Which is identical to the revision #1, however revision #2 still exists.

Is this the right way to do this? I think so, because this is documented
so in a technote (#014) at Perforce site. However, my doubt is: if I do
this with binary files, at the end do I have 3 different binary files in
the server or just 2 files (one for revision 1 and 3 and one for
revision 2)?

Thank you for your help.



More information about the perforce-user mailing list