info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Problems with Trigger Scripts and CVS Pre-Commit Hooks


From: Bulgrien, Kevin
Subject: RE: Problems with Trigger Scripts and CVS Pre-Commit Hooks
Date: Tue, 27 Jul 2010 09:15:36 -0500

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden
> g] On Behalf Of Traiano Welcome
> Sent: Tuesday, July 27, 2010 4:51 AM
> To: Yaron Yogev; address@hidden
> Subject: Re: Problems with Trigger Scripts and CVS Pre-Commit Hooks
>
>
> No luck, from the debug below, I see "%{s}" being interpreted
> literally:
>
> ---
>
> address@hidden ~/cvswork/ZONES]$ cvs commit DB.evasive.org.za
>
> + echo %{s}
> + cut -d . -f 2,3,4,5,6
> + ZONE=%{s}
> + ZONE_FILE=DB.%{s}
> + named-checkzone %{s} DB.%{s}
>
> zone %{s}/IN: loading from master file DB.%{s} failed: file not found
>
> cvs commit: Pre-commit check failed
> cvs [commit aborted]: correct above errors first!
>
> ----

I am pretty sure he meant for you to try %{s} in the commitinfo
file itself, and not in the hook script.

ie.
named.data/ZONES/* /usr/local/bin/checkzone %{s}

I have a postcommit script that says the following in its header
comment:

# $Id: postcommit.sh,v 1.9 2006/08/17 17:12:00 cvsadm Exp $
#
# CVSROOT loginfo should contain:
#   ALL /home/eden/cvs/scripts/postcommit.sh %{sVv}
#
# This creates the following script parameter format:
#   module file1,oldversion,newversion file2,oldversion,newversion ...
#
# The script runs as the user doing the commit.

Your commitinfo says %s, not %{s}, but of course it is a precommit
rather than a postcommit, and perhaps there is a difference, and
maybe it is optional.  (I do not remember the details on the syntax
since it has been 4 years since I wrote the script.)  I'd at least
try the curly braces in the commitinfo and not in the shell script.

---
Kevin R. Bulgrien

> On 2010/07/27 10:42 AM, "Yaron Yogev" <address@hidden> wrote:
>
> > Hi,
> >
> > change %s --> %{s}
> >
> > Yaron
> >
> > On Jul 27, 10:24 am, Traiano Welcome
> > <address@hidden> wrote:
> >> Hi Yaron
> >>
> >> The specific line is as follows:
> >>
> >>  ---
> >> named.data/ZONES/* /usr/local/bin/checkzone %s
> >>  ---

This message and/or attachments may include information subject to GD Corporate 
Policy 07-105 and is intended to be accessed only by authorized personnel of 
General Dynamics and approved service providers.  Use, storage and transmission 
are governed by General Dynamics and its policies. Contractual restrictions 
apply to third parties.  Recipients should refer to the policies or contract to 
determine proper handling.  Unauthorized review, use, disclosure or 
distribution is prohibited.  If you are not an intended recipient, please 
contact the sender and destroy all copies of the original message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]