info-cvs
[Top][All Lists]
Advanced

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

Re: Loginfo not failing commit.


From: Mark D. Baushke
Subject: Re: Loginfo not failing commit.
Date: Thu, 01 Apr 2004 23:53:45 -0800

-----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]