Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accidentally "marked for delete" files in Perforce. How can I reverse that?

Tags:

perforce

Using p4v I've unintentionally "marked for delete" several files in my local repo. How can I unmark these items. These items may have new changes and I do not want to override them.

like image 428
J.P. Armstrong Avatar asked Jan 10 '13 15:01

J.P. Armstrong


People also ask

How to unmark something for delete in Perforce?

Instead, users must revert the files to remove the mark for deletion. To do this, simply right-click on the folder or files in P4V and select Revert. The files will be returned to normal and work can continue.

How do I undo a p4 revert?

The p4 undo command opens files to undo a set of previously submitted changes. The undone changes remain a part of the file history, but the new revisions submitted after p4 undo reverse their effect. If a single revision is specified, the specified revision is undone.

What does Perforce revert do?

The revert command closes opened files by taking them out of your pending changelist instead of submitting them. Reverting also affects your workspace as follows: When you revert a file opened for edit or integrate, your workspace copy of the file is replaced with a copy of the file from the depot.

How do I delete a file in changelist?

To delete a pending changelist, you must first remove all files and jobs associated with it and then issue the p4 change -d changenum command. Related operations include the following: To move files to another changelist, issue the p4 reopen -c changenum command.


2 Answers

In the pending changelist in the pv4 gui, you should see the files listed as marked for delete.

Select those files you do not want to delete, and revert them.

like image 61
dwikle Avatar answered Sep 18 '22 16:09

dwikle


Just right click in perticular folder or files in P4V and click on Revert. It solved my problem.

like image 44
Vivek Avatar answered Sep 20 '22 16:09

Vivek