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

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

问题描述

如何在存储库中存储文件权限?一些文件需要只读以阻止第三方程序将其删除,但在检出存储库后,它们被设置为读写.

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.

我在谷歌上查看并找到了一篇 2005 年的博客文章 表明 Subversion 不存储文件权限.列出了补丁和钩子脚本(只有一个 url 仍然存在).三年后,Subversion 是否仍然不存储文件权限,并且钩子是解决此问题的唯一方法吗?(我从来没有做过钩子,而是使用了 Subversion 原生的东西.)

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天全站免登陆