[Top][All Lists]
[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:38:10 -0500 |
It seems %{sVv} notation is for the post-commit hook. Nothing I see
in pre-commit hook documentation says anything about this notation.
GIYF.
For pre-commit hooks, $1 appears to be the module and the rest of
the parameters are the individual files.
Ie.
http://pragmaticautomation.com/cgi-bin/pragauto.cgi/Monitor/LettingCVSPullTheTrigger.rdoc/style/print
This basically means in the script you have to use standard shell
parameter notation, not %s.
---
Kevin R. Bulgrien
> -----Original Message-----
> From: Bulgrien, Kevin
> Sent: Tuesday, July 27, 2010 9:16 AM
> To: 'Traiano Welcome'; 'address@hidden'
> Subject: RE: Problems with Trigger Scripts and CVS Pre-Commit Hooks
>
> > -----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.
Re: Problems with Trigger Scripts and CVS Pre-Commit Hooks, Yaron Yogev, 2010/07/27
RE: Problems with Trigger Scripts and CVS Pre-Commit Hooks, Arthur Barrett, 2010/07/27