[cvsnt] clueless about commitinfo

Czarnowski, Aric aczarnowski at unimax.com
Tue Feb 15 01:06:22 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'm not quite sure what you believe is wrong.  Your script is printing
the file names passed into it by the CVS server on STDIN correctly and
the server is failing the commit with an error because your script is
exiting with a non zero value.  It appears to me the server and your
Perl script are working exactly to specs...

You did not provide the commitinfo calling line you are using so I can
only assume you are not passing any arguments.

Below are my commitinfo.pl and commitinfo calling line in case that's
helpful somehow.

--Aric

Aric Czarnowski
Unimax Systems Corporation
612-204-3634


#!perl.exe
#
# Called with the following commitinfo line:
#  ALL perl $CVSROOT/CVSROOT/commitinfo.pl $USER
#
use warnings;
use strict;

# After testing it looks like CVS sends in the directory and file stuff
# automatically
#
my $commitUser = shift(@ARGV);
my $directory = shift(@ARGV);

# Unlike loginfo, commitinfo *does not* quote the files names making
them look
# like one big argument to Perl.  So, we can just take the remainder of
@ARGV
# as the file listing instead of working to split that back up.
#
my @files = ();

# Older versions of CVSNT pipe files on the cmd line
push(@files, @ARGV);

# Newer versions of CVSNT pipe files across STDIN.  This could be a
problem
# if CVSNT decides not to send anything on STDIN though, this code will
just
# sit there waiting forever...
#
push(@files, <STDIN>);

# Check if there are any file problems
foreach my $file (@files) {
	chomp($file);
	open (INPUT, $file) || die "Cannot read $file: $!\n";
		# Check file contents here
	close(INPUT);
}
exit(0);




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