RE: [viewvc-users] RSS Template Similar to SVN Mailer

"Brian A. Seklecki" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.user
Message-ID <1242014181.35106.1310766312179.JavaMail.httpd__38285.7418888763$1310766322$gmane$org@localhost>
Okay Below is my first attempt.  I may need to post it to a URL if Tigris/Collabnet Butchers it.

Unfortunately, my ability to conditionalize a loop check with the following fails:

  [if-any commits.files.type "Add"]Files Added:

For whatever reason, it always evaluates 'true', and always prints the header.

Maybe toss me some advise there?

There's another way to do it, but its more more ugly.


----------------------------
$REPONAME checkins
          Subversion commits to the $FOO repository
        
      
      9: [bseklecki] Test commit
Author: bseklecki
Date: Fri, 15 Jul 2011 21:11:27 UTC
New Revision: 9
Number of Files Changed: 1

Log:
Test commit 


Files Added:



Files Changed:

	 | Activity(+/-) : Dir / File |
	 | (1/0) :  / DESCR | 


Files Removed:

-----------------------------

<?xml version="1.0"?>
<rss version="3.0">
<channel>
    <link>[rss_link_href]</link>
    <title>[rootname] checkins[if-any where] (in [where])[end]</title>

    <description>[is roottype "svn"]Subversion[else]CVS[end] commits to the[if-any where] [where] directory of the[end] [rootname] repository</description>

        [for commits]<item>
        <title>[if-any commits.rev][commits.rev]: [end][[commits.author]] [format "xml"][commits.short_log][end]</title>
                [if-any commits.rss_url]<link>[commits.rss_url]</link>[end]
                <author>[commits.author]</author>
                <pubDate>[if-any commits.rss_date][commits.rss_date][else](unknown date)[end]</pubDate>
                <description>&#x3C;pre&#x3E;


                Author: [if-any commits.author][commits.author][else](unknown author)[end]
                Date: [if-any commits.rss_date][commits.rss_date][else](unknown date)[end]
                New Revision: [if-any commits.rev][commits.rev][else](unknown revision)[end]
                Number of Files Changed: [if-any commits.num_files][commits.num_files][else](unknown number of files changed)[end]
                &#13;
                Log:
                [format "xml"][format "html"][commits.log][end][end]
                &#13;
                [for commits.files]
                [if-any commits.files.type "Add"]Files Added:&#13;
                        [is commits.files.type "Add"]
                        &#09; | Activity(+/-) : Dir / File |
                        &#09; | ([commits.files.plus]/[commits.files.minus]) : [commits.files.dir] / [commits.files.file] | [end]
                [end][end]
                [for commits.files]
                [if-any commits.files.type "Change"]Files Changed:&#13;
                        [is commits.files.type "Change"]
                        &#09; | Activity(+/-) : Dir / File |
                        &#09; | ([commits.files.plus]/[commits.files.minus]) : [commits.files.dir] / [commits.files.file] | [end]
                [end][end]
                [for commits.files]
                [if-any commits.files.type "Remove"]Files Removed:&#13;
                        [is commits.files.type "Removed"]
                        &#09; | Activity(+/-) : Dir / File |
                        &#09; | ([commits.files.plus]/[commits.files.minus]) : [commits.files.dir] / [commits.files.file] | [end]
                [end][end]
                &#x3C;/pre&#x3E;</description>
    </item>[end]
</channel>
</rss>

------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2794362

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.