RE: Problems with Trigger Scripts and CVS Pre-Commit Hooks
"Bulgrien, Kevin" <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.general |
|---|---|
| Message-ID | <83894A1821034948BA27FE4DAA4742791AA8858F10@apde03.APD.Satcom.Local> |
> -----Original Message----- > From: [email protected] > [mailto:[email protected] > g] On Behalf Of Traiano Welcome > Sent: Tuesday, July 27, 2010 4:51 AM > To: Yaron Yogev; [email protected] > Subject: Re: Problems with Trigger Scripts and CVS Pre-Commit Hooks > > > No luck, from the debug below, I see "%{s}" being interpreted > literally: > > --- > > [traianow@box ~/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" <[email protected]> wrote: > > > Hi, > > > > change %s --> %{s} > > > > Yaron > > > > On Jul 27, 10:24 am, Traiano Welcome > > <[email protected]> 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.