When I shelve a pending changelist, changes to existing files are reverted, but newly added files are not deleted from the filesystem. I need to manually delete these files every time I perform a shelve operation. Is there anyway to automatically delete newly added files when shelving?
To delete a set of files without transferring them to your workstation when another version of these files already exists in your workspace, use p4 sync -k file , followed by p4 delete -k file . This allows you to delete a file that is in the depot without affecting the file (by the same name) in your workspace.
To add a file to a pre-existing shelve, the file must first be opened in the shelve's changelist. To move an opened file from one changelist to another, use the p4 reopen command. p4 obliterate myfile does not obliterate a shelve of the file (archive or metadata).
To delete the Perforce P4 shelved files, use p4 shelve -d followed by the change number: p4 shelve -d -c 7033 Shelved change 7033 deleted. Having removed the shelved files by deleting the shelved change, you can remove the changelist itself: p4 change -d 7033 Change 7033 deleted.
Unshelving copies the shelved files into the user's workspace as they existed when they were shelved. (For example, a file open for edit when shelved will also be open for edit in the unshelving user's workspace.)
in p4, if you're willing to make it two operations, you can do a normal shelve on the changelist, and then do p4 revert -w
on the same changelist, which deletes added files. i'm not sure how to do this in p4v.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With