Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to delete in perforce without syncing to your client?

Tags:

perforce

I often accidentally create a branch that contains more code than it needs to. When that happens, I delete the branch files, the branch tag, and then start over. The thing that stinks is having to sync the huge pile of data just so I can delete it.

Is there a way to delete server-side?

like image 864
decibel Avatar asked Oct 30 '08 22:10

decibel


People also ask

Does p4 sync delete files?

If p4 sync is used to bring the head revision of this file into another workspace, the file is deleted from that workspace. A file that is open for deletion does not appear on the workspace's have list.

What does p4 delete do?

Description. The p4 delete command opens file(s) in a client workspace for deletion from the depot. The files are immediately removed from the client workspace, but are not deleted from the depot until the corresponding changelist is committed with p4 submit .

What does clean do in Perforce?

The p4 clean command takes the following actions when finding inconsistencies between files in a user's workspace and corresponding depot files: Files present in the workspace, but missing from the depot are deleted from the workspace.

What is mark for delete in Perforce?

On the P4VS dialog, select the default pending changelist or a new changelist. Click Yes. P4VS marks the file for delete and it is placed in a changelist.


2 Answers

Yes, use sync -k.

Add the path you want to delete to your client, e.g.

//depot/oops/... //your-client/oops/...

Then sync that location using the -k option:

p4 sync -k oops/...

This will tell Perforce that your client has the files without actually transferring them. Then you can do:

p4 delete oops/...
p4 submit oops/...

etc.

like image 173
pd. Avatar answered Sep 27 '22 18:09

pd.


Use delete -v:

p4 delete -v oops/...

This will delete files without syncing into workspace. It is faster than sync -k and then delete.

like image 44
din Avatar answered Sep 27 '22 18:09

din