}
sub rcs_getctime ($) {
- my $file=shift;
+ my $file=$config{srcdir}."/".shift();
my $cvs_log_infoline=qr/^date: (.+);\s+author/;
eval q{use XML::Simple};
local $/=undef;
- my $filer=substr($file, length($config{srcdir}));
- $filer =~ s:^[/]+::;
-
my $child = open(LOG, "-|");
if (! $child) {
exec("darcs", "changes", "--xml", "--reverse",
- "--repodir", $config{srcdir}, $filer)
- || error("'darcs changes $filer' failed to run");
+ "--repodir", $config{srcdir}, $file)
+ || error("'darcs changes $file' failed to run");
}
my $data;
my $datestr = $log->{patch}[0]->{local_date};
if (! defined $datestr) {
- warn "failed to get ctime for $filer";
+ warn "failed to get ctime for $file";
return 0;
}
my $file=shift;
my $id=shift; # 0 = mtime ; 1 = ctime
- # Remove srcdir prefix
- $file =~ s/^\Q$config{srcdir}\E\/?//;
-
if (! keys %time_cache) {
my $date;
foreach my $line (run_or_die('git', 'log',
my ($file) = @_;
my @cmdline = ("hg", "-R", $config{srcdir}, "log", "-v",
- "--style", "default", $file);
+ "--style", "default", "$config{srcdir}/$file");
open (my $out, "-|", @cmdline);
my @log = (mercurial_log($out));
my $child = open(SVNLOG, "-|");
if (! $child) {
- exec("svn", "log", $file) || error("svn log $file failed to run");
+ exec("svn", "log", "$config{srcdir}/$file") || error("svn log failed to run");
}
my ($cdate, $mdate);
$mdate=$1 unless defined $mdate;
}
}
- close SVNLOG || error "svn log $file exited $?";
+ close SVNLOG || error "svn log exited $?";
if (! defined $cdate) {
- error "failed to parse svn log for $file\n";
+ error "failed to parse svn log for $file";
}
eval q{use Date::Parse};
}
eval {
- my $ctime=rcs_getctime("$config{srcdir}/$file");
+ my $ctime=rcs_getctime($file);
if ($ctime > 0) {
$pagectime{$page}=$ctime;
}
}
my $mtime;
eval {
- $mtime=rcs_getmtime("$config{srcdir}/$file");
+ $mtime=rcs_getmtime($file);
};
if ($@) {
print STDERR $@;
* API: Add new optional field usershort to rcs_recentchanges.
* API: rcs_commit and rcs_commit_staged are now passed named
parameters.
+ * Fixed some confusion and bugginess about whether
+ rcs_getctime/rcs_getmtime were passed absolute or relative filenames.
-- Joey Hess <joeyh@debian.org> Wed, 23 Jun 2010 15:30:04 -0400