本文介绍了#have 不捕获 Perforce 中已删除文件的 CL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用以下 P4 命令进行快照版本控制.

We are using the following P4 command for snapshot versioning.

p4 changes -m1 /path/to/files/...#have

我注意到,如果 CL 是头部 CL,则上述命令不会捕获已删除文件的 CL.

I noticed that the above command doesn't capture CLs of deleted files if the CL is the head CL.

所以它最终有两个版本相同但文件不同的工件.

So it ends up having two artifacts with the same version but different files.

我想知道我们如何覆盖这种边缘情况?

I was wondering how we can cover this edge case?

推荐答案

这是由于删除的文件不会同步到客户端,因此永远不会包含在 #have 中.

This is an artifact of the fact that deleted files aren't synced to the client and will therefore never be included in #have.

如果可能,解决此 IMO 的最佳方法是在同步到主要修订时捕获更改列表.做:

If possible, the best way to address this IMO is to capture the changelist at the time you sync to the head revision. Do:

p4 changes -m1 -ssubmitted /path/to/files/...

然后使用该更改列表执行以下操作:

and then use that changelist to do:

p4 sync /path/to/files/...@CHANGE

由于提交的更改列表是不可变的(除了像擦除和 +S 文件这样的边缘情况之外),您现在可以保证同步到同一路径@change 的任何其他人都将获得与您的工作区相同的修订集.

Since submitted changelists are immutable (outside of edge cases like obliterate and +S files) you now have a guarantee that anyone else syncing to that same path@change will get the same set of revisions that's in your workspace.

请注意,p4 changes 命令捕获已删除修订的变更列表,即使这些修订随后被 p4 同步跳过!

Note that the p4 changes command will capture changelists with deleted revisions, even if those revisions are then skipped by the p4 sync!

这篇关于#have 不捕获 Perforce 中已删除文件的 CL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 11:28