Extending a version control system with custom del

2019-05-25 13:16发布

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.

3条回答
相关推荐>>
2楼-- · 2019-05-25 13:53

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楼-- · 2019-05-25 14:13

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.

查看更多
神经病院院长
4楼-- · 2019-05-25 14:13

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

查看更多
登录 后发表回答