开发者

Complex reporting on subversion (possibly Export Subversion log into database for reporting)

What is the best way to do complex reporting on subversion logs like the following for each file? file, directory, last revision date, previous revision date(where revision date is at least 30 older than last), days diff(between revision dates)

Since Subversion allows on revision to change multiple files I assume svn log needs to be run against each file individually.

Ideas (that don't seem very good):

Shell scripting to produce a csv file to be imported to a DB. The following is a start but doesn't show the filename: find . -name "." -print | xargs -l svn log -l 2

Shell scripting to produce XML and then use XSLT to create CSV to import to a DB. It might use a similar command to above but would still have some of the same limitation.

Write a program to just parse the log on the who开发者_如何学Cle directory tree, make one insert to DB per revision/file combination, and then query the DB.


When I needed some information from an SVN log, I dumped it in XML and used a Ruby script to parse it. You can use XPath from Ruby which should make parsing easy. I think you should be able to get the log for the whole tree. If you're after one report, why bother with a database at all? Maybe you could just add some arguments to your script if you want to change the sort order for example.


If a rich (not custom) report is enough for you, take a look at StatSVN.


PanBI has a svn module which gives an OLAP interface to svn log: http://sourceforge.net/projects/panbi/

It generates a svn.sql with all your log. You can use the sql to dump in to any db you want

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜