[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: pre-commit hook question

From: Branko ─îibej <brane_at_xbc.nu>
Date: 2004-05-27 20:30:25 CEST

C. Michael Pilato wrote:

>Tim Van Epps <tvanepps@efs-us.com> writes:
>> 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

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.