Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /insurrection/src/

Project highlights: A modern, light-weight, self-contained, web-based toolset for Subversion repository browsing and administration.  A live system can be seen in action here.

insurrection
Discussion topic

Back to topic list

CVS update: /insurrection/src/

Author mksoft
Full name Michae Sinz
Date 2007-12-11 19:28:19 PST
Message User: mksoft
Date: 2007-12-11 19:28:19-0800
Modified:
   insurrection/src/atom.cgi
   insurrection/src/rss.cgi

Log:
 Merged in r346 : http://svn.sinz.com/​svn/Insurrection/?In​surrection=log&r​=346
 
 For the ATOM and RSS feeds, the "title" of each feed item was just the
 revision number (well, actually, "Revision nnn")
 
 However, for many feed systems, this produces useless feed headers as there
 is no summary of the commit.
 
 What I have done is to take the first line from the commit message and
 included it within the title of each item. This make the title usually
 much more useful than just a revision number.

File Changes:

Directory: /insurrection/src/
=============================

File [changed]: atom.cgi
Url: http://insurrection.​tigris.org/source/br​owse/insurrection/sr​c/atom.cgi?r1=1.4​&r2=1.5
Delta lines: +7 -4
-------------------
--- atom.cgi 2006-06-09 21:01:25-0800 1.4
+++ atom.cgi 2007-12-11 19:28:17-0800 1.5
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 #
-# $Id: atom.cgi,v 1.4 2006/06/10 05:01:25 mksoft Exp $
+# $Id: atom.cgi,v 1.5 2007/12/12 03:28:17 mksoft Exp $
 # Copyright 2004-2006 - Michael Sinz
 #
 # This script handles the return of atom data.
@@ -206,7 +206,7 @@
        , '<link rel="self" type="application/atom+xml" href="' , &svn_XML_Escape($aLink) , '"/>' , "\n"
        , '<id>' , &svn_XML_Escape($aLink) , '</id>' , "\n"
        , '<generator uri="http://svn.sinz.com/​project.html">Insurrection Atom Feeder - '
- , &svn_XML_Escape('$Id: atom.cgi,v 1.4 2006/06/10 05:01:25 mksoft Exp $')
+ , &svn_XML_Escape('$Id: atom.cgi,v 1.5 2007/12/12 03:28:17 mksoft Exp $')
        , '</generator>' , "\n"
        , '<updated>' , $topDate , '</updated>';
 
@@ -217,6 +217,9 @@
       my ($logmsg) = ($entry =~ m:<msg>\s*(.*​?)\s*</msg>:s​o);
       my ($date) = ($entry =~ m:<date>\s*(.​*?)\s*</date>​:so);
 
+ ## Get the first line of the log message
+ my ($firstLine) = ($logmsg =~ m:^\s*(.*?)\s*(\n|$):so);
+
       ## Convert line enders into <br/>
       $logmsg =~ s:\n:<br/>:sgo;
 
@@ -234,7 +237,7 @@
 
       ## Output this item...
       print '<entry>' , "\n"
- , '<title type="text">Revision ' , $revision , '</title>'
+ , '<title type="text">Revision ' , $revision , ': ' , &svn_XML_Escape($firstLine) , '</title>'
           , '<updated>' , $date , '</updated>'
           , '<author><name>' , $author , '</name></author>' , "\n"
           , '<id>' , &svn_XML_Escape($link) , '</id>' , "\n"
@@ -253,7 +256,7 @@
        , '<h3>Log command:</h3>'
        , '<pre>' , $cmd , '</pre>';
 
- &svn_TRAILER('$Id: atom.cgi,v 1.4 2006/06/10 05:01:25 mksoft Exp $');
+ &svn_TRAILER('$Id: atom.cgi,v 1.5 2007/12/12 03:28:17 mksoft Exp $');
 }
 
 ## Build the list of files modified/updated/etc by the revision...

File [changed]: rss.cgi
Url: http://insurrection.​tigris.org/source/br​owse/insurrection/sr​c/rss.cgi?r1=1.23​&r2=1.24
Delta lines: +7 -4
-------------------
--- rss.cgi 2006-06-20 20:04:38-0800 1.23
+++ rss.cgi 2007-12-11 19:28:17-0800 1.24
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 #
-# $Id: rss.cgi,v 1.23 2006/06/21 04:04:38 mksoft Exp $
+# $Id: rss.cgi,v 1.24 2007/12/12 03:28:17 mksoft Exp $
 # Copyright 2004-2006 - Michael Sinz
 #
 # This script handles the return of rss data.
@@ -196,7 +196,7 @@
        , '</description>' , "\n"
        , '<link>' , &svn_XML_Escape($rLink) , '</link>' , "\n"
        , '<generator>Insurrection RSS Feeder - '
- , &svn_XML_Escape('$Id: rss.cgi,v 1.23 2006/06/21 04:04:38 mksoft Exp $')
+ , &svn_XML_Escape('$Id: rss.cgi,v 1.24 2007/12/12 03:28:17 mksoft Exp $')
        , '</generator>' , "\n"
        , '<pubDate>' , &dateFormat($topDate) , '</pubDate>'
        , '<lastBuildDate>' , &dateFormat($topDate) , '</lastBuildDate>'
@@ -209,6 +209,9 @@
       my ($logmsg) = ($entry =~ m:<msg>\s*(.*​?)\s*</msg>:s​o);
       my ($date) = ($entry =~ m:<date>\s*(.​*?)\s*</date>​:so);
 
+ ## Get the first line...
+ my ($firstLine) = ($logmsg =~ m:^(.*?)(\n|$):so);
+
       ## Convert line enders into <br/>
       $logmsg =~ s:\n:<br/>:sgo;
 
@@ -230,7 +233,7 @@
 
       ## Output this item...
       print '<item>' , "\n"
- , '<title>Revision ' , $revision , '</title>'
+ , '<title>Revision ' , $revision , ': ' , &svn_XML_Escape($firstLine) , '</title>'
           , '<pubDate>' , &dateFormat($date) , '</pubDate>'
           , '<author>' , $author , '</author>' , "\n"
           , '<link>' , &svn_XML_Escape($link) , '</link>' , "\n"
@@ -250,7 +253,7 @@
        , '<h3>Log command:</h3>'
        , '<pre>' , $cmd , '</pre>';
 
- &svn_TRAILER('$Id: rss.cgi,v 1.23 2006/06/21 04:04:38 mksoft Exp $');
+ &svn_TRAILER('$Id: rss.cgi,v 1.24 2007/12/12 03:28:17 mksoft Exp $');
 }
 
 ## Build the list of files modified/updated/etc by the revision...

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /insurrection/src/ mksoft Michae Sinz 2007-12-11 19:28:19 PST
Messages per page: