aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel O'Callaghan <danny@FreeBSD.org>1999-01-15 12:05:57 +0000
committerDaniel O'Callaghan <danny@FreeBSD.org>1999-01-15 12:05:57 +0000
commit6af24c708d2a9c924adea6bbaa9e60a79ec32763 (patch)
tree5a2dd8091ace1329c75cbfa269d199b9015b3fc1
parent47bc1e18732ec133699f9fef02b4ac9b17c8aec8 (diff)
downloadsrc-6af24c708d2a9c924adea6bbaa9e60a79ec32763.tar.gz
src-6af24c708d2a9c924adea6bbaa9e60a79ec32763.zip
Tidy logic in sccs2rcs,
Fix y2kbug "19$year" in log.pl PR: 9501 Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>
Notes
Notes: svn path=/head/; revision=42695
-rw-r--r--contrib/cvs/contrib/log.pl5
-rw-r--r--contrib/cvs/contrib/sccs2rcs.csh2
2 files changed, 4 insertions, 3 deletions
diff --git a/contrib/cvs/contrib/log.pl b/contrib/cvs/contrib/log.pl
index e4fb9b1d3fbc..4bb935a5f337 100644
--- a/contrib/cvs/contrib/log.pl
+++ b/contrib/cvs/contrib/log.pl
@@ -91,6 +91,7 @@ $mailcmd = "| Mail -s 'CVS update: $modulepath'";
@days = (Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday);
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
+$year+=1900;
# get a login name for the guy doing the commit....
#
@@ -111,12 +112,12 @@ if ($users) {
#
print OUT "\n";
print OUT "****************************************\n";
-print OUT "Date:\t$days[$wday] $mos[$mon] $mday, 19$year @ $hour:" . sprintf("%02d", $min) . "\n";
+print OUT "Date:\t$days[$wday] $mos[$mon] $mday, $year @ $hour:" . sprintf("%02d", $min) . "\n";
print OUT "Author:\t$login\n\n";
if (MAIL) {
print MAIL "\n";
- print MAIL "Date:\t$days[$wday] $mos[$mon] $mday, 19$year @ $hour:" . sprintf("%02d", $min) . "\n";
+ print MAIL "Date:\t$days[$wday] $mos[$mon] $mday, $year @ $hour:" . sprintf("%02d", $min) . "\n";
print MAIL "Author:\t$login\n\n";
}
diff --git a/contrib/cvs/contrib/sccs2rcs.csh b/contrib/cvs/contrib/sccs2rcs.csh
index 310e2710f194..8243890603dd 100644
--- a/contrib/cvs/contrib/sccs2rcs.csh
+++ b/contrib/cvs/contrib/sccs2rcs.csh
@@ -177,7 +177,7 @@ foreach sfile (SCCS/s.*)
if ($status != 0) goto ERROR
# get file into current dir and get stats
- set date = `sccs prs -r$rev $file | grep "^D " | awk '{y=$3+1900; if($3 < 1970) {y+=100};printf("%s %s", y, $4);exit;}'`
+ set date = `sccs prs -r$rev $file | grep "^D " | awk '{y=$3; if($3 < 100) {y+=1900};printf("%s %s", y, $4);exit;}'`
set author = `sccs prs -r$rev $file | grep "^D " | awk '{print $5; exit}'`
echo ""
echo "==> file $file, rev=$rev, date=$date, author=$author"