Extending a version control system with custom delta algorithm

て烟熏妆下的殇ゞ 提交于 2019-12-08 02:50:19

问题


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 the differences using a custom diff program.


回答1:


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.




回答2:


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.]




回答3:


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).



来源:https://stackoverflow.com/questions/5338039/extending-a-version-control-system-with-custom-delta-algorithm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!