Extending Perforce to use a custom content diff tool for certain file extensions
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 hold开发者_StackOverflows 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?
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.
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.
精彩评论