简体   繁体   中英

How do I make a directory immutable in svn?

We have certain directories in svn that should not be touched after a release. While I can put svn:needs-lock on each file in the directory, I would like to prevent adds and deletes as well as modifications.

Is there any way to do this?

You could prevent access to the path through permissions in the authz-file. Practically you could allow only one user to access the release-path, that the user that makes the releases. Or you disallow access after a release completely. In the authz-file you can define a path and which users has read- and write-access.

另一种可能性是通过预提交的钩子脚本 :确认提交不包含任何不被触摸的文件夹,如果包含,则失败

Don't forget that if you remember the revision number - it's already immutable!

Here's a crazy idea - move the directory to a location under tags, and in the original location add an externals reference to the tag location pegged with the revision number.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM