如何删除错误标记为冲突的 Perforce 变更列表项?

发布于 2024-08-03 22:21:19 字数 325 浏览 4 评论 0原文

我有几个 .refresh 文件,它们以某种方式进入了我的默认待定更改列表,并且从那里开始显示与它们的仓库对应项冲突。

它们是不可区分、不可解析的,我已使用 perforce 网站上的说明将这些文件排除在比较之外,但这些作业仍然出现在待处理的更改列表中。

其中还有一些其他毫无意义的东西,例如 .sln 文件等,它们确实妨碍了我们实际上尝试进行源代码控制的所有正确文件。每当我们尝试发布某些内容或合并分支时,必须让每个人都知道他们应该被忽略,这非常烦人。

那么你到底如何摆脱这些完全伪造的变更列表项目呢?我什至尝试删除他们引用的文件(因为它们并不完全必要),但该工作仍然没有提供解决方案。

I have a couple of .refresh files that have somehow found their way into my perforce default pending changelist and from there somehow started showing as being in conflict with their depot counterparts.

They are un diffable, unresolvable, I have excluded the files from being compared using the instructions on the perforce website and yet these jobs still appear on the pending changelist.

There are a few other pointless things in there like .sln files and the like which really get in the way of all the proper files which we're actually trying to source control. It's quite annoying to have to let everyone know they should be ignored whenever we're trying to release something or merge branches.

So how the hell do you get rid of these completely bogus changelist items? I've even tried deleting the files to which they refer (as they weren't entirely necessary) but still the job does not offer a resolution.

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

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

发布评论

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

评论(3

没︽人懂的悲伤 2024-08-10 22:21:19

删除 .refresh 文件后,将它们恢复到待更改列表中。 (Perforce 需要明确告知您在文件系统上执行的所有操作。)如果这些文件错误地进入您的存储库,您应该考虑删除它们。如果您不想在存储库中删除它们,但希望能够创建自己的版本而不发生冲突,则可以同步到#none,Perforce 将忽略它们。

关于问题“你能在 Perforce 中“忽略”文件吗?”针对说服 Perforce 忽略文件的更大问题提出了许多解决方案,包括:

  • 添加负客户端规范映射以将生成的文件排除在 Perforce 的考虑范围之外
  • 添加服务器端提交触发器,该触发器将拒绝包含不应包含的文件的更改列表版本化的

After deleting the .refresh files, revert them in your pending changelist. (Perforce needs to be told explicitly about everything you do on the filesystem.) If these files erroneously found their way into your repository, you should consider deleting them. If you don't want to delete them in the repository but want to be able to create your own versions without conflicts, you can sync to #none and Perforce will ignore them.

The discussion on the question "Can you "ignore" a file in Perforce?" proposes a number of solutions to the bigger problem of convincing Perforce to ignore files, including:

  • Add a negative client spec mapping to exclude generated files from Perforce's consideration
  • Add server-side commit triggers that will reject changelists with files that should not be versioned
丢了幸福的猪 2024-08-10 22:21:19

答案实际上取决于您想要什么最终状态。

A) perforce 中没有副本,磁盘上有本地副本:

  1. 将本地副本移开
  2. 使用 p4 或 P4V 恢复更改 在
  3. perforce 中删除文件,或者更好地删除它们
  4. 将本地副本移回原位
  5. 确保您没有 p4 添加未来的文件。例如,带有反对提交的触发器。

注意:如果删除,其他工作区(例如其他开发人员)可能会丢失文件。

B) perforce 中的默认副本,磁盘上有本地可写副本:

  1. 将本地副本移开,
  2. 使用 p4 恢复更改或在 P4V
  3. p4 编辑文件中,更改文件类型 +w
  4. 提交文件。
  5. 将备份副本移至可写文件上。

The answer really depends what end state you want.

A) No copy in perforce, local copy on disk:

  1. Move local copy out of the way
  2. Revert changes with p4 or in P4V
  3. Delete files in perforce, or even better obliterate them
  4. Move local copies back in place
  5. Make sure you don't p4 add the files in future. e.g. With a trigger against submit.

NB: If you delete then other workspaces (e.g. other developers) may lose the files.

B) Default copy in perforce, with local writable copy on disk:

  1. Move local copy out of the way
  2. Revert changes with p4 or in P4V
  3. p4 edit files, change filetype +w
  4. Submit files.
  5. Move backed up copy over writable files.
围归者 2024-08-10 22:21:19

好吧,似乎没有人有答案,而且我不希望自动接受错误的答案,所以我会接受这个答案。

耻辱。

Well, it seems that no one has an answer and I don't want wrong answers to be auto-accepted so I'll accept this one.

Shame.

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