How to remove files from changelist in perforce without losing modifications?

StackOverflow https://stackoverflow.com/questions/8738287

  •  14-04-2021
  •  | 
  •  

Pregunta

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

¿Fue útil?

Solución

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

Otros consejos

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# //...

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.

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.

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top