You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2005/11/21 22:27:11 UTC

svn commit: r347989 - in /spamassassin/trunk/masses: mass-check rule-qa/corpus-hourly

Author: jm
Date: Mon Nov 21 13:27:04 2005
New Revision: 347989

URL: http://svn.apache.org/viewcvs?rev=347989&view=rev
Log:
add an easier-to-parse ISO-date header in mass-check output; currently unused, but maybe later

Modified:
    spamassassin/trunk/masses/mass-check
    spamassassin/trunk/masses/rule-qa/corpus-hourly

Modified: spamassassin/trunk/masses/mass-check
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/masses/mass-check?rev=347989&r1=347988&r2=347989&view=diff
==============================================================================
--- spamassassin/trunk/masses/mass-check (original)
+++ spamassassin/trunk/masses/mass-check Mon Nov 21 13:27:04 2005
@@ -233,10 +233,12 @@
 chomp $host;
 my $revision = get_current_svn_revision();
 my $cmdline = join(' ',@ORIG_ARGV); $cmdline =~ s/\s+/ /gs;
+my $isowhen = strftime("%Y%m%dT%H%M%SZ", gmtime(time)); # better
 
 my $log_header = "# mass-check results from $who\@$where, on $when\n" .
 		 "# M:SA version ".$spamtest->Version()."\n" .
 		 "# SVN revision: $revision\n" .
+                 "# Date: $isowhen\n" .
 		 "# Perl version: $] on $Config{archname}\n" .
                  "# Switches: '$cmdline'\n";
 

Modified: spamassassin/trunk/masses/rule-qa/corpus-hourly
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/masses/rule-qa/corpus-hourly?rev=347989&r1=347988&r2=347989&view=diff
==============================================================================
--- spamassassin/trunk/masses/rule-qa/corpus-hourly (original)
+++ spamassassin/trunk/masses/rule-qa/corpus-hourly Mon Nov 21 13:27:04 2005
@@ -127,8 +127,6 @@
 }
 
 sub locate {
-  # chdir "$opt{tree}/masses" or die "cannot chdir $opt{tree}/masses";
-
   opendir(CORPUS, $corpusdir);
   @files = sort readdir(CORPUS);
   closedir(CORPUS);
@@ -138,7 +136,6 @@
   } @files;
 
   foreach my $file (@files) {
-    # my $time = 0;
     my $tag = 0;
     open(FILE, "$corpusdir/$file") or warn "cannot read $corpusdir/$file";
     while (my $line = <FILE>) {
@@ -150,10 +147,11 @@
                     GMT => 1, PREFER_PAST => 1);
         $time{$file} = $timet;
         print "$corpusdir/$file: time=$timet\n";
-
-        # if ($hh != 8) { $time++; }
       }
-      if ($line =~ m/^# SVN revision:\s*(\S+)/) {
+      elsif ($line =~ m/^# Date:\s*(\S+)/) {
+        # a better way to do the above.  TODO: parse it instead
+      }
+      elsif ($line =~ m/^# SVN revision:\s*(\S+)/) {
         my $rev = $1;
         $revision{$file} = $rev;
 
@@ -170,9 +168,6 @@
       }
     }
     close(FILE);
-    # if (!$time) {
-    # $skip .= "# skipped $_: time is between 0800 UTC and 0900 UTC\n";
-    # }
   }
 }