]> thyrsus.com Git - sccs2rcs.git/commitdiff
Roger Pilkey's fix.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 10 Apr 2003 02:18:52 +0000 (02:18 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 10 Apr 2003 02:18:52 +0000 (02:18 +0000)
sccs2rcs

index bcdef5384a0003e29181159f45ef1d3cfaeee763..d1c4fa12b087bf691fad6cc56efe85e7a6b6a747 100755 (executable)
--- a/sccs2rcs
+++ b/sccs2rcs
 # kenstir@viewlogic.com
 # ...!harvard!cg-atla!viewlog!kenstir
 #
-# I added some portability fixes and the -u option.  More importantly,
+# 1.1: I added some portability fixes and the -u option.  More importantly,
 # I removed the dependencies on the BSD/SV `sccs' utility; this script
 # will now work on any system that has the base SCCS/RCS tools available.
 #
-# Eric S. Raymond
-# esr@thyrsus.com
+# 1.2: Merges in Roger Pilkey's fix for the case in which date spans 
+# cross the millenium boundary.  Use GNU tac instead of tail, which can't 
+# reverse large files properly.
+#
+# Eric S. Raymond <esr@thyrsus.com>
 #
 # $Id$
 
@@ -202,14 +205,19 @@ foreach sfile (SCCS/s.*)
 
     # work on each rev of that file in ascending order
     set firsttime = 1
-    foreach rev (`prs SCCS/s.$file | grep "^D " | awk '{print $2}' | tail -r`)
+    foreach rev (`prs SCCS/s.$file | grep "^D " | awk '{print $2}' | tac`)
         if ($status != 0) goto ERROR
 
         # get file into current dir and get stats
         set date   = (`prs -d":Dd: :Dm: :Dy: :T: :P:" -r$rev SCCS/s.$file`)
        set day    = $date[1]
        set month  = $date[2]
-       set year   = ${century}${date[3]}
+       if ($date[3] < 10) then
+               set next_century = (`expr $century + 1`)        
+               set year   = ${next_century}${date[3]}
+       else
+               set year   = ${century}${date[3]}
+       endif
        set time   = $date[4]
        set author = $date[5]
        set date = "$day $months[$month] $year $time"