如何使用 SVN 使某些开发人员只显示某些文件夹

发布于 2024-07-10 04:45:12 字数 598 浏览 7 评论 0原文

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

我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

丶视觉 2024-07-17 04:45:12

我认为不可能完全按照您想要的方式进行操作,即让每个人都查看 http:// example.com/svn/repos/ 并且根据您是谁,您会看到不同的东西。

拒绝访问文件夹是正确的做法。
您可以做的是为某些开发人员创建一个“查看”文件夹。 假设您的所有项目都类似于

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

添加另一个名为“视图”的文件夹结构。

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

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

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

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文