Brief summary: scmbug 0.23.4 doesn't support multiple products/projects in one CVS repository, since versions of CVS prior to 1.12 didn't supply enough information (and also I think because of wierdnesses of CVS versioning because of CVSNT). However, CVS 1.12 does supply enough information; so I'm trying to fix scmbug so that it will support multiple products in one CVS repository, since that's how we do things here. What follows is my work log for today, in case it is either intersting or useful to anyone else (and in the hope someone else may be able to point out faults in my analysis): When you call CVS to perform an activity, scmbug_activity.pl gets called multiple times. I've now modified it so it prints its arguments on STDERR, so that I can see what's going on.
Contents [hide <javascript:toggleToc()> ] * 1 tagging <http://wiki.cygnets.co.uk/index.php?title=Sb_week_beginning_20080505#tagging> * 2 commit <http://wiki.cygnets.co.uk/index.php?title=Sb_week_beginning_20080505#commit> * 3 analysis of arguments <http://wiki.cygnets.co.uk/index.php?title=Sb_week_beginning_20080505#analysis_of_arguments> * 4 auto-detecting the product name <http://wiki.cygnets.co.uk/index.php?title=Sb_week_beginning_20080505#auto-detecting_the_product_name> [edit <http://wiki.cygnets.co.uk/index.php?title=Sb_week_beginning_20080505&action=edit§ion=1> ] tagging When I currently perform a tag, I get the following output: [EMAIL PROTECTED]:~/workspace/CVSROOT$ cvs tag scmbug_BUILD_2008050703_testing [EMAIL PROTECTED]'s password: ? .includepath scmbug_activity.pl called: arg 0: /var/lib/cvs/CVSROOT/etc/scmbug/glue.conf arg 1: activity_tag arg 2: scmbug_BUILD_2008050703_testing arg 3: add arg 4: CVSROOT arg 5: .project arg 6: 1.2 arg 7: checkoutlist arg 8: 1.2 arg 9: commitinfo arg 10: 1.3 arg 11: config arg 12: 1.1 arg 13: cvswrappers arg 14: 1.1 arg 15: loginfo arg 16: 1.2 arg 17: modules arg 18: 1.1 arg 19: notify arg 20: 1.1 arg 21: postadmin arg 22: 1.1 arg 23: postproxy arg 24: 1.1 arg 25: posttag arg 26: 1.1 arg 27: postwatch arg 28: 1.1 arg 29: preproxy arg 30: 1.1 arg 31: rcsinfo arg 32: 1.2 arg 33: taginfo arg 34: 1.2 arg 35: verifymsg arg 36: 1.11 Scmbug notice: --------------------------------------------------------- Scmbug notice: Reading configuration Scmbug notice: Checking configuration Scmbug notice: Preparing for tagging Scmbug notice: Processing activity Scmbug notice: Submitting request Scmbug notice: Request submission was accepted scmbug_activity.pl called: arg 0: /var/lib/cvs/CVSROOT/etc/scmbug/glue.conf arg 1: activity_tag arg 2: scmbug_BUILD_2008050703_testing arg 3: add arg 4: CVSROOT/bin arg 5: scmbug_activity.pl arg 6: 1.3 Scmbug notice: --------------------------------------------------------- Scmbug notice: Reading configuration Scmbug notice: Checking configuration Scmbug notice: Preparing for tagging Scmbug notice: Processing activity Scmbug notice: Submitting request Scmbug notice: Request submission was accepted scmbug_activity.pl called: arg 0: /var/lib/cvs/CVSROOT/etc/scmbug/glue.conf arg 1: activity_tag arg 2: scmbug_BUILD_2008050703_testing arg 3: add arg 4: CVSROOT/etc/scmbug arg 5: glue.conf arg 6: 1.4 arg 7: log_template arg 8: 1.1 Scmbug notice: --------------------------------------------------------- Scmbug notice: Reading configuration Scmbug notice: Checking configuration Scmbug notice: Preparing for tagging Scmbug notice: Processing activity Scmbug notice: Submitting request Scmbug notice: Request submission was accepted scmbug_activity.pl called: arg 0: /var/lib/cvs/CVSROOT/etc/scmbug/glue.conf arg 1: activity_tag arg 2: scmbug_BUILD_2008050703_testing arg 3: add arg 4: CVSROOT/lib/scmbug/Scmbug arg 5: Activity.pm arg 6: 1.11 arg 7: Common.pm arg 8: 1.1 arg 9: Connection.pm arg 10: 1.1 arg 11: Error.pm arg 12: 1.1 Scmbug notice: --------------------------------------------------------- Scmbug notice: Reading configuration Scmbug notice: Checking configuration Scmbug notice: Preparing for tagging Scmbug notice: Processing activity Scmbug notice: Submitting request Scmbug notice: Request submission was accepted scmbug_activity.pl called: arg 0: /var/lib/cvs/CVSROOT/etc/scmbug/glue.conf arg 1: activity_tag arg 2: scmbug_BUILD_2008050703_testing arg 3: add arg 4: CVSROOT/lib/scmbug/Scmbug/Glue arg 5: CVS.pm arg 6: 1.1 arg 7: CVSConsolidatedActivities.pm arg 8: 1.1 arg 9: Git.pm arg 10: 1.1 arg 11: Glue.pm arg 12: 1.3 arg 13: SCM.pm arg 14: 1.1 arg 15: Subversion.pm arg 16: 1.1 Scmbug notice: --------------------------------------------------------- Scmbug notice: Reading configuration Scmbug notice: Checking configuration Scmbug notice: Preparing for tagging Scmbug notice: Processing activity Scmbug notice: Submitting request Scmbug notice: Request submission was accepted scmbug_activity.pl called: arg 0: /var/lib/cvs/CVSROOT/etc/scmbug/glue.conf arg 1: activity_tag arg 2: scmbug_BUILD_2008050703_testing arg 3: add arg 4: CVSROOT/tmp arg 5: simulated-log-message arg 6: 1.1 Scmbug notice: --------------------------------------------------------- Scmbug notice: Reading configuration Scmbug notice: Checking configuration Scmbug notice: Preparing for tagging Scmbug notice: Processing activity Scmbug notice: Submitting request Scmbug notice: Request submission was accepted cvs tag: Tagging . T .project T checkoutlist T commitinfo T config T cvswrappers T loginfo T modules T notify T postadmin T postproxy T posttag T postwatch T preproxy T rcsinfo T taginfo T verifymsg cvs tag: Tagging bin T bin/scmbug_activity.pl cvs tag: Tagging etc cvs tag: Tagging etc/scmbug T etc/scmbug/glue.conf T etc/scmbug/log_template cvs tag: Tagging lib cvs tag: Tagging lib/scmbug cvs tag: Tagging lib/scmbug/Scmbug T lib/scmbug/Scmbug/Activity.pm T lib/scmbug/Scmbug/Common.pm T lib/scmbug/Scmbug/Connection.pm T lib/scmbug/Scmbug/Error.pm cvs tag: Tagging lib/scmbug/Scmbug/Glue T lib/scmbug/Scmbug/Glue/CVS.pm T lib/scmbug/Scmbug/Glue/CVSConsolidatedActivities.pm T lib/scmbug/Scmbug/Glue/Git.pm T lib/scmbug/Scmbug/Glue/Glue.pm T lib/scmbug/Scmbug/Glue/SCM.pm T lib/scmbug/Scmbug/Glue/Subversion.pm cvs tag: Tagging tmp T tmp/simulated-log-message (note, of course, that the project I'm working on is scmbug itself; don't be confused by this). [edit <http://wiki.cygnets.co.uk/index.php?title=Sb_week_beginning_20080505&action=edit§ion=2> ] commit Here's what I get when I do a commit (only one file changed): [EMAIL PROTECTED]:~/workspace/CVSROOT$ cvs commit cvs commit: Examining . cvs commit: Examining bin cvs commit: Examining etc cvs commit: Examining etc/scmbug cvs commit: Examining lib cvs commit: Examining lib/scmbug cvs commit: Examining lib/scmbug/Scmbug cvs commit: Examining lib/scmbug/Scmbug/Glue cvs commit: Examining tmp [EMAIL PROTECTED]'s password: ? .includepath scmbug_activity.pl called: arg 0: /var/lib/cvs/CVSROOT/etc/scmbug/glue.conf arg 1: activity_commit arg 2: consolidate_cvs_messages arg 3: /var/lib/cvs/CVSROOT/bin arg 4: scmbug_activity.pl Scmbug notice: --------------------------------------------------------- Scmbug notice: Reading configuration Scmbug notice: Checking configuration Scmbug notice: Preparing for a commit scmbug_activity.pl called: arg 0: /var/lib/cvs/CVSROOT/etc/scmbug/glue.conf arg 1: activity_verify arg 2: /tmp/cvsA67iBt arg 3: CVSROOT/bin Scmbug notice: --------------------------------------------------------- Scmbug notice: Reading configuration Scmbug notice: Checking configuration Scmbug notice: Preparing for verification Scmbug notice: Processing activity Scmbug notice: Submitting request Scmbug notice: Request submission was accepted /var/lib/cvs/CVSROOT/bin/scmbug_activity.pl,v <-- bin/scmbug_activity.pl new revision: 1.5; previous revision: 1.4 cvs commit: Rebuilding administrative file database scmbug_activity.pl called: arg 0: /var/lib/cvs/CVSROOT/etc/scmbug/glue.conf arg 1: activity_commit arg 2: CVSROOT/bin arg 3: 1.4 arg 4: 1.5 arg 5: scmbug_activity.pl Scmbug notice: --------------------------------------------------------- Scmbug notice: Reading configuration Scmbug notice: Checking configuration Scmbug notice: Preparing for a commit [edit <http://wiki.cygnets.co.uk/index.php?title=Sb_week_beginning_20080505&action=edit§ion=3> ] analysis of arguments I'm not clear whether scmbug_activity.pl is calling itself, but I don't think it is. I think (if I understand what's going on at all) CVS is calling it, once for each file being tagged. Note that in tag: * arg0 is consistently the full path to the glue configuration file * arg1 is consistently activity_tag * arg2 is consistently the tag name * arg3 is consistently add - presumably what we're doing with the tag * arg4 appears to be the relative path which starts with the product name (or at least it would in a normal product) * arg5 appears to be the filename After that there's a varying number of arguments I don't fully understand. in commit: * arg0 is consistently the full path to the glue configuration file * arg1 is either activity_verify or activity_commit * On activity_verify: * arg2 is a temporary file which unfortunately gets cleaned up so I can't examine it; I think it's the log message * arg3 is the relative path * the actual filename of the file which is being committed is not present in the arguments - presumably it's in the file in arg2 * activity_commit appears twice. On the first pass * arg2 is consolidate_cvs_messages * arg3 is the absolute, not relative, path * arg4 is the name of the file being committed * on the second pass with activity_commit * arg2 is the relative path * arg3..argN-1 appear to be version numbers? * argN is name of the file being committed. [edit <http://wiki.cygnets.co.uk/index.php?title=Sb_week_beginning_20080505&action=edit§ion=4> ] auto-detecting the product name Is what this is all about. I have experimentally removed the section in Glue.pm which prevented it from trying to detect the product name if product is CVS. If I set product_name_definition as follows: product_name_definition => { type => 'auto', value => '^([0-9A-Za-z_-]*).*$', '\/var\/lib/cvs\/([0-9A-Za-z_-]*).*$' }, commit actions fail at the activity_verify pass with the error message Scmbug notice: Request submission was denied ******************************************* ** ** ** Scmbug error 7: No product name supplied. ** ** ******************************************* cvs [commit aborted]: Message verification failed I'm guessing this may be because I've got my regular expression syntax wrong, since there is certainly enough information available to scmbug to infer the product name. Simon Brooke, Software Specialist Cygnet Solutions Ltd Registered office: Swan House, Darvel, Ayrshire, Scotland, KA17 0LP Registered in Scotland No. SC158059 mail: [EMAIL PROTECTED] www: http://www.cygnets.co.uk tel: +44(0)1560 323444 fax: +44(0)1560 323432
<<inline: rondel.gif>>
_______________________________________________ scmbug-users mailing list [email protected] http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users
