[Top][All Lists]

[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

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
> #
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> #
> # 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
Version: GnuPG v1.2.3 (FreeBSD)


reply via email to

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