X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/f8fa69326a8963b179f2c0d6dd52d2f737634541..4971f873a0ed64dc3eb4d9ddd5c4977d72317a14:/IkiWiki/Plugin/darcs.pm diff --git a/IkiWiki/Plugin/darcs.pm b/IkiWiki/Plugin/darcs.pm index de9ef4f03..2448673ac 100644 --- a/IkiWiki/Plugin/darcs.pm +++ b/IkiWiki/Plugin/darcs.pm @@ -318,9 +318,9 @@ sub rcs_recentchanges ($) { my $hash=$patch->{hash}; my $when=str2time($date); my (@pages, @files, @pg); - push @pages, $_ for (@{$patch->{summary}->[0]->{modify_file}}); - push @pages, $_ for (@{$patch->{summary}->[0]->{add_file}}); - push @pages, $_ for (@{$patch->{summary}->[0]->{remove_file}}); + push @pages, $_ foreach (@{$patch->{summary}->[0]->{modify_file}}); + push @pages, $_ foreach (@{$patch->{summary}->[0]->{add_file}}); + push @pages, $_ foreach (@{$patch->{summary}->[0]->{remove_file}}); foreach my $f (@pages) { $f = $f->{content} if ref $f; $f =~ s,^\s+,,; $f =~ s,\s+$,,; # cut whitespace @@ -393,16 +393,13 @@ sub rcs_getctime ($) { eval q{use XML::Simple}; local $/=undef; - # Sigh... doing things the hard way again - my $repodir=$config{srcdir}; - - my $filer=substr($file, length($repodir)); + my $filer=substr($file, length($config{srcdir})); $filer =~ s:^[/]+::; my $child = open(LOG, "-|"); if (! $child) { exec("darcs", "changes", "--xml", "--reverse", - "--repodir", "$repodir", "$filer") + "--repodir", $config{srcdir}, $filer) || error("'darcs changes $filer' failed to run"); }