log viewer xslt vs php

56 views
Skip to first unread message

harrydiamond

unread,
Mar 15, 2012, 8:04:34 AM3/15/12
to ReposStyle
Hi,

adding a php script to the subversion apache server poses an
additional security risk to the server, since it requires enabling
mod_php and needs continuous patching, so we are not willing to do
that.
Wouldn't it be possible, to create a (static or periodically updated)
svn log file for the whole repository and then use xslt to display
only the log entries of the selected folder? If that works, php
wouldn't be required.
Of course this requires an input parameter to the xsl transformation.
If not possible to set xslt parameters through the browser url, it
should work using javascript.

Regards,
harrydiamond

Staffan

unread,
Mar 16, 2012, 4:02:08 PM3/16/12
to repos...@googlegroups.com
Hi,

That's a good idea. The only limitation I see is that the log would always be from repository root (or you could do a couple of logs for selected projects). The xslt can't get the query parameters from the log URL, but you could do filtering after browser load using javascript, for example jquery.

From the top of my head a solution could look like this.
 * Add index.xml as DocumentIndex
 * Make a cron job that does the following
   - echo a fixed xml header with the stylesheet declaration > /repos-web/open/log/index.xml
   - svn log incremental xml >> /repos-web/open/log/index.xml
   - echo footer for valid xml >> /repos-web/open/log/index.xml
 * The log will show up just like the php-based viewer on the same URL
 * Use javascript to read the window.location.search string's target parameter and use jQuery or something to hide log entries that are not from this folder

I'd be glad to hear about experiences with log viewing using static xml + xslt.

/Staffan



--
You received this message because you are subscribed to the Google Groups "ReposStyle" group.
To post to this group, send email to repos...@googlegroups.com.
To unsubscribe from this group, send email to reposstyle+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/reposstyle?hl=en.


Reply all
Reply to author
Forward
0 new messages