Debajyoti Das
Debajyoti Das

Reputation: 2148

SVN Log XML Output: Get Revision Number as a Node

When I run svn log --xml 'repos' . It generates the log like...

<logentry revision="1">
<author>harry</author>
<date>2008-06-03T06:35:53.048870Z</date>
<msg>Initial Import.</msg>
</logentry>

Can it be outputed as

<logentry>
<revision>1</revision>
<author>harry</author>
<date>2008-06-03T06:35:53.048870Z</date>
<msg>Initial Import.</msg>
</logentry>

This will help me parse it easily to insert the data into the database. Or is there any easy way to store the log to a database.

Upvotes: 1

Views: 2168

Answers (2)

anony
anony

Reputation: 314

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

Upvotes: 1

alroc
alroc

Reputation: 28174

Without compiling your own custom Subversion client with the modifications you're after, you can't.

Alternatively, you could pass the XML through an XSLT stylesheet to perform the transform(s) you're after, and then feed that into your database.

Or simply parse the XML yourself (every programming/scripting language has an XML library built in, or easily obtained) to perform the inserts.

Upvotes: 5

Related Questions