Extending a version control system with custom delta algorithm
Which mature version control systems allow overriding algorithms of finding and applying delta? Either through plugin or through exteral tool, does not matter.
It must be possible to override internal diff algorithm of a VCS for specific file types. Custom deltas must be stored in the repository to be used by the delta applying algorithm.
Internal binary diff is not acceptable in my case.
I mean exactly overriding algorithms, not displaying t开发者_StackOverflow中文版he differences using a custom diff program.
For Server Side: As far as I know (I´m no expert on this subject!) this is not easily done. So you´re best shot seems to get the source from Apache Subversion and modify/extend it according to your needs. Taking a look into "Pre-Commit Hooks" is also an idea.
For Client Side: ClearCase has some nice extra Merge Tools for e.g. office documents. Also it is possible to change the diff/merge tool in the Tortoise SVN Client.
In the case of git , I don't know of any easy way to override the method for calculating the binary deltas that are used for efficient storage in pack files. (Pack files are generated with most transports for efficient transport of data to and from the server.)
However, you might want to take a look at the bup project for git. This takes the approach of directly generating git pack files for the case of using git for backing-up huge amounts of data. That sounds broadly similar to what you want to do.
[I understand that you explicitly exclude this in your question, but in case another reader finds this question who is interested in nice user-visible diffs of binary files, I'll point out this useful example from Pro Git.]
You can definitely write plugins for Bazaar that provide custom merge algorithms: http://doc.bazaar.canonical.com/development/en/user-guide/hooks.html#example-a-merge-plugin http://doc.bazaar.canonical.com/development/en/user-reference/hooks-help.html#merge-file-content
After a quick look I didn't see something like that for doing diffs, but I'm sure it will not be that hard to add something like that. I know there are plugins like bzr-tools that can provide alternative diff output (cdiff which prints the diff with some colour).
精彩评论