[m-dev.] diff: more copyright checking changes.

Tyson Dowd trd at cs.mu.OZ.AU
Thu Aug 17 13:43:58 AEST 2000


Hi,

Another fix for this check.

===================================================================


Estimated hours taken: 0.5

CVSROOT/check.pl:
	Never check for copyright messages in .nocopyright.
	Often $CVSROOT will not be set (when using client/server in
	particular).  Set it to a likely value if it is unavailable.


Index: check.pl
===================================================================
RCS file: /home/mercury1/repository/CVSROOT/check.pl,v
retrieving revision 1.13
diff -u -r1.13 check.pl
--- check.pl	2000/08/17 03:21:40	1.13
+++ check.pl	2000/08/17 03:41:19
@@ -24,12 +24,18 @@
 #-----------------------------------------------------------------------------#
 
 sub query_force;
+sub check_copyright;
 
 #-----------------------------------------------------------------------------#
 
 $retval = 0;
 $force = 0;
 
+$cvsroot = $ENV{CVSROOT};
+if ($cvsroot eq "") {
+	$cvsroot = "/home/mercury1/repository";
+}
+
 if ($ARGV[0] eq "--force") {
 	$force = 1;
 	shift @ARGV;
@@ -135,7 +141,11 @@
 sub check_copyright {
 	my $directory = shift(@_);
 	my $file = shift(@_);
-	if ($directory =~ m^$ENV{CVSROOT}/mercury^) {
+		# No copyright check required for .nocopyright!
+	if ($file eq ".nocopyright") {
+		return 0;
+	}
+	if ($directory =~ m^$cvsroot/mercury^) {
 		if (open NOCOPYRIGHT, ".nocopyright") {
 			while (<NOCOPYRIGHT>) {
 				if ($_ =~ /^$file/) {


-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list