Search code examples
perforceperforce-stream

Removing child streams to delete Perforce stream depot


I have the following situation: We created a stream depot and started using it. After that it was figured out that we want a different name for the stream depot, so we just created a new correctly named one and copied everything from the old depot. it's already in use for quite some time.

Now we want to get a rid of the old wrongly named stream depot. I obliterated contents of the depot via Perforce Helix Admin client (GUI) then tried to Delete Depot and it replied with Depot 'depotname' is the location of existing streams; cannot delete until they are removed.

So, I moved to P4 CLI to list and remove existing streams:

[root@linuxbox]# p4 streams //depotname/... Stream //depotname/main mainline none 'main' Stream //depotname/main.dev virtual //depotname/main 'main.dev' [root@linuxbox]# p4 stream -df //depotname/main Stream '//depotname/main' has child streams; cannot delete until they are removed.

So, the question is how can I delete those child streams from the stream depot? (what should I use instead of p4 stream -df //depotname/main)? Will I be able to just delete the depot after that? And wouldn't it impact other depots on the same p4d server?


Solution

  • See the answer here: https://stackoverflow.com/a/57892035/3799759

    You need to delete all of the streams in the depot, not just the mainline stream. The steps described in that answer should do the job.

    For your specific case, you could do it manually with:

    p4 stream -d //depot/main.dev
    p4 stream -d //depot/main
    p4 depot -d depot
    

    but only if you've already deleted all the clients of those streams (again, see the other answer, which covers that too).