I ran across my first y2k bug: sccs2rcs reads the 2-digit year of sccs and
adds 19 in front, with the obvious problem for anything committed this
year. I knew I should have switched over last year!
Here's a patch; I'm patching from cvs-1.10, the most recent version listed
on labrea.stanford.edu
The contrib/ChangeLog should read:
2000-04-11 Benoit Hudson <[EMAIL PROTECTED]>
* sccs2rcs.csh: Fixed for y2k: sccs dates of 00-70 are interpreted
as relative to 2000; 70-99 are relative to 1900.
$ diff -e cvs-1.10/contrib/sccs2rcs.csh sccs2rcs.csh
180c
set date = `sccs prs -r$rev $file | grep "^D " | awk '{print $3}'`
set time = `sccs prs -r$rev $file | grep "^D " | awk '{print $4}'`
set year = `echo $date | cut -d'/' -f1`
set mon = `echo $date | cut -d'/' -f2`
set day = `echo $date | cut -d'/' -f3`
# y2k hack: We're on Unix, so the earliest possible date is 1970.
# of course, this just turns it into a y2070 bug.
if ($year < 70) then
set year = `expr $year + 2000`
else
set year = `expr $year + 1900`
endif
set mon = `expr $mon + 0` # kill leading zero
set day = `expr $day + 0` # kill leading zero
set date = `printf "%d/%02d/%02d %s" "$year" "$mon" "$day" "$time"`
.