如何使用 SVN 使某些开发人员只显示某些文件夹
我有一个包含一堆文件夹的存储库,我希望某些开发人员在检出存储库时只能获取其中两个或三个文件夹。 如何使文件夹默认不显示,然后仅在我想要授予访问权限时添加它们。
我使用 VisualSVN 作为 SVN 服务器,我所做的就是授予对顶层的读取访问权限,然后拒绝对每个子文件夹的访问,然后将拒绝更改为对我希望每个开发人员访问的文件夹进行读/写。 这很痛苦,因为每当我添加新文件夹时,我都必须进入并拒绝对其的访问。
我尝试只授予子文件夹的读/写权限,但是当他们尝试在父文件夹上签出时,会出现错误。 我只希望开发人员必须对顶级文件夹进行签出。
这就是我想要的:
RepoFolder (dev1 checks out this)
- References (this shows to dev1)
- Project1 (this shows to dev1)
- Project2 (this does not show to dev1)
- Project3 (this does not show to dev1)
- Project4 (this does not show to dev1)
I have a repository with a bunch of folders, and I want certain developers to only get two or three of those folders when they do a checkout on the repository. How can I make the folders not show by default, and then add them only as I want to grant access.
I'm using VisualSVN for the SVN server, and what I have done is given read access to the top level, then denied access to every subfolder, then changed the deny to read/write on folders I want each dev to access. This is a pain because whenever I add a new folder, I have to go in and deny access on it.
I tried just granting read/write on the subfolders, but when they try to checkout on the parent it gives them an error. I only want the devs to have to do a checkout on the top level folder.
Here's what I want:
RepoFolder (dev1 checks out this)
- References (this shows to dev1)
- Project1 (this shows to dev1)
- Project2 (this does not show to dev1)
- Project3 (this does not show to dev1)
- Project4 (this does not show to dev1)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为不可能完全按照您想要的方式进行操作,即让每个人都查看 http:// example.com/svn/repos/ 并且根据您是谁,您会看到不同的东西。
拒绝访问文件夹是正确的做法。
您可以做的是为某些开发人员创建一个“查看”文件夹。 假设您的所有项目都类似于
添加另一个名为“视图”的文件夹结构。
views
和View1
都只是普通文件夹。 技巧是设置svn:externals
View1
文件夹上的属性到 http://example.com/svn/ repos/projects/References 和 http://example.com/svn/repos/项目/项目1。 当有人签出View1
时,它还会签出其下的References
和Project1
。 我希望这有帮助。I don't think it's possible to do exactly what you want, which is to let everyone check out http://example.com/svn/repos/ and depending on who you are you see different things.
You are on the right track by denying access to the folders.
What you can do is to create a "view" folder the certain developers. Suppose all your projects look like
Add another folder structure called views.
Both
views
andView1
are nothing but plain folders. Trick is to setsvn:externals
properties onView1
folder to http://example.com/svn/repos/projects/References and http://example.com/svn/repos/projects/Project1. When someone checks outView1
, it will also checkoutReferences
andProject1
under it. I hope this helps.