# Changed SVN log to show latest 10 entries

This was SVN commit r5119.
This commit is contained in:
Ykkrosh
2007-05-30 17:01:14 +00:00
parent 7c241ed22c
commit 7c50888219
3 changed files with 15 additions and 6 deletions
+2 -2
View File
@@ -2,10 +2,10 @@ name: SVNLog
svn:
username: philip
password: ????????
url : http://artificetech.co.uk/svn/trunk
url : http://svn.0ad.homeip.net/svn/ps/trunk
cdbi:
dsn : dbi:SQLite:/var/www/svnlog/SVNLog/sql/svnlog.db
scp:
command : /usr/bin/scp -i /var/www/svnlog/ssh/wfgkey
filename: philip@wildfiregames.com:~/svnlog/public
filename_feed: philip@wildfiregames.com:~/svnlog/public_feed
filename_feed: philip@wildfiregames.com:~/public_html/svnlog.xml
@@ -110,14 +110,18 @@ sub createfeed : Local
sub generate_text
{
my @logentries = SVNLog::Model::CDBI::Logentry->recent(7);
#my @logentries = SVNLog::Model::CDBI::Logentry->recent(7);
#my $maxentries = 0; # unlimited
my $out = qq{<a href="$feed_url"><img alt="Atom feed" title="Subscribe to feed of revision log (Atom 1.0 format)" src="/images/feed-icon-16x16.png" style="float: right"></a>};
my @logentries = SVNLog::Model::CDBI::Logentry->recent(28);
my $maxentries = 10;
my $out = qq{<a href="$feed_url"><img alt="Atom feed" title="Subscribe to feed of revision log" src="/images/feed-icon-16x16.png" style="float: right"></a>\n};
for (@logentries)
{
my ($revision, $author, $date, $msg) = ($_->revision, $_->author, $_->date, $_->public_msg);
next unless defined $msg and $msg->msg;
$date =~ s/T.*Z//;
$out .= <<EOF;
<b>revision:</b> $revision<br>
@@ -129,7 +133,9 @@ EOF
$text =~ s/</&lt;/g;
$text =~ s/>/&gt;/g;
$text =~ s/\n/<br>/g;
$out .= $text . '<hr>';
$out .= $text . "\n<hr>\n";
last if --$maxentries == 0;
}
$out ||= 'Sorry, no data is available right now.';
@@ -4,6 +4,7 @@
<tr>
<th>Revision</th>
<th>Author</th>
<th>Date</th>
<th>Log message</th>
<th>Public message</th>
<th/>
@@ -16,6 +17,8 @@
<tr>
<td>[% object.logentry.revision %]</td>
<td>[% object.logentry.author %]</td>
<td>[% str = object.logentry.date.match('(\d{4}-\d{2}-\d{2}).(\d{2}:\d{2}:\d{2})');
str.0 %] [% str.1 %]</td>
<td>[% object.logentry.msg | html | html_line_break %]</td>
<td>[% object.msg | html | html_line_break %]</td>
<td>