cvs: /CVSROOT commitinfo.pl loginfo.pl

From: Date: Mon, 01 May 2000 21:30:08 +0000
Subject: cvs: /CVSROOT commitinfo.pl loginfo.pl
Groups: php.dev 
Request: Send a blank email to php-dev+get-18331@lists.php.net to get a copy of this message
sas Mon May 1 14:30:08 2000 EDT Modified files: /CVSROOT commitinfo.pl loginfo.pl Log: - store temporary files in a secure directory - update copyright information - print out debug messages - ignore SIGPIPE Index: CVSROOT/commitinfo.pl diff -u CVSROOT/commitinfo.pl:1.1 CVSROOT/commitinfo.pl:1.2 --- CVSROOT/commitinfo.pl:1.1 Fri Jul 2 16:43:33 1999 +++ CVSROOT/commitinfo.pl Mon May 1 14:30:08 2000 @@ -2,9 +2,9 @@ # insert a call to this file in your commitinfo: # <module-name> /path/to/commitinfo.pl # -# Copyright (c) 1999 Sascha Schumann <sas@schell.de> +# Copyright (c) 1999, 2000 Sascha Schumann <sascha@schumann.cx> -$last_file = "/tmp/#cvs.files.lastdir"; +$last_file = "/var/cvs/lastdir"; $id = getpgrp(); Index: CVSROOT/loginfo.pl diff -u CVSROOT/loginfo.pl:1.17 CVSROOT/loginfo.pl:1.18 --- CVSROOT/loginfo.pl:1.17 Thu Dec 2 06:44:26 1999 +++ CVSROOT/loginfo.pl Mon May 1 14:30:08 2000 @@ -2,13 +2,14 @@ # include this script in your loginfo as: # <modulename> /path/to/loginfo.pl sender@domain recipient@domain %{sVv} # -# Copyright (c) 1999 Sascha Schumann <sas@schell.de> +# Copyright (c) 1999, 2000 Sascha Schumann <sascha@schumann.cx> -use POSIX; use Socket; -$last_file = "/tmp/#cvs.files.lastdir"; -$summary = "/tmp/#cvs.files.summary"; +$SIG{PIPE} = 'IGNORE'; + +$last_file = "/var/cvs/lastdir"; +$summary = "/var/cvs/summary"; $smtpserver = "127.0.0.1"; $smtpport = 25; $cvs = "/usr/bin/cvs"; @@ -50,6 +51,8 @@ exit 0 if($last_directory ne $directory); + + while(<STDIN>) { chop; if($state eq 5) { @@ -60,13 +63,12 @@ if(/^Log Message/) { $state = 5; } } -for($i = 0; $i < 256; $i++) { - POSIX::close($i); -} - exit 0 if(fork() ne 0); +$| = 1; +print "Reading summary file\n"; + open(FC, "<$summary.$id"); while(<FC>) { @@ -79,24 +81,30 @@ push @removed_files, $file; } else { push @modified_files, $file; - $cmdline .= " $file"; + $diff_cmdline .= " $file"; } } close(FC); +print "Unlinking helper files\n"; + # clean up a little bit unlink("$summary.$id"); unlink("$last_file.$id"); +print "Running rdiff\n"; + # build a diff if necessary -if($cmdline ne "") { - open(LOG, "$cvs rdiff -t -u $cmdline |") || die; +if($diff_cmdline ne "") { + open(LOG, "$cvs rdiff -t -u $diff_cmdline |") || die; while(<LOG>) { $diffmsg .= $_; } close(LOG); } +print "Building commit email\n"; + # build our email sub build_list { @@ -213,6 +221,8 @@ $email =~ s/\n/\r\n/g; # send our email + +print "Mailing the commit email\n"; #print $email;

« previous php.dev (#18331) next »