[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: Andy Levy <andy.levy_at_gmail.com>
Date: Wed, 27 Feb 2008 19:34:18 -0500

On Wed, Feb 27, 2008 at 6:17 PM, Kevin Grover <kevin_at_kevingrover.net> wrote:
>
> On Wed, Feb 27, 2008 at 6:06 AM, DePriest Richard 403
> <richard.depriest_at_crackerbarrel.com> wrote:
>
> >
> >
> > We are new users of subversion and would like to set up a pre-commit hook
> to not allow an user to commit a file that another user has a lock on. Is
> there an example of said hook that I could eyeball. I have been searching
> and couldn't find an example of this kind of hook.
> >
> > Any help would be greatly appreciated.
> >
> > Rick DePriest
> > Project Manager - Retail Systems
> > Cracker Barrel Old Country Stores, Inc.
> > Ph. (615) 443-9845
> > Email: rdepries_at_crackerbarrel.com
> >
>
>
> If you use the svn:needs-lock mechanism, you don't need any hook scripts.
> SVN handles it for you.
>
> See the docs: http://svnbook.red-bean.com/en/1.4/svn.advanced.locking.html
>
> The crux of it is no one else can modify a file when I have a lock (unless
> they manually circumvent the read-only access). Even if they manually set
> the file to writable and modify it, they can't commit it because they don't
> have the lock.

Unless they use svn lock --force to steal the lock from you.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-02-28 01:34:40 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.