[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 script help

From: Phil <plabonte_at_gmail.com>
Date: 2006-11-12 02:42:34 CET

Ryan, I want to thank you.
Your files have helped me a great deal... in fact they have helped me to
write in additional checks!
Thank you Thank you...

I am going to try and get these added to the contrib location so that other
can use these as well!
Thank you again!

On 11/10/06, Ryan Schmidt <subversion-2006d@ryandesign.com> wrote:
>
> On Nov 10, 2006, at 17:42, Phil wrote:
>
> > On 11/10/06, Ryan Schmidt wrote:
> >
> >> On Nov 10, 2006, at 12:42, Phil wrote:
> >>
> >> > All I really need is something to set svn:needs-lock on all
> >> > commited files...
> >> > perhaps someone can point me in the right direction?
> >> >
> >> > I am no programmer unfortunately... I am not too interested in
> >> > checking to see if the file has it set or not... I would rather
> >> > just set it to svn:needs-lock for everything...
> >> >
> >> > is this possible at the server end? I know I can do this with auto-
> >> > props at the client side... but that is too risky...
> >>
> >> No, that's really not how it's done in Subversion. There is no way to
> >> force all files to be that way on the server side. The Subversion way
> >> to do it is:
> >>
> >> - Set up the clients to set the property on the desired files, e.g.
> >> with auto-props
> >> - Install a pre-commit hook to reject commits of files that do not
> >> have tho property
> >
> > when I say never seen one... I mean I looked throughout the archive
> > of subversion-users and everyone that asked about svn:needs-lock
> > always gets told the same thing "set up your clients to apply
> > svn:needs-lock then use a hook script to check that it is applied
> > and reject if it is not" which is great advice... however the
> > problem is that whenever anyone has ever asked how to actually
> > program a hook script to do just that... everyone points them to
> > the SVN book or example scripts but they really do not help for
> > hook scripts...at least in this case...
> >
> > so does anyone know of a hook script, that works or has been
> > tested, that can check for svn:needs-lock for a pre-commit hook
> > script?
>
> - Put ensure-needs-lock.pl and pre-commit into your hooks directory
> - Change "/path/to/repos" to the absolute path to your repository in
> pre-commit
> - Change "/usr/bin/svnlook" and "/usr/bin/env" to the correct path to
> svnlook and env, respectively, within ensure-needs-lock.pl, if necessary
>
>
>
>
>
>
>
>
Received on Sun Nov 12 02:43:11 2006

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.