- elsif ($state eq 'header' && /$svn_log_infoline/) {
- $rev=$1;
- $user=$2;
- $when=concise(ago(time - str2time($3)));
- }
- elsif ($state eq 'header' && /^\s+[A-Z]+\s+\/\Q$config{svnpath}\E\/([^ ]+)(?:$|\s)/) {
- my $file=$1;
- my $diffurl=$config{diffurl};
- $diffurl=~s/\[\[file\]\]/$file/g;
- $diffurl=~s/\[\[r1\]\]/$rev - 1/eg;
- $diffurl=~s/\[\[r2\]\]/$rev/g;
- push @pages, {
- link => htmllink("", pagename($file), 1),
- diffurl => $diffurl,
- } if length $file;
- }
- elsif ($state eq 'header' && /^$/) {
- $state='body';
- }
- elsif ($state eq 'body' && /$div/) {
- my $committype="web";
- if (defined $message[0] &&
- $message[0]->{line}=~/$svn_webcommit/) {
- $user="$1";
- $message[0]->{line}=$2;
- }
- else {
- $committype="svn";
- }
-
- push @ret, { rev => $rev,
- user => htmllink("", $user, 1),
- committype => $committype,
- when => $when, message => [@message],
- pages => [@pages],
- } if @pages;
- return @ret if @ret >= $num;
-
- $state='header';
- $rev=$user=$when=undef;
- @pages=@message=();
- }
- elsif ($state eq 'body') {
- push @message, {line => escapeHTML($_)},