0

Scenario : i have precommit hook configured in my svn repo of multiple projects.I have blocked commits in code which include synchronize method or println method,But in some cases i want to give grant so that coders can commit those methods .

Now thing is that i have multiple projects, if i comment out my portion of lock in precommit hook then it will raise a risk as other project coders can commit prohibited methods at same time.

Please guide me how can i configure my precommit hook as per particular branch if its possible.

Removing svn rights using access file is very difficult at times as no of users are large.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Kaku
  • 119
  • 2
  • 11

2 Answers2

0

Why don't you go for path based authorization? Following link may be useful
http://svnbook.red-bean.com/en/1.7/svn.serverconfig.pathbasedauthz.html
And I'd also recommend if you visit and see if you are looking at the same objective as that of
SVN Python pre-commit hook - how to find out target branch

Community
  • 1
  • 1
ILLUSION
  • 31
  • 6
  • Thanks :) path based authorization is already there.But no of users are large so its difficult to remove rights . – Kaku Jul 20 '13 at 21:10
  • in short, i want to remove my hook script for a particular branch whenever needed for any number of users who have rights in auth file ,but others branch will be working with hook with no issue. – Kaku Jul 20 '13 at 21:13
  • I am still searching for solution. .. Anyone knows if we can apply precommit hook branch by branch to control some code measures.? – Kaku Mar 17 '14 at 07:20
0

Use svnlook subcommands in your hooks

Read svnlook help dirs-changed in order to get (wiil be) changed in transactions paths in repo

Read svnlook help author if you want to implement additional user-level checks in hook

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110