12

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 :).

Scott Solmer
  • 3,607
  • 6
  • 38
  • 67
Dan Dinu
  • 28,044
  • 21
  • 67
  • 100
  • 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 Dec 16 '11 at 18:35

5 Answers5

26

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# //...
Community
  • 1
  • 1
John K
  • 722
  • 1
  • 7
  • 14
4

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.

user1054341
  • 2,781
  • 19
  • 15
3

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.)

Chance
  • 2,466
  • 1
  • 21
  • 32
  • 2
    If there are a lot of files in the change list, perforce won't list all the files. It just shows the number of files. Is there a way to force perforce to show all of the files? – Thor Mar 05 '14 at 22:31
  • 3
    @Thor, try right-clicking the changelist, and choose Edit Changelist. I think that will show them all. I'm not completely sure, as I don't have a large changelist right now. – Chance Mar 06 '14 at 22:55
  • 1
    @Thor it doesn't let you modify the files,only shows them – tatigo Dec 10 '15 at 17:23
0

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

Lyon
  • 651
  • 8
  • 10
0

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.

ninesided
  • 22,501
  • 13
  • 78
  • 106