[p4] Reverting binary files

Jeff Grills jgrills at drivensnow.org
Mon Sep 18 11:16:27 PDT 2006


I thought the question was more about the back end storage of the files, and
yes, there will be three version stored on the sever - #1 and #3 would be
duplicated even though they are identical.  You have the file checked out
for edit, and perforce is going to assume you modified it and save it again.

There might be a way to get around that though, using integration.  If you
integrated to a completely different file, submitted, and then integrated
back with -f, the server should reuse the base server file that was the
source of the integration.  But that's pretty ugly.

j

-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Stephen Vance
Sent: Monday, September 18, 2006 12:25 PM
To: Ismael Arroyo
Cc: perforce-user at perforce.com
Subject: Re: [p4] Reverting binary files


You are doing this the correct way. For binaries, you will have 3 files 
on the server. The idea in having to do it this way is that regardless 
of whether it was a mistake, #2 is still part of the history of what 
happened to the file and may have participated in builds, labels, etc.

Steve

Ismael Arroyo wrote:
> 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