如何在 Perforce 中删除流仓库? [英] How does one delete a stream depot in Perforce?

查看:227
本文介绍了如何在 Perforce 中删除流仓库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上我想做的是从服务器上删除一个仓库.我可以访问 P4Admin 和 P4Helix.

Basically what I want to do is delete a depot off the server. I have access to both P4Admin and the P4Helix.

现在我明白我必须首先删除所有工作区,然后流,然后删除库.但是我正在寻找这个过程的解决方法(我个人觉得这很愚蠢,如果有人离开公司不想合作怎么办?),有吗?

Now I understand that I must first delete all workspaces then streams then delete the depot. But I am looking for a workaround to this process (personally I find it stupid, what if someone left the company and doesn't want to cooperate?), is there one?

我是否可以强制删除一个 depot 及其流,而不必去找可能使用过这个 depot 的每个可能的用户并要求他们删除它的工作区?

Can I force delete a depot and its Streams without going to every single possible user that may have used this depot and ask them to delete workspaces for it?

推荐答案

  • 首先,删除库中的所有文件.
  • 接下来,删除库中所有流的所有客户端.
  • 接下来,删除库中的所有流.
  • 最后,删除仓库.
  • 通过 CLI 进行此类操作总是比 IMO 的 P4Admin 更容易.以下是执行这四件事的四个命令行:

    This sort of thing is always easier to do via the CLI than P4Admin, IMO. Here are the four command lines that do those four things:

    p4 obliterate -y //yourdepot/...
    p4 -F "clients -S %stream%" streams //yourdepot/... | p4 -F "client -df %domainName%" -x - run | p4 -x - run
    p4 -F "stream -d %stream%" streams //yourdepot/... | p4 -x - run
    p4 depot -d yourdepot
    

    请注意,您需要管理员/超级访问权限才能运行这些命令中的大部分.p4 client -df 允许您强制删除不属于您的客户端.

    Note that you need admin/super access to run most of these commands. p4 client -df is what allows you to force the deletion of a client that you don't own.

    您可能还需要多次运行第三个命令(删除流的命令),因为子流需要在其父流之前被删除.您可以编写一个聪明的脚本来进行图形搜索,然后以自下而上的顺序删除流,但是通过运行多次通过暴力破解它要容易得多,因为每次都通过您将取出至少一个完整的层次结构层.:)

    You may also need to run the third command (the one that deletes the streams) a couple of times, since child streams need to be deleted before their parents. You could write a clever script that does a graph search and then deletes the streams in a bottom-up order, but it's a lot easier to just brute force it by running multiple passes, since each time through you'll take out at least one entire layer of the hierarchy. :)

    (我同意这会很好,因为有更多的一次性方法可以做到这一点,但命令行至少可以轻松地将查询放在一起,因此您无需手动搜索每件事.)

    (I agree it'd be nice it there was more of a one-shot way of doing this, but the command line at least makes it easy to plumb queries together so you don't need to hunt each thing down manually.)

    这篇关于如何在 Perforce 中删除流仓库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆