扩展 Perforce 以对某些文件扩展名使用自定义内容差异工具

发布于 2024-08-27 04:15:08 字数 345 浏览 11 评论 0原文

我在 perforce 中存储了各种自定义二进制文件,对于许多文件类型,我构建了一个自定义 diff 工具来向内容创建者显示文件实际更改的差异。

例如,如果文件将简单的键值对作为压缩的二进制 blob 进行保存,则 diff 工具会将每个版本加载到内存格式中,并生成对文件进行添加、删除和编辑的列表,以清晰的报告视图的形式呈现。

就像 P4V 中内置的图像比较工具一样,我希望能够使用自己的比较工具来处理我的仓库中的某些文件扩展名,并允许用户使用现有的 P4V 界面来选择修订版本以进行比较并检查历史记录。

所以,我知道您可以为 P4V 编写插件,但我找不到任何相关文档,我想知道 P4V 中是否提供这种扩展功能以及如何使用它?

I have various custom binary files stored in perforce and for many of the file types I have built a custom diff tool to show the content creators a diff of the actual changes to the file.

E.g. If the file holds simple key value pairs as a compressed binary blob the diff tool would load each version into an in memory format and generate a list of additions, deletions and edits to the file presented in a nice clean report view.

Much like the built in image diff tool in P4V i'd like to be able to use my own diff tool for certain file extensions within my depot and allow the users to use the existing P4V interface to pick revisions to diff between and examine history.

So, I am aware you can write add-ins to P4V but I can't find any documentation on it and I'd like to know if this kind of extension functionality is available in P4V and how to use it?

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

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

发布评论

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

评论(2

倾其所爱 2024-09-03 04:15:08

在调查与另一个答案的元差异时,我发现了 P4V 本身内置的解决方案。事实证明,P4V 中用于指定 diff 工具的对话框有一组附加选项,用于为不同的文件扩展名指定不同的工具。

所以看来我根本不需要编写插件或扩展 p4v,我只需要正确设置这些属性即可。

While investigating meta-diff from another answer I found a solution built into P4V itself. It turns out that the dialog in P4V that you use to specify your diff tool has an additional set of options to specify a different tool for different file extensions.

So it seems I don't need to write a plugin or extend p4v at all, I just need to set those properties correctly.

风启觞 2024-09-03 04:15:08

我不使用 Perforce,但您应该能够使用 meta-diff 来执行此操作,这允许您为不同的文件类型设置不同的差异实用程序。

I don't use Perforce, but you should be able to do this using meta-diff, which lets you set up different diff utilities for different file types.

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