4

In Git one can specify these in .gitattributes and perform some additional configuration:

git config diff.difftool.command ...
git config merge.mergetool.driver ...

In Mercurial it is possible to specify patterns in hgrc file ([diff-patterns] and [merge-patterns] sections).

How to achieve this in Subversion?

1 Answer 1

2

The red-book for Subversion (normally the source of all knowledge) is not too specific here. It names that there is the option to configure diff-cmd and diff3-cmd and that it is possible to add extensions to the call.

However, it states the following:

The decision on when to fire off a contextual two- or three-way diff as part of a larger Subversion operation is made entirely by Subversion and is affected by, among other things, whether the files being operated on are human-readable as determined by their svn:mime-type property. This means, for example, that even if you had the niftiest Microsoft Word-aware differencing or merging tool in the universe, it would never be invoked by Subversion as long as your versioned Word documents had a configured MIME type that denoted that they were not human-readable (such as application/msword).

It does not say how to influence that decision :-(

If you are using the tool TortoiseSVN, there are configuration options included to specify the used diff tool per mime-type of the file under consideration. The path to that configuration is: TortoiseSVN > Settings > External Programs > Diff Viewer > Advanced.... Perhaps that is an option for you.


My personal opinion here is that the subversion team thinks that you should use a wrapper as diff-tool anyway, and to do there the decision what tool to use with which specific configuration based on the mime-type.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.