Extending Perforce to use a custom content diff tool for certain file extensions

StackOverflow https://stackoverflow.com/questions/2510765

  •  22-09-2019
  •  | 
  •  

문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top