views:

568

answers:

2

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?

+10  A: 

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.

pd
"flush" is a synonym for "sync -k"
raven
Never noticed that, cool. Thanks.
pd
+1  A: 

Use delete -v:

p4 delete -v oops/...

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

din