X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/6a9e16374f1549c7e63c7cd1c0e6989b2fb32191..0c1999f782c1adecb319e4b6b14ce21234c9bbfe:/IkiWiki/Rcs/svn.pm?ds=inline diff --git a/IkiWiki/Rcs/svn.pm b/IkiWiki/Rcs/svn.pm index f01735afe..f3e353cbe 100644 --- a/IkiWiki/Rcs/svn.pm +++ b/IkiWiki/Rcs/svn.pm @@ -1,5 +1,4 @@ #!/usr/bin/perl -# For subversion support. use warnings; use strict; @@ -123,7 +122,6 @@ sub rcs_recentchanges ($) { #{{{ return unless -d "$config{srcdir}/.svn"; - eval q{use CGI 'escapeHTML'}; eval q{use Date::Parse}; eval q{use Time::Duration}; eval q{use XML::SAX}; @@ -153,13 +151,10 @@ sub rcs_recentchanges ($) { #{{{ my $rev = $logentry->{revision}; my $user = $logentry->{author}; - my $date = $logentry->{date}; - $date =~ s/T/ /; - $date =~ s/\.\d+Z$//; - my $when=concise(ago(time - str2time($date, 'UTC'))); + my $when=time - str2time($logentry->{date}, 'UTC'); foreach my $msgline (split(/\n/, $logentry->{msg})) { - push @message, { line => escapeHTML($msgline) }; + push @message, { line => $msgline }; } my $committype="web"; @@ -180,12 +175,12 @@ sub rcs_recentchanges ($) { #{{{ $diffurl=~s/\[\[r1\]\]/$rev - 1/eg; $diffurl=~s/\[\[r2\]\]/$rev/g; push @pages, { - link => htmllink("", "", pagename($file), 1), + page => pagename($file), diffurl => $diffurl, } if length $file; } push @ret, { rev => $rev, - user => htmllink("", "", $user, 1), + user => $user, committype => $committype, when => $when, message => [@message], @@ -259,7 +254,6 @@ sub rcs_notify () { #{{{ sub rcs_getctime ($) { #{{{ my $file=shift; - eval q{use Date::Parse}; my $svn_log_infoline=qr/^r\d+\s+\|\s+[^\s]+\s+\|\s+(\d+-\d+-\d+\s+\d+:\d+:\d+\s+[-+]?\d+).*/; @@ -281,6 +275,7 @@ sub rcs_getctime ($) { #{{{ return 0; } + eval q{use Date::Parse}; $date=str2time($date); debug("found ctime ".localtime($date)." for $file"); return $date;