12
votes

I accidentally created a new changelist with files from WORKSPACE not from DEPOT and now under the changelist 4500 modified files are displayed (all dlls pdbs etc. alongside with the files i actually edited)

I'm using the p4v GUI. Is there anyway to undo this, without having to backup all the files then revert them using perforce, put them back and create a new changelist using DEPOT.

Thanks a lot, i hope there's a workaround :).

5
Ugh, it sounds like you modified files without checking them out (via p4 edit), right? Good luck. Instead of setting the allwrite option in my clientspec, I would just check out all of the DLLs, PDBs, etc. for edit in a separate changelist every time I need to rebuild them. I hate trying to track down files that are modified but not checked out for edit. But that's not an answer to your question.bk1e

5 Answers

3
votes

There's multiple ways.

Select View->Pending Changelists from the menu bar to view your pending changelist tab. You should see all of your checked out files grouped by changelist. Go to your desired changelist and expand into files.

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.

As another answerer mentioned, if you accidentally added files to Perforce that you did not intend to, you can indeed revert those files without actually deleting them (the only time a file will actually go away is when you do a p4 delete or p4 move.)

26
votes

Not sure if this is what you're looking for, but to remove checked out files from your changelist without removing the edits:

p4 revert -k -c changelist# //...
4
votes

If you haven't submitted the changelist, and all of the files are marked with '+' in the changelist in the Pending tab, you can click 'Revert' on the changelist. As long as the files were marked for add ('+') they'll be left intact in your workspace.

0
votes

If you right click on a pending changelist in p4v you should have the option to Revert unchanged files, which does exactly what it says on the tin.

0
votes

I encountered a similar issue, the solution i used is as follows: 1. Navigate to the workspace using p4v 2. Right click on one of the folders or files and click "Open Command window here" 3. run the following command to review dll or pdb respectively p4 revert //....dll p4 revert //....pdb

Thanks, Lyon