views:

213

answers:

1

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)
+3  A: 

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.

eed3si9n