0

I have a single svn repository for all my projects. In svn I also have a directory which contains the compiled libraries (like .dll, .swc) which are directly referenced by the projects.

I want another developer to do a project for me and I don't want to open up my whole svn tree to him. If it was only about not being able to commit I would just set the read permission in authz, but I don't want that he see's all my other sourcecode.

I don't want him to make two checkouts, one for the project and one for the library folder, because all relative paths would be messed up if I try to check it out and compile it.

So want following: A checkout of trunk by this user should lead to a checkout that contains the folder structure of all to this user relevant directories, omitting all non-relevant.

I.e.: If my svn svn checkout looks like this:

-trunk
|-BinLibrary
|-Project 1
|-Project 2
|-ExternalProjects
 |-Project 3

I want his checkout to look like this:

-trunk
|-BinLibrary
|-ExternalProjects
 |-Project 3

Is that possible? If yes: How?

Any help is appreciated!

Edit: I'm using svnserve in a Windows environment (no apache)

Zoe
  • 27,060
  • 21
  • 118
  • 148
David Rettenbacher
  • 5,088
  • 2
  • 36
  • 45

2 Answers2

1

In the authz file, in the username = permission lines, leaving permission empty means that the respective user has no access, not even read. In the manual, consider this example:

[calc:/branches/calc/bug-142]
harry = rw
sally = r

[calc:/branches/calc/bug-142/secret]
harry =

harry cannot read secret.

You can give other user no permission on the entire repository, and then on the specific path read-write.

Martin v. Löwis
  • 124,830
  • 17
  • 198
  • 235
  • +1 Using this technique will not produce the exact requested result. Even though directory names Project 1 and Project 2 will appear on the checkout, there will not be any content under those directories. And if the user tries to add something to those directories on their local working copy, they can, but they won't be able to commit them to the repository. – jgifford25 Nov 22 '10 at 15:45
  • But if I specify in authz "[/]username = " and somewhere below "[/trunk/externalprojects/project 3]username = rw" svn says "Authorization failed". If I grant read access in root everything is fine (but exposes all source what I don't want...). – David Rettenbacher Nov 22 '10 at 15:59
  • I have to add that in svnserve.conf I specified "anon-access = none" and left "auth-access" with its default value. – David Rettenbacher Nov 22 '10 at 16:02
  • @Warappa ==> svnserve behaves a bit differently than the Apache svnauthz. You should really consider switching to Apache as it is more flexible and better supported by the Subversion community. Have you tried checking out from /trunk/externalprojects/project 3 as username? Since username does not have access from the root, they will not be able to check out from that level. – jgifford25 Nov 22 '10 at 17:18
  • @jgiffort25: OK, I already thought my current configuration would be a dead end. I'll look into switching to Apache. @all: Thanks for your support! – David Rettenbacher Nov 23 '10 at 07:39
0

Maybe give this a go:

Per Directory Access Control

Simon Dickson
  • 711
  • 7
  • 10
  • This link is about using apache server - but I'm using svnserve in a Windows environment (now added that info to my question) - but anyway: Thanks! – David Rettenbacher Nov 22 '10 at 14:10