[cvsnt] clueless about commitinfo

Jason King jhking at airmail.net
Tue Feb 15 00:38:05 GMT 2005


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


I've read through months worth of messages about commitinfo on this list 
and none of the descriptions seem to match what's happening to me.
This batch file
@echo off
echo pt.bat called %0 %1 %2 %3
echo you suck
EXIT 1

produces this output
C:\work>cvs commit -m "won't work"  wsgl
cvs commit: Examining wsgl
cvs commit: Examining wsgl/issues      
cvs commit: Examining wsgl/zipup
pt.bat called c:\bin\pt.bat /sandbox/wsgl                          # 
first arg is directory of repository/module, as expected
you 
suck                                                                        
# batch file ran, no file names they come thru STDIN
cvs server: Pre-commit check failed                                # 
exit 1 causes failure, as expected
cvs [server aborted]: correct above errors first!

This Perl Script:
#!perl
use strict ;
print STDOUT "=========commitinfo called==========\n";
print STDOUT "args\n";
for ( my $x =0 ; $x < $#ARGV ; $x++ ) {
    print STDOUT "arg $x = $ARGV[$x]\n";
}
print STDOUT "stdin\n";
while ( <STDIN> ) {
    chomp( $_ ) ;
    print STDOUT "Filename: " . $_ . "\n" ;
    open( INPUT , $fname ) ;                              #nothing 
opens, wrong path
    my @txt = <INPUT>;
    for ( my $x=0 ; $x < $#txt ; $x++ ) {
        print STDOUT "__" . $txt[$x]  . "\n";
    }
    close(INPUT );
}
print STDOUT "=========end commitinfo called==========\n";
exit 1;

Produces this output:
C:\work>cvs commit -m "won't work"  wsgl
cvs commit: Examining wsgl
cvs commit: Examining wsgl/issues
cvs commit: Examining wsgl/zipup
=========commitinfo called==========        # script is running
args                                                                       
#where's my module?
stdin
Filename: wsgl.pks                                                #these 
are the edited files
Filename: wsglsampl.pks                                       #these are 
the edited files
=========end commitinfo called==========
cvs server: Pre-commit check failed                      # error code 
honored, that's a start
cvs [server aborted]: correct above errors first!

What's the missing piece of the puzzle to get this stack to work?  Win 
2k,  SP4, cvsnt 2.0.51c, perl   v5.6.1.



More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook