info-cvs
[Top][All Lists]
Advanced

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

RE: Loginfo not failing commit.


From: Carter Thompson
Subject: RE: Loginfo not failing commit.
Date: Fri, 2 Apr 2004 09:51:13 -0800

Thanks, Mark.

I came to that conclusion last night.  Thanks for your
help.  

I hope this doesn't bite others that are using Karl Fogel's
Open Source Development with CVS book.  Although it's a 
fabulous resource for CVS the comment on failing the 
commit when using a script in loginfo could be better
explained.

Cheers,

Carter.

> -----Original Message-----
> From: address@hidden [mailto:address@hidden On Behalf Of 
> Mark D. Baushke
> Sent: Thursday, April 01, 2004 11:54 PM
> To: Carter Thompson
> Cc: address@hidden
> Subject: Re: Loginfo not failing commit. 
> 
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Carter,
> 
> By the time that loginfo is called, the commit has already 
> happened for at least one directory, so failing the remainder 
> of the directories will likely leave the repository in an 
> inconsistent state.
> 
> 
> Carter Thompson <address@hidden> writes:
> 
> > I have written a perl script to parse some log information 
> from CVS.  
> > However, from Karl Fogel's book, Open Source Development 
> with CVS, he 
> > states that any nonzero exit from a script/program run by 
> loginfo will 
> > fail the commit.  Unfortunately, this appears not to be 
> true.  Would 
> > someone be so kind as to verify this?  I'm running CVS 
> Server version 
> > 1.11.2 on solaris and my loginfo script and test perl script are 
> > included below.  I'd really like to fail the commit if the 
> bug number 
> > isn't included in the log message.
> > 
> > 
> > #
> > # loginfo
> > #
> > 
> > DEFAULT     $CVSROOT/CVSROOT/obt-parse.pl
> > 
> > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > #
> > # Perl script.
> > #
> > 
> > #!/usr/bin/perl -w
> > #
> > print "test\n";
> > exit 123;
> > 
> > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > 
> > Thanks for any assistance!
> > 
> > Carter.
> 
> If you want to fail a commit, you probably want to determine 
> that when the verifymsg script is run or when the commitinfo 
> script is run. A non-zero return from either of those scripts 
> will abort the commit such that none of the loginfo scripts 
> will be run.
> 
>       Good luck,
>       -- Mark
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (FreeBSD)
> 
> iD8DBQFAbRwJ3x41pRYZE/gRAumhAJ0QcflhcqFvEDCxOaL+MFhckkt37ACgkgTL
> a0lpjNV9Wg0YY+jTfg/jqrw=
> =kqyy
> -----END PGP SIGNATURE-----
> 




reply via email to

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