Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I revert all open files in perforce?

I know how to revert a single opened file. However sometimes I hit some issues where I have to revert all files attached in a single changelist or revert all open pending files (default CL or assigned CL) in a client. Is there any way to do that? I tried p4 revert -c <changelist> where has multiple pending files. It didn't work for me. It works if I mention ALL the file names.

like image 202
newbie Avatar asked May 08 '14 18:05

newbie


People also ask

How do you unlock p4 files?

To unlock those files: p4 [g-opts] unlock [-c change | -s shelvedchange | -x] [-f] [file ...] This releases locks that were created explicitly using the p4 lock command, or implicitly during the course of a submit operation.

What is a Changelist in perforce?

When you check out a file, Perforce adds information about the file to a changelist and changes the writable attribute of the file in your local workspace from read-only to read/write. A changelist defines a logical grouping of work across a set of files and folders.

How do I delete a file from Changelist?

You can Ctrl+left-click multiple files, then right-click on one of them and select Move to another changelist... . You can also choose to Submit... the files, and when the dialog box appears, their will be checkboxes next to each file. Uncheck the files you do not want to submit.


1 Answers

I bet you just need to provide a filespec, try p4 revert -c <changelist> //...

like image 135
Mike O'Connor Avatar answered Oct 13 '22 18:10

Mike O'Connor