New upstream version.

committer: mfx <mfx> 1089687264 +0000
This commit is contained in:
Markus F.X.J. Oberhumer 2004-07-13 02:54:24 +00:00
parent befaa3c501
commit 4dbda29f82

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#! /usr/bin/perl -w
##############################################################
@ -7,8 +7,8 @@
### ###
##############################################################
## $Revision: 2.55 $
## $Date: 2004/05/15 20:09:14 $
## $Revision: 2.57 $
## $Date: 2004/07/10 19:38:37 $
## $Author: fluffy $
##
@ -141,7 +141,7 @@ use Time::Local qw( timegm );
# Globals --------------------------------------------------------------------
# In case we have to print it out:
my $VERSION = '$Revision: 2.55 $';
my $VERSION = '$Revision: 2.57 $';
$VERSION =~ s/\S+\s+(\S+)\s+\S+/$1/;
## Vars set by options:
@ -1754,6 +1754,8 @@ sub files { wantarray ? @{$_[0]->{files}} : $_[0]->{files} }
package CVS::Utils::ChangeLog::FileEntry;
use File::Basename qw( fileparse );
# Each revision of a file has a little data structure (a `qunk')
# associated with it. That data structure holds not only the
# file's name, but any additional information about the file
@ -1939,6 +1941,7 @@ sub read_changelog {
XX_Log_Source:
while (<LOG_SOURCE>) {
chomp;
s!\r$!!;
# If on a new file and don't see filename, skip until we find it, and
# when we find it, grab it.
@ -2208,10 +2211,11 @@ sub read_date_author_and_state {
if defined $Domain && $Domain ne '';
my $pw = getpwnam($author);
my ($fullname, $office, $workphone, $homephone);
my ($fullname, $office, $workphone, $homephone, $gcos);
if ( defined $pw ) {
$gcos = (getpwnam($author))[6];
($fullname, $office, $workphone, $homephone) =
split /\s*,\s*/, $pw->gecos;
split /\s*,\s*/, $gcos;
} else {
warn "Couldn't find gecos info for author '$author'\n"
unless $gecos_warned{$author}++;
@ -2282,18 +2286,22 @@ sub parse_date_author_and_state {
# Parses the date/time and author out of a line like:
#
# date: 1999/02/19 23:29:05; author: apharris; state: Exp;
#
# or, in CVS 1.12.9:
#
# date: 2004-06-05 16:10:32 +0000; author: somebody; state: Exp;
my ($year, $mon, $mday, $hours, $min, $secs, $utcOffset, $author, $state, $rest) =
$line =~
m!(\d+)[-/](\d+)[-/](\d+) \s+ (\d+):(\d+):(\d+)(\s+[+-]\d{4})?;\s+
m!(\d+)[-/](\d+)[-/](\d+)\s+(\d+):(\d+):(\d+)(\s+[+-]\d{4})?;\s+
author:\s+([^;]+);\s+state:\s+([^;]+);(.*)!x
or die "Couldn't parse date ``$line''";
die "Bad date or Y2K issues"
unless $year > 1969 and $year < 2258;
# Kinda arbitrary, but useful as a sanity check
my $time = timegm($secs, $min, $hours, $mday, $mon-1, $year-1900);
if (defined $utcOffset) {
my ($plusminus, $hour, $minute) = $utcOffset =~ m/([+-])(\d\d)(\d\d)/;
if ( defined $utcOffset ) {
my ($plusminus, $hour, $minute) = ($utcOffset =~ m/([+-])(\d\d)(\d\d)/);
my $offset = (($hour * 60) + $minute) * 60 * ($plusminus eq '+' ? -1 : 1);
$time += $offset;
}