info-cvs
[Top][All Lists]
Advanced

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

Re: forcing the users to write log while commiting


From: Mark D. Baushke
Subject: Re: forcing the users to write log while commiting
Date: Sun, 04 Jun 2006 02:21:38 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ankush grover <address@hidden> writes:

>  I am using cvs 1.11 on fc3 for quite some time. Most of my developers
> don't write anything in the log while commiting the files. Is there
> any way in cvs throug which if the log is empty then the cvs will not
> accept the  files ?

Yes. Look at the verifymsg trigger script.
http://ximbiot.com/cvs/manual/cvs-1.11.21/cvs_18.html#SEC170

Also of possible interest:
CVS Annotate or FORCING user to comment their checkins
http://lists.gnu.org/archive/html/info-cvs/2005-05/msg00136.html

An example verify_checkin.sh script is provided here:
http://lists.gnu.org/archive/html/info-cvs/2000-11/msg00330.html
to look for a bug number and some commit comments.

If you write a script that looks at the command-line argument filename
with a log message in it and determines if it passed your criteria, then
have it 'exit 0' in that case and exit with non-zero return code if it
fails.

A very simple script might be the following Bourne Shell script that
asks the 'wc' command to cound the number of words in the log message
if the number is zero, it will fail the commit after printing a
"You need to enter a log message." text for the user:

                        ------- cut here -------
#! /bin/sh
[ `wc -w < $1` -eq 0 ] && { echo You need to enter a log message.; exit 1; }
exit 0
                        ------- cut here -------

        Enjoy!
        -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (FreeBSD)

iD8DBQFEgqYiCg7APGsDnFERAhgKAJ9ghsFQSpoY5a8fkdzluVdH5Mre3QCgzxky
73BYhWhr00x83T2j5TldVhs=
=3c1Q
-----END PGP SIGNATURE-----




reply via email to

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