4

I use authz files to restrict access to a svn server (projA, projB). I would like to use the same restrictions for the trunk and the branches. Is there a nice way of doing it, instead of copy/pasting the configurations:

[/]<br>
* = r

[/trunk/projA]<br>
toto = rw<br>
tata =

[/trunk/projB]<br>
toto = <br>
tata = rw

[/branch1/projA]<br>
toto = rw<br>
tata =

[/branch1/projB]<br>
toto = <br>
tata = rw

As I got plenty of projects and branches, this configuration becomes hard to maintain.

bahrep
  • 29,961
  • 12
  • 103
  • 150
David
  • 41
  • 2

1 Answers1

2

No. The simplest solution would be to use the svnperms.py script to handle this. The problem with svnperms.py is that you can't handle the situation to prevent seeing a folder (toto = ). Otherwise you have to handle it via copy&past.

It might make your life easier if you change the organization to:

   +-- project1
        +--- trunk
        +--- tags
        +--- branches
   +-- project2
        +--- trunk
        +--- tags
        +--- branches

But I don't know if this is an option.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235
  • Thanks for your answer. The organization you propose is actually what you use now, but it is also heavy to maintain. When we create tags, we need to add all the news tags in the configuration. That is why I thought moving the trunk/branch ahead of the projects would help. Do you know if such user access configuration is easier with GIT? – David Mar 31 '11 at 15:23
  • May be i misunderstand, but why do you need to add all the news tags in the configuration ? A user access configuration like this is simple not possible with Git, cause git has no user access mechanism on level of tags/branches. In Git you need for every project a single repository. – khmarbaise Mar 31 '11 at 15:36
  • When I create a new branch (new version release) on my projects (projA and projB, since they have cross dependencies), my server is: /branch-v1/projA, /branch-v1/projB, /branch-v2/projA, /branch-v2/projB. For each new release I need to add new lines in the config file to keep the access restriction. Maybe I mis-use the branch/trunk way of working? – David Mar 31 '11 at 16:36
  • You can use svn:externals to define such dependencies or may a better way would be to use a build tool which handles such things. – khmarbaise Mar 31 '11 at 16:37
  • Thanks a lot, I had never thought of using svn:externals. It looks powerfull but somehow touchy. I will make some tries. I also tried [piston.rubyforge](http://piston.rubyforge.org) but the website seems down. – David Apr 01 '11 at 09:05
  • So you're working with ruby/ror you could use rvm to create gems and handle the dependencies. Furthermore you could take a look to capistranoe (deployment). – khmarbaise Apr 01 '11 at 09:58