本文介绍了如何避免在SVN信息库中混合使用EOL样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

是否有最佳实践来防止在Subversion存储库中混合使用eol样式.

Is there a best practice for preventing mixed eol-styles in a subversion repository.

我知道可以将svn:eol-style=native设置为自动道具,但是我必须确保为所有提交者设置了它.如果侵入性较小的解决方案,我也不愿意对svn:eol-style进行回顾性的,在整个存储库范围内的更改.

I know that svn:eol-style=native can be set as an auto-prop, but I would have to ensure that it was set for all committers. I'm also reluctant to do a retrospective, repository-wide change of svn:eol-style if there is a less invasive solution.

推荐答案

您应该在服务器端使用pre-commit挂钩.

You should use pre-commit hooks on server-side.

这是您需要的一个钩子: http://svn.apache .org/repos/asf/subversion/trunk/contrib/hook-scripts/check-mime-type.pl

Here is a hook you need:http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/check-mime-type.pl

此钩子将强制用户设置正确的eol样式.

This hook will enforce users to set correct eol-style.

请参见 svn文档有关如何使用它们的信息.

See svn documentation on how to use them.

此外,您可以实现自己的钩子,该钩子将自动设置eol样式.

Also, you can implement your own hook which will set eol-style automatically.

这篇关于如何避免在SVN信息库中混合使用EOL样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 12:55