2

I want to restrict files from main to be older than 04 Jan 2013. In clearcase I can accomplish this using time command:

time 04-Jan-2013.01:00:00
element * /main/LATEST

I would like to know how to do this in perforce?

Anand
  • 1,122
  • 3
  • 20
  • 33

1 Answers1

4

The perforce sync page mentions that you can use a date:

Label or Date   

Sync to a specific symbolic revision revision (either a label or date). Enter the label or date in the space provided.

That seems more appropriate that a p4 rollback, which applies changelist per changelist.

From p4 sync:

p4 sync @2011/06/24

Bring the workspace into sync with the depot as of midnight, June 24, 2011. (That is, include all changes made during June 23.)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    Note to self: example of time-based config spec in ClearCase: http://stackoverflow.com/a/635282/6309, http://stackoverflow.com/a/10703661/6309 and http://stackoverflow.com/a/12827358/6309 – VonC Jan 07 '13 at 18:42
  • Using the sync syntax, you can build some tooling that automatically syncs to the right timestamp. That can a user-invoked tool or done automatically in the Perforce Broker. – randy-wandisco Jan 08 '13 at 16:59