[cvsnt] verifymsg (syntax and tests
bo.berglund at telia.com
Mon Jan 2 13:20:18 GMT 2006
On Mon, 2 Jan 2006 11:19:30 +0100, feymard at stago.fr wrote:
>Anyone has a solution?
1. (the best solution)
Educate your users to *always* enter log messges describing what they
are checking in and why.
2. (if 1 does not work)
Use the CVSROOT/verifymsg script to check the log message and write a
feedback message to the user if it does not comply to the standard.
Then exit with a non-zero code that makes the commit fail.
As explained in the CVSNT documentation you can have the following in
the verifymsg file:
DEFAULT <path to log message checking program> %l
Your program (you will have to write it yourself) will then be started
by CVSNT when there is a commit and the full path to a file containing
the contents of the log message is supplied to your checking program
as a command line argument.
All you have to do now is let your program open the indicated file and
do some sanity checking on the text.
For example you may require a bug id value and a description field as
well. Then you can search for these and examine what the user has put
there to determine if it is good enough.
But if all you do is to check that there is "something" entered then
I'm afraid that you will be disappointed because you will probably
find a lot of dfdfdg or asdr or qwerty or similar meaningless words
(Bo Berglund, developer in Sweden)
More information about the cvsnt