aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/darcs.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-06-23 19:32:53 -0400
committerJoey Hess <joey@kitenet.net>2010-06-23 19:32:53 -0400
commitd8e4b51a41a9507584d56946d0eae0e5cef6d6f5 (patch)
treeb0aeaa8fb5116d5869f8758792c17b94eb72fa83 /IkiWiki/Plugin/darcs.pm
parentecdfd1b8644bc926db008054ab6192e18351afed (diff)
downloadikiwiki-d8e4b51a41a9507584d56946d0eae0e5cef6d6f5.tar
ikiwiki-d8e4b51a41a9507584d56946d0eae0e5cef6d6f5.tar.gz
rcs_getctime and rcs_getmtime take relative filenames
There was some confusion about whether the filename was relative to srcdir or not. Some test cases, and the bzr plugin assumed it was relative to the srcdir. Most everything else assumed it was absolute. Changed it to relative, for consistency with the rest of the rcs_ functions.
Diffstat (limited to 'IkiWiki/Plugin/darcs.pm')
-rw-r--r--IkiWiki/Plugin/darcs.pm9
1 files changed, 3 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/darcs.pm b/IkiWiki/Plugin/darcs.pm
index 0dfc8708d..0f63b8807 100644
--- a/IkiWiki/Plugin/darcs.pm
+++ b/IkiWiki/Plugin/darcs.pm
@@ -396,14 +396,11 @@ sub rcs_getctime ($) {
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;
@@ -418,7 +415,7 @@ sub rcs_getctime ($) {
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;
}