Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically deleting newly added files when shelving in Perforce

Tags:

perforce

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?

like image 525
Anne Nonimus Avatar asked Feb 01 '12 20:02

Anne Nonimus


People also ask

How do you delete files after p4 add?

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.

How do you add files to existing shelve in perforce?

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

How do I delete a file from a shelve p4?

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.

What does Unshelve do perforce?

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


1 Answers

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.

like image 158
Alexander Taylor Avatar answered Nov 19 '22 09:11

Alexander Taylor