在Subversion仓库中存储文件权限 [英] Storing file permissions in Subversion repository

查看:67
本文介绍了在Subversion仓库中存储文件权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在存储库中存储文件权限?一些文件需要是只读的,以阻止第三方程序对其进行垃圾回收,但是在退出存储库后,它们被设置为可读写.

我在google上找到了一个 2005年的博客文章指出Subversion不存储文件权限.列出了补丁和挂钩脚本(仅存在一个URL).三年后,Subversion仍不存储文件许可权,而钩子是实现此目的的唯一方法吗? (我从来没有做过钩子,而是使用了Subversion固有的东西.)

解决方案

一个可能的解决方案是编写一个脚本,将其与其余代码一起签入,并将其作为构建过程的第一步来运行. /p>

此脚本贯穿您的代码库副本,并设置对某些文件的读取权限.

理想情况下,脚本将从简单的输入文件中读取文件列表. 这样可以轻松维护,并使其他开发人员更容易理解哪些文件被标记为只读.

How do you store file permissions in a repository? A few files need to be read-only to stop a third party program from trashing it but after checking out of the repository they are set to read-write.

I looked on google and found a blog post from 2005 that states that Subversion doesn't store file-permissions. There are patches and hook-scripts listed (only one url still exists). Three years later does Subversion still not store file permissions and are hooks the only way to go about this? (I've never done hooks and rather use something that is native to Subversion.)

解决方案

One possible solution would be to write a script that you check in with the rest of your code and which is run as the first step of your build process.

This script runs through your copy of the codebase and sets read permissions on certain files.

Ideally the script would read the list of files from a simple input file. This would make it easy to maintain and easy for other developers to understand which files get marked as read-only.

这篇关于在Subversion仓库中存储文件权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆