我如何回顾性地告诉 perforce 文件夹重命名?

发布于 2024-11-28 19:45:20 字数 103 浏览 0 评论 0原文

我们有一个文件夹是在 perforce 之外复制的,然后签入并删除了旧文件夹。因此,必然不知道来自另一个分支的集成的共同基础是什么。

有什么方法可以追溯两个文件夹之间的关系吗?

We have a folder that was copied outside of perforce then checked in with the old folder deleted. Therefore perforce does not know what the common base is for an integration from another branch.

Is there some way to tell perforce retrospectively the relationship between the two folders?

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

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

发布评论

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

评论(2

青萝楚歌 2024-12-05 19:45:20

最简单的方法就是简单地运行:

p4 integ -i <original folder>@<pre-delete revision> <dest folder>
p4 resolve -ay

第一行强制两个没有共同祖先的路径之间的集成。第二行解决了合并问题,没有任何实际的内容合并。所以基本上你是在追溯地绘制积分箭头。

唯一的问题是您绘制的合并箭头指向副本的最新版本,而不是其起点。这可能会使未来的合并变得更加复杂,但集成引擎应该能够很好地处理它。

您实际上只是想重命名该文件夹吗? p4 move 命令确实会写入一些元数据,让合并引擎遵循重命名。在这种情况下,除了我已经描述的内容之外,您无能为力,除非您想要恢复已删除的文件夹,将其移动到另一个名称,然后重播您对复制的文件所做的任何更改。不过可能不值得这么麻烦。

The simplest method is simply running:

p4 integ -i <original folder>@<pre-delete revision> <dest folder>
p4 resolve -ay

The first line forces an integration between two paths that share no common ancestor. The second line resolves the merge without any actual content merging. So basically you're drawing the integration arrow retroactively.

The only hiccup is that you drew the merge arrow pointing to the latest revision of the copy, rather than its starting point. That might make future merges a bit more complex, but the integration engine should handle it well enough.

Were you actually just trying to rename the folder? The p4 move command does write some metadata that lets the merge engine follow renames. There's not much you can do in this case in addition to what I've already described, unless you want to recover the deleted folder, move it to yet another name, and then replay any changes you made to the copied files. Probably not worth the hassle though.

放低过去 2024-12-05 19:45:20

根据我的记忆(我离办公室很远,因此远离 Perforce...),我认为集成可能会成功。

From memory (I am far from office and therefore from Perforce...), I think an integration might do the trick.

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