1

Is it possible to rollback my workspace to a state which was prior to a change list.

Note: This is not the direct roll back or backout on a specific changelist

Example Scenario: 1: User x submitted a change list, everything is working fine. Let the CL no be 1023 2: users a,b,c,d check-in their changes into perforce depot. Let the respective change lists be 1024, 1025, 1026, 1027. 3: User x syncs their workspace to the depot. Some error is occurring now, not sure if it was caused by 1024 or 1025 or 1026 or 1027

What I am expecting perforce to help me with: A binary search on the change lists 1024, 1025, 1026, 1027 to determine the CL that caused the error. FYI, the actual scenario is not simple with 4 change lists. It has 200+ CL's

I need to roll back to 1025, which will revert all changes in the CL's 1026 and 1027. and then If the error is still there, then it is caused by one of 1024 or 1025. If the error is resolved by reverting to 1025, then either 1026 caused the issue or 1027 caused the issue.

Please suggest any command that would help me achieve this.

dman
  • 11
  • 2

1 Answers1

5
p4 sync @1025

will put your entire workspace into a state matching the depot as of when 1025 was submitted (this is the command you're looking for when you say you need to "roll back to 1025". Run your tests and then continue your binary search with either:

p4 sync @1024

or:

p4 sync @1027

et cetera.

Note that "p4 sync" will NOT touch files that are currently open -- if you have open files and you're trying to test changes that have already been submitted to the depot, I would recommend shelving those files and reverting them in your workspace so you don't have local pending changes mixed in with the submitted changes that you're trying to test.

Samwise
  • 68,105
  • 3
  • 30
  • 44