Perforce:重命名仓库

发布于 2024-09-02 00:48:27 字数 224 浏览 3 评论 0原文

在 Perforce 中,是否可以重命名仓库?

我想你可以整合不同的命名仓库,但我不认为这会延续整个仓库的历史。

我看过这篇重命名 Depot 目录 文章,但这仅适用于仓库下的目录(而不是仓库本身)。

In Perforce, is it possible to rename a depot?

I would imagine that you could integrate across different named depots, but I do not think that would carry over the full depot's history.

I have seen this Renaming Depot Directories article, but this applies only to directories under a depot (and not the depot itself).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

烟酉 2024-09-09 00:48:27

不可以。您无法重命名仓库,因为除非仓库 B 已经存在,否则 Perforce 不会让您将文件从仓库 A 移动到仓库 B。如果您希望将仓库 A 重命名为仓库 B,请执行以下操作:

  • 创建一个名为 B 的仓库
  • 将 A 中的所有文件移动到 B
  • 删除仓库 A

过去,在 Perforce 中将文件移动到新位置意味着您会丢失其历史记录。旧文件被删除,然后再次添加到新位置,就好像它从未受到版本控制一样。现在情况已不再如此。我不记得他们具体是什么时候这样做的(也许是在 2008.x 系列中?),但他们最终做到了,以便在移动/重命名/集成过程中维护文件历史记录。

编辑:在下面的评论中,Greg Whitfield 告诉我 Perforce 一直在跨集成维护文件历史记录。我猜它默认是关闭的,但在 P4V 的最新版本中是打开的?

No. You can't rename a depot because Perforce won't let you move files from depot A to depot B unless depot B already exists. If you wish to rename depot A to depot B, do the following:

  • create a depot named B
  • move all files in A to B
  • delete depot A

It used to be that moving files to a new location in Perforce meant you lost their history. The old file was deleted and then added again in the new location as though it had never been under version control. That is no longer the case. I don't recall exactly when they did it (perhaps in the 2008.x series?), but they finally made it so that file history is maintained across a move/rename/integration.

Edit: In the comments below, Greg Whitfield informs me that Perforce has been maintaining file history across integrations all along. I guess it was off by default and turned on in a fairly recent version of P4V?

夜吻♂芭芘 2024-09-09 00:48:27

联系 Perforce 支持。他们可以指导和支持您完成实际重命名仓库的过程,其中涉及操作元数据。

Contact Perforce support. They can guide and support you through the process of actually renaming a depot, which involves manipulating the metadata.

泛泛之交 2024-09-09 00:48:27

披露:我为 Perforce 工作。

无论您打算做什么 - 在将数据置于危险之中之前一定要进行测试。 :)

支持的版本(在线):

http://answers.perforce.com/articles /KB_Article/Renaming-Depot-Directories

不支持的版本(离线):

不受支持的版本(在线):

p4 duplicate //olddepot/... //newdepot/...

p4 snap //newdepot/... //olddepot/...

p4 verify -q //newdepot/...

(check for any error, stop and contact support if in doubt)

p4 obliterate //olddepot/...

May Perforce 与您同在。

Disclosure: I work for Perforce.

Whatever you plan to do - do test it before putting your data at risk. :)

Supported version (online):

http://answers.perforce.com/articles/KB_Article/Renaming-Depot-Directories

Unsupported version (offline):

Unsupported version (online):

p4 duplicate //olddepot/... //newdepot/...

p4 snap //newdepot/... //olddepot/...

p4 verify -q //newdepot/...

(check for any error, stop and contact support if in doubt)

p4 obliterate //olddepot/...

May Perforce be with you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文