C. Michael Pilato wrote:
>Tim Van Epps <tvanepps@efs-us.com> writes:
>
>
>
>>Hello,
>> I wrote a pre-commit hook that prevents users from running svn
>>commit against a path that includes "releases/"; unfortunately, this
>>hook also prevents users from creating new releases. Can I write a
>>pre-commit hook that will allow 'svn copy http://svn/trunk
>>http://svn/releases' but not allow a svn commit into the new release
>>branch. Or, to put it differently, can I write a pre-commit hook or
>>other software that will allow users to create a new branch but not
>>update the branch once created.
>>
>>
>
>Have you hook run 'svnlook changed ${REPOS} -t ${TXN}', and verify
>that the only change is an 'A' (added) line for a path directly under
>/releases. If it isn't bail. But if it is, you could even have it
>also run 'svnlook dirschanged ${REPOS} -t ${TXN}' and verify that that
>one changed path is a directory. Of course, this would allow any old
>directory creation under /releases, copy or not.
>
>Or, if you have language bindings available, you could write a script
>which does *exactly* what you want because it could directly access
>the repos via the APIs.
>
>
Or just use the commit-accdess-control.pl script that's already in the
Subversino repository.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu May 27 20:32:41 2004