[m-rev.] Minor fix to check.pl

Ralph Becket rafe at cs.mu.OZ.AU
Thu Nov 21 17:49:15 AEDT 2002


Estimated hours taken: 0.2
Branches: main

CVSROOT/check.pl:
	Made the `The ' in `The University of Melbourne' optional
	in copyright lines.
	Improved the error message.

Index: check.pl
===================================================================
RCS file: /home/mercury1/repository/CVSROOT/check.pl,v
retrieving revision 1.17
diff -u -r1.17 check.pl
--- check.pl	20 Nov 2002 05:13:58 -0000	1.17
+++ check.pl	21 Nov 2002 06:46:35 -0000
@@ -109,7 +109,7 @@
 	while (defined($line = <ARG>))
 	{
 		if    (	!$found &&
-			$line =~ /Copyright \(C\) .* The University of Melbourne/ )
+			$line =~ /Copyright \(C\) .* (The )?University of Melbourne/ )
 		{
 			$found = 1;
 
@@ -120,7 +120,7 @@
 			{
 				if ( $line !~ /$last_year/ )
 				{
-					$line =~ s/ The University of Melbourne/, $this_year The University of Melbourne/;
+					$line =~ s/ (The )?University of Melbourne/, $this_year The University of Melbourne/;
 				}
 				else
 				{
@@ -160,9 +160,9 @@
 	}
 
 	if (! $found) {
+		print "Cannot identify a copyright message in file `$arg'\n";
+		print "(Expected a line with `Copyright (C)' and `The University of Melbourne')";
 		if ($force) {
-			print "File `$arg' appears to have no "
-				. "copyright message\n";
 			print "Forcing commit anyway.\n";
 		} else {
 			if (query_user("File `$arg' appears to have no "
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list