How can I revert all open files in perforce?

newbie picture newbie · May 8, 2014 · Viewed 17.8k times · Source

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.

Answer

Mike O&#39;Connor picture Mike O'Connor · May 8, 2014

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