Reverting files
You can discard changes made to open files, reverting them to the revisions last synced from the depot. Reverting files also removes the reverted files from the pending changelist with which they are associated.
When you revert files that you:
- Marked for delete, they are reinstated in the client workspace.
- Marked for add, they remain in the client workspace.
- Merged or integrated, they are removed from the client workspace.
- Renamed or moved, only the file marked for add as part of the move operation can be reverted.
Reverting a file that has been opened for edit will overwrite any changes you have made to the file since the file was opened.
To revert files:
-
Select one of the following:
- One or more folders in the Depot or Workspace tree
- One or more files in the Depot or Workspace tree
- A pending changelist on the Pending tab, or one or more files within a changelist
-
From the Actions menu, select one of the following:
-
Revert If Unchanged (for files) or Revert Unchanged Files (for folders and changelists) to revert only files that have not changed (in terms of content or filetype) since they were opened.
The only files reverted are those whose workspace revisions are the following:
- Open for edit but have unchanged content and unchanged filetype.
- Open for integrate and have not yet been resolved.
-
Open for add but are missing from the workspace.
Files open for add that are missing but that also have pending integrations will not be reverted.
- Revert (for files) or Revert Files (for folders and changelists) to revert all changes.
-
-
If P4V detects any changes, the Revert dialog box opens:
- Select the changes you want to revert.
-
If you also want to delete files that were open for add from the workspace, select the relevant check box.
Otherwise, P4V removes the add request but keeps the file in the workspace.
- To prevent the Revert dialog from opening when reverting files, select the relevant check box.
- Click Revert.
-
If you chose to delete files that were open for add from the workspace, click Delete Files to confirm.
WarningYou cannot revert this action.