[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
commitinfo not working
From: |
Stephen Rasku |
Subject: |
commitinfo not working |
Date: |
Fri, 8 Dec 2000 09:31:30 -0800 (PST) |
We have just moved our repository and my commitinfo script has stopped
working. I am not sure why.
I am getting a directory name followed by a list of files as
parameters to my script. It then tries to search for CVS keywords in
the directory which fails, aborting the checkin. I am not sure how
this worked in the first place. Is there a way I can get perl to
ignore the directory name?
I attach the script for your perusal.
--
Stephen Rasku E-mail: address@hidden
Senior Software Engineer Web: http://www.tgivan.com/
TGI Technologies http://www.pop-star.net/
#!/usr/local/bin/perl -w
#************************************************************************
# Entity Id : $Id: verifykw,v 1.1.1.1 2000/06/29 18:38:06 stephen
Exp $
# Package : stephen
# Synopsis :
# Purpose :
#
# Date of Creation : Jul 20, 1999
# Version Number : $Revision: 1.1.1.1 $
# Last Updated : $Date: 2000/06/29 18:38:06 $
#
# Author : Stephen Rasku
# Notes :
#
# Copyright 1999 by TGI Technologies Ltd. All rights reserved.
#************************************************************************
use Getopt::Long;
use Env;
($pgmname = $0) =~ s{.*/}{};
$usage = "usage: $pgmname [-u]\n";
undef $opt_u; # unnecessary, but it shuts up -w
GetOptions( "u" ) || die $usage;
die "$usage" if defined $opt_u;
$hasID = 0;
$hasRev = 0;
$hasDate = 0;
close ARGV;
while (<>)
{
die "File $ARGV has SCCS keywords" if ( $_ =~ /\%M\%/ ||
$_ =~ /\%G\%/ ||
$_ =~ /\%I\%/ ||
$_ =~ /\%Z\%/ ||
$_ =~ /\%R\%/ );
$hasID = m/\$Id.*\$/ || m/\$Header.*\$/ if ( !$hasID );
$hasRev = m/\$Revision.*\$/ if ( !$hasRev );
$hasDate = m/\$Date.*\$/ if ( !$hasDate );
if ( $hasID || $hasRev && $hasDate || $ARGV =~ m/cvsignore/ )
{
print "File $ARGV was OK\n";
close ARGV;
$hasID = 0;
$hasRev = 0;
$hasDate = 0;
}
else
{
die "File $ARGV requires RCS keywords" if eof ;
}
}
- commitinfo not working,
Stephen Rasku <=