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

Re: Syntax help for pre-commit hook

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2006-04-12 20:36:41 CEST

On Apr 12, 2006, at 19:20, Phil wrote:

> I need help with the syntax for a pre commit hook script.
> I want to check that svn:need-lock is set on files before the are
> commited.
>
> I looked at the default pre-commit hook but I am not much of a
> programmer and I cannot figure out the syntax for what I want to
> accomplish.

I wrote the attached script for you which seems to work, assuming you
have a Unix-like server. You'll need to configure the paths to the
svnlook and sed executables. Unfortunately I'm not one enough with
sed to understand why, but the way I used sed only seems to work with
GNU sed, not BSD sed. Outrageous theories about this are gladly
accepted. If you have a Windows server, then someone will first have
to convert this shell script to something that runs on Windows.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Received on Wed Apr 12 20:38:07 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.