Indeed, the solution was a hook in verifymsg, but I'm not sure if in cvsnt's implementation write access is allowed to the log file - a search in this mailing list suggests it's not, and there is no RereadLogAfterVerify parameter.
The script is reproduced bellow. #!/bin/bash # Bash-specific syntax is used # # This script will append the real name of the user doing the commit to the message # To enable, add the following line to REPO/CVSROOT/verifymsg : # DEFAULT /full/path/to/this/script # Make sure you have this enabled (default) in REPO/CVSROOT/config : # RereadLogAfterVerify=always # (This command, and editting the cvs commit log, are not supported on cvsnt) # # Comments: # stelian.ene[a]freescale.com # Get the real name of the user NAME=$(finger ${USER} | awk '{for (i=7;i<NF;i++) print $i " "; print $NF; exit;}') MSGFILE="$1" # Check the name lenth, allow for chinese people if [ ${#NAME} -gt 3 ] && [ ${#NAME} -lt 50 ]; then # if we have a valid file to write into if [ -f $MSGFILE ]; then # append the real name to the commit message echo -n [$NAME] >> $MSGFILE fi fi # allways return 0, never cancel commits because of this silly script exit 0 -----Original Message----- From: cvsnt-boun...@cvsnt.org [mailto:cvsnt-boun...@cvsnt.org] On Behalf Of pdfe...@aep.com Sent: Wednesday, June 10, 2009 3:13 PM To: Ene Stelian-Bogdan-B11248 Cc: cvsnt-boun...@cvsnt.org; cvsnt@cvsnt.org Subject: Re: [cvsnt] Change commit message cvsnt-boun...@cvsnt.org wrote on 06/10/2009 07:34:12 AM: > Hello, > > I need to perform a relatively simple task: > Whenever a user commits with a certain "message", the commit message > should be changed to: > "[Real name] message" > > The user's real name can be found in the passwd file or by executing the > finger command. > However, I don't know how to hook the commit action and actually modify > the message - I can only get a read-only access to the field. > > Any ideas ? You could write a script that runs on commit. It should be fairly simple to grab the commit message and prepend the user's id. Use your favorite scripting language and reference it in verifymsg like this: DEFAULT /path/to/cvsnt/scripts/scriptname or the Windows equivalent. Search google for verifymsg script for information and ideas. But if all you want is to see occasionally who committed what when, I would use the cvs history command. > Thank you > _______________________________________________ > cvsnt mailing list > cvsnt@cvsnt.org > http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt > > Upgrade to CVS Suite for more features and support: http://march- > hare.com/cvsnt/ Paul D. Feeny, MCP, MCSA IT System Administrator II - SCM IT Production Management American Electric Power Phone: 614.716.2249 Audinet: 200.2249 _______________________________________________ cvsnt mailing list cvsnt@cvsnt.org http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ _______________________________________________ cvsnt mailing list cvsnt@cvsnt.org http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/