check if backup files predate SCCS history
authorTony Finch <dot@dotat.at>
Tue, 18 Nov 2014 21:23:26 +0000 (21:23 +0000)
committerTony Finch <dot@dotat.at>
Tue, 18 Nov 2014 21:23:26 +0000 (21:23 +0000)
sccscheck

index c07d625..127bb3c 100755 (executable)
--- a/sccscheck
+++ b/sccscheck
@@ -65,7 +65,13 @@ sub found {
                                                break;
                                        }
                                }
-                               print "BACKSCCS NOMATCH $mtime $_\n";
+                               my $time1 = qx{sccs prs -r1.1 -d':D:.:T:' $qsccs};
+                               $time1 =~ s{^([789])}{19$1} or $time1 =~ s{^}{20};
+                               if ($mtime lt $time1) {
+                                       print "BACKSCCS PREDATE $mtime $time1 $_\n";
+                               } else {
+                                       print "BACKSCCS NOMATCH $mtime $time1 $_\n";
+                               }
                                continue;
                        }
                        when (_f "$1/$2") {