How do I delete a workspace that has pending files when that workspace has already been removed from disk?
user_workspace
on the disk in the ~/my_workspace
directoryrm -rf ~/my_workspace
)
Doesn't work because the workspace has files opened.
p4 client -d user_workspace
Client 'user_workspace' has files opened; use -f to force delete.
Doesn't work because not admin.
p4 client -d -f user_workspace
You don't have permission for this operation.
p4 changes -c user_workspace -s pending
Only lists pending numbered changelists, does not handle the default pending changelist.
p4 -c user_workspace -d changelist_number
Not possible because there is no changelist number for the pending changelist.
Trying to do a p4 revert on a directory that does not exist anymore gives a strange error.
p4 revert ~/my_workspace
/home/user/my_workspace - must refer to client 'user_workspace'.
p4 -c user_workspace revert ~/my_workspace
/home/user/my_workspace - must refer to client 'user_workspace'.
setenv P4CLIENT user_workspace; p4 -c user_workspace revert ~/my_workspace
/home/user/my_workspace - must refer to client 'user_workspace'.
To delete a pending changelist, you must first remove all files and jobs associated with it and then issue the p4 change -d changenum command. Related operations include the following: To move files to another changelist, issue the p4 reopen -c changenum command.
The p4v Perforce GUI client has an 'Actions > Remove from Workspace' menu command which removes all files from the workspace that are under version control and were not opened for edit or delete.
Using -d -c flag deletes the shelved files in the specified changelist so that they are no longer available for p4 unshelve operations. By default, only the user and client of the pending changelist can delete its shelved files.
Have to use Perforce depot notation instead of local directory notation because the local directory does not exist anymore.
p4 -c user_workspace revert -k //...
//blah/blah/blah/file#rev - was edit, reverted
p4 client -d user_workspace
Client user_workspace deleted.
this will give you the pending changes on the client
p4 changes -c user_workspace
this will delete the pending change list of your choice
p4 change -d <change list number>
after that, you can delete the client using
p4 client -d user_workspace
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