如何让某些使用 SVN 的开发人员只显示某些文件夹 [英] How can I make only some folders show up for certain developers with SVN

查看:62
本文介绍了如何让某些使用 SVN 的开发人员只显示某些文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含一堆文件夹的存储库,我希望某些开发人员在对存储库进行签出时只能获得其中的两个或三个文件夹.如何使文件夹默认不显示,然后仅在我想授予访问权限时添加它们.

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.

我在 SVN 服务器上使用 VisualSVN,我所做的是给予顶级的读访问权限,然后拒绝访问每个子文件夹,然后将拒绝更改为读/写我希望每个开发人员访问的文件夹.这很痛苦,因为每当我添加一个新文件夹时,我都必须进入并拒绝对其进行访问.

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.

这是我想要的:

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)

推荐答案

我觉得不可能完全按照你的意愿去做,就是让大家看看http://example.com/svn/repos/ 并且根据您的身份,您会看到不同的内容.

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

http://example.com/svn/repos/projects/
   +- References
   +- Project1
   +- Project2

添加另一个名为视图的文件夹结构.

Add another folder structure called views.

http://example.com/svn/repos/
   + projects/       
       +- References
       +- Project1
       +- Project2
   + views/
       +- View1

viewsView1 都是普通文件夹.技巧是设置 svn:externalsView1 文件夹上的属性到 http://example.com/svn/repos/projects/Referenceshttp://example.com/svn/repos/项目/项目1.当有人检出 View1 时,它也会检出它下面的 ReferencesProject1.我希望这会有所帮助.

Both views and View1 are nothing but plain folders. Trick is to set svn:externals properties on View1 folder to http://example.com/svn/repos/projects/References and http://example.com/svn/repos/projects/Project1. When someone checks out View1, it will also checkout References and Project1 under it. I hope this helps.

这篇关于如何让某些使用 SVN 的开发人员只显示某些文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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