如何在 Perforce 中撤消集成并仍然能够重做它?

发布于 2024-10-20 12:21:50 字数 322 浏览 3 评论 0原文

我确实有一个糟糕的集成变更列表。我想撤销它,并更仔细地重做(可能以较小的增量)。

我使用 Perforce 的 rollback 命令恢复到文件的先前版本,但是当我尝试重做集成时,Perforce 声称没有什么可做的。显然,回滚只是恢复文件,但对关联的集成相关元数据没有任何作用。因此,当我尝试重新集成时,Perforce 认为“您之前已经集成了两个版本 - 现在无需执行任何操作”。

有什么方法可以撤消涉及集成的变更列表,并使软件仓库处于我实际上可以再次进行集成的状态吗?

这是一个很大的项目,集成了 2,000 多个文件,所以我真的不想手动执行此操作。

I have a bad integration changelist in perforce. I want to back it out, and redo it more carefully (and possibly in smaller increments).

I used Perforce's rollback command to revert to a previous version of the files, but when I attempted to redo the Integration, Perforce claimed there was nothing to be done. Apparently, rollback simply reverts the files, but does nothing about the associated integration-related metadata. So when I try to re-integrate, Perforce thinks "you already integrated two versions ago - nothing to do now".

Is there any way I can undo a changelist that involved integration, and leave the depot in a state where I can actually do the integration over again?

It's a large project, and integration was over 2,000 files, so I really don't want to be stuck doing this manually.

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

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

发布评论

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

评论(3

夜未央樱花落 2024-10-27 12:21:50

正如您所看到的,回滚更改列表不会“撤消”集成。集成发生后,集成记录将一次性存储在 perfroce 数据库中。

如果您想重新进行集成,也可以。您可以使用命令行中的“-f”标志来强制集成,而不考虑以前的集成历史记录。从本质上讲,使用此标志将重新开始您的集成。如果您使用的是 p4v,集成对话框中的“高级选项”下有一个选项可以执行相同的操作。

如果您只想重新集成某个修订范围(即从特定日期开始),请确保也指定了该范围。否则,如果您要重做所有集成,那么您应该可以顺利进行。集成的帮助文件确实表明,使用不带修订范围的 -f 将强制 p4 解析在没有公共基础的情况下执行合并,因此也要注意这一点。如果您从源文件的所有修订版开始完全集成,那么我认为此警告将不适用。

HTH。

As you have seen, rolling back the changelist won't "undo" the integration. The integration records are stored once and for all after an integration happens in the perfroce database.

If you want to do the integration over, you can. You can use the '-f' flag from the command line to force an integration without regard to previous integration history. Use of this flag will, in essence, start your integration over. If you are using p4v, there is an option under "advanced options" in the integration dialog that performs the same operation.

If you want to reintegrate only a certain revision range (i.e. from a specific date), make sure that you specify that as well. Otherwise, if you are redoing all the integrations, you should be good to go. The help file on integrate does indicate that usage of -f without a revision range will force p4 resolve to perform merges without a common base, so be on the lookout for that as well. If you are starting over with a full integrate from all revisions of the source file, then this caveat won't apply I think.

HTH.

流年已逝 2024-10-27 12:21:50

一种可能性(尽管不推荐)是“p4 删除”集成文件(即目标文件)的头部修订版。重要的是这些文件在后续更改中尚未被修改。

只有具有适当权限(我认为超级)的强制用户才能做到这一点。

由于这会删除集成的所有痕迹(包括差异、历史记录、所有元数据),因此不建议这样做。它无法撤消。

我只是为了完整起见才在这里提到这一点。如果您认为需要这个,请务必小心,不要犯错误。

One possibility (though it isn't recommended) is to "p4 obliterate" the head revisions of the integrated files (target files that is). It's essential that the files weren't modified yet in a subsequent change.

Only a perforce user with the appropriate rights (super I think) can do that.

Since this removes all traces of the integration (including the diffs, history, all meta-data) it is not recommended. It cannot be undone.

I just mentioned this here for the sake of completeness. If you think you need this, be very careful not to make a mistake.

孤寂小茶 2024-10-27 12:21:50

我建议您将强制集成磨练为仅包含在特定集成

p4 描述 [ChangeList] | 中的文件列表。 grep "^\.\.\."

否则,您可能会影响比预期更多的文件(自您提交以来已更改的任何文件)或意外地影响更广泛的范围。

I would suggest that you hone your forced integration to just the filelist contained in the specific integration

p4 describe [ChangeList] | grep "^\.\.\."

else you could impact more files than intended (any that have changed SINCE your submission) or accidentally act on a wider scope.

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