[p4] Using previous version of a file
Mark Allender
marka at Volition-inc.com
Thu Dec 21 09:52:01 PST 2006
You can also use p4win in several ways.
Right click on the file and choose sync -> sync to revision, label,
changelist, or date.
You can also look at the revision history for a file, select the revision
you want and hit the 'sync' button in the revision history window.
> -----Original Message-----
> From: perforce-user-bounces at perforce.com
> [mailto:perforce-user-bounces at perforce.com] On Behalf Of
> David Weintraub
> Sent: Thursday, December 21, 2006 8:59 AM
> To: Prashant Deva
> Cc: perforce-user at perforce.com
> Subject: Re: [p4] Using previous version of a file
>
> Use p4 sync to get the version you want, then use "p4 flush" to make
> Perforce think it has the latest version:
>
> $ p4 sync "foobar#2" #Get Revision #2
> $ p4 flush foobar #Now Perforce thinks you have
> the latest revision
> $ p4 edit foobar #Open the file for editing
> (this is Revision #2)
> $ p4 submit #Revision #6 will now be a duplicate of
> Revision #2
>
> Another way is to use "p4 print"
>
> $ p4 sync foobar #Latest revision of foobar
> $ p4 edit foobar
> $ p4 print "foobar#2" > foobar #Overwrites foobar with Revision #2
> $ p4 submit
>
> On 12/21/06, Prashant Deva <prashant.deva at gmail.com> wrote:
> > Ok, I really dont get this about perforce.
> >
> > Say i am working on revision 5 of a file.
> > Now, for some reason i dont like these changes and i want
> to go back to rev
> > 2.
> > So i check out rev 2.
> >
> > But now when i try to check in my file, it wont let me do
> so until i get the
> > latest version.
> >
> > I thought the whole concept of using a version control
> system is so that i
> > can use previous versions of a file.
> > So why does perforce insist on me getting the latest
> version till i can
> > check in?
> >
> > Prashant
> > _______________________________________________
> > perforce-user mailing list - perforce-user at perforce.com
> > http://maillist.perforce.com/mailman/listinfo/perforce-user
> >
>
>
> --
> --
> David Weintraub
> qazwart at gmail.com
> _______________________________________________
> 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