[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

From: Dave Lawrence <dlawrence_at_ad-holdings.co.uk>
Date: Wed, 30 Jan 2008 18:33:09 +0000

ignacio.lopez_at_tektronix.com wrote:
> Hi everyone,
>
> I'm trying to write a pre-commit hook that prevents the user from
> committing if the files in the transaction if they are not locked (this
> is to force the users to lock the files before editing and to make sure
> no one else is editing the file because most of our files are binaries).
> So far I've been able to run the "svnlook lock [repository] [file path
> in the repository]" command only in the command line, the problem is
> that the pre-commit hook has only two parameters Repository and
> Transaction. Is there a way to get a list of all the files included in a
> transaction? (I am running svn on Windows)
>
> Thanks in advance,
>
> Ignacio

If you want to prevent users editing the file without getting the lock,
then set the svn:needs-lock property. As well as enforcing what your
trying to do with a script, it also makes these files read-only in their
working copy until they obtain the lock.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-01-30 19:33:59 CET

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.