Perforce Public Knowledge Base - Rolling back to past changelist a.k.a. Last Known Good Configuration
× PRODUCTS SOLUTIONS CUSTOMERS LEARN SUPPORT
Downloads Blog Company Integrations Careers Contact Try Free
Menu Search
Perforce
Reset Search
 

 

Article

Rolling back to past changelist a.k.a. Last Known Good Configuration

« Go Back

Information

 
Problem
Imagine that a hard to trace bug has been introduced to your code. You don't know what the bug is but you know that all was fine at some point in time in the past defined by a particular changelist. 
There is no simple way to roll back files to a revision designated by a changelist and only files affected by this changelist especially if the number of files involved is high. You can back out the latest changelist what will simply roll back to previous revision or back out past changelist and resolve conflicts what allows you to roll back to a revision prior to the changelist in question. Both ways are described in the following KB article:

    Backing Out Submitted Changelists

If you wish to roll back files affected in a particular past changelist to the revision as in this changelist a different approach is needed.

 
Solution

You can rollback files only at specific changelist by using labels in P4V.

First you need to label file revisions in a submitted changelist. Right click on a changelist and choose 'Label'. Fill in the name, make sure that the changelist is chosen and click 'Label'

User-added image

In the next step you need to rollback to label. Please right click on a depot/workspace location wide enough to cover all file locations and choose 'Rollback' . In the example below I choose the whole depot. Please pick 'Label' from the 'Rollback folder to' list and type in or browse for the label you just created. 

Please make sure that 'Delete files not in label' box is not ticked, otherwise P4V will attempt to delete everything else in the path.

Please click on 'preview' to double check what actions are going to be performed and then 'Save to changelist' or 'Submit'

User-added image

Please remember that this label is static and need to be deleted via 'View labels' (Ctrl+4) window when no longer necessary.


 
Related Links

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255