Here is my entry in taginfo
DEFAULT $CVSROOT/CVSROOT/tag.pl -m [EMAIL PROTECTED] $USER
Here is sample of the output.
Repository: /cvs_repositories/m2k_cvsroot/m2k/PCP_DEV/Players/AirCAT/src
Tag: RadCAT_Version_0_2
Operation: add
Date: Fri Nov 5 15:55:01 1999
Tagged-By: larkinbr
File: AirCAT.cdf Revision: 1.1.1.1
File: AirCAT.h Revision: 1.1.1.1
File: AirCAT_Platform.cdf Revision: 1.1.1.1
File: AirCAT_Platform.h Revision: 1.1.1.1
File: AirCAT_Platform_func.cpp Revision: 1.1.1.1
File: AirCAT_func.cpp Revision: 1.1.1.1
File: files.make Revision: 1.1.1.1
File: makefile Revision: 1.1.1.1
Below is the script I call from taginfo
Enjoy,
MikeS
-----------------------------------------------------------------
#!/usr/local/bin/perl
# This is a perl script
#
# $Id: tag.pl,v 1.1 1999/07/01 15:25:21 amber_cm Exp $
#
# This script formulates up an email message when tags are applied.
#
#----------------------------------------------------------------------
# initialize variables
$MAILER = "/usr/lib/sendmail -t";
$logfile = "$ENV{CVSROOT}/CVSROOT/taginfo.log";
$mailto = '';
# parse command line arguments
#
while (@ARGV)
{
$arg = shift @ARGV;
if ($arg eq '-d')
{
$debug = 1;
print STDERR "Debug turned on...\n";
}
elsif ($arg eq '-m')
{
if ($mailto eq '')
{
$mailto = shift @ARGV;
}
else
{
$mailto .= ", " . shift @ARGV;
}
}
else
{
push(@files, $arg);
}
}
# get command line args
$cvsuser = shift @files;
$tagname = shift @files;
$operation = shift @files;
$repository = shift @files;
$date = scalar localtime();
# formulate the email message text
$text = "
Repository: $repository
Tag: $tagname
Operation: $operation
Date: $date
Tagged-By: $cvsuser
";
# build a hash keyed on file name with revision as the value.
%files = ();
while (@files)
{
$file = shift @files;
$rev = shift @files;
$files{$file} = $rev;
}
# sort files an put them in body of message
foreach $file (sort keys %files)
{
$text .= sprintf(" File: %-50.50s Revision: %s\n", $file, $files{$file});
}
mail_notification($mailto, $repository, $text);
# open the log file
open(LF, ">>$logfile") || die "can't open ($logfile)";
print LF "$text";
close(LF);
exit 0;
# reused from log_accum.pl from CVS 1.10.2
sub mail_notification
{
my($mailto, $modulename, $text) = @_;
# if only we had strftime()... stuff stolen from perl's ctime.pl:
local($[) = 0;
@DoW = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
@MoY = ('Jan','Feb','Mar','Apr','May','Jun',
'Jul','Aug','Sep','Oct','Nov','Dec');
# Determine what time zone is in effect.
# Use GMT if TZ is defined as null, local time if TZ undefined.
# There's no portable way to find the system default timezone.
#
$TZ = defined($ENV{'TZ'}) ? ( $ENV{'TZ'} ? $ENV{'TZ'} : 'GMT' ) : '';
# Hack to deal with 'PST8PDT' format of TZ
# Note that this can't deal with all the esoteric forms, but it
# does recognize the most common: [:]STDoff[DST[off][,rule]]
#
if ($TZ =~ /^([^:\d+\-,]{3,})([+-]?\d{1,2}(:\d{1,2}){0,2})([^\d+\-,]{3,})?/) {
$TZ = $isdst ? $4 : $1;
$tzoff = sprintf("%05d", -($2) * 100);
}
# perl-4.036 doesn't have the $zone or $gmtoff...
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst, $zone, $gmtoff) =
($TZ eq 'GMT') ? gmtime(time) : localtime(time);
$year += ($year < 70) ? 2000 : 1900;
if ($gmtoff != 0) {
$tzoff = sprintf("%05d", ($gmtoff / 60) * 100);
}
if ($zone ne '') {
$TZ = $zone;
}
# ok, let's try....
$rfc822date = sprintf("%s, %2d %s %4d %2d:%02d:%02d %s (%s)",
$DoW[$wday], $mday, $MoY[$mon], $year,
$hour, $min, $sec, $tzoff, $TZ);
open(MAIL, "| $MAILER");
print MAIL "Date: " . $rfc822date . "\n";
print MAIL "Subject: CVS tag event: " . $modulename . "\n";
print MAIL "To: " . $mailto . "\n";
print MAIL "Reply-To: nobody\@spyglass.dayton.saic.com\n";
print MAIL "\n";
print MAIL "$text";
close(MAIL);
}