SVN Log To CSV Converter

One of the many things that you may need to become accustomed to using is some type of versioning system.  One type that I use on a regular basis is SVN.  Last month, due to an audit, we had to get a spreadsheet or CSV file that contained all of the records of what was changed in an SVN repository.  Fortunately, SVN by default does provide a way of outputting all of the log entries but it is not in a CSV format.  Therefore, I wrote a simple SVN Log To CSV converter which can be used to export SVN log files as CSV files from the command line. Here is the SVN Log To CSV Converter as a ZIP file that contains the Java program, Java source code, readme file, and example CSV output.

As the readme file says, this program is really easy to use.  You can use one of the following statements in the command-line on a Unix, Linux or a Mac:

  • java svnLogToCSV {path_to_log}
  • cat {path_to_log} | java svnLogToCSV --stdin
  • svn log {url}[@{rev_num}] | java svnLogToCSV --stdin

For example, in order to produce the CSV file that is in the ZIP file, I used the following statement:

svn log | java svnLogToCSV --stdin > svnLog.csv

As far as getting this to work on a PC, I will have to do a bit of research because I never deal with SVN on Windows. Let me know if you can come up with the equivalent in Windows terms. On the other hand, before creating this Java program, I actually wrote an online converter which can be found here at JSBin. Enjoy! 8)

One thought on “SVN Log To CSV Converter”

  1. Thanks chris. This worked like a gem on Windows. I had to use a command line svn client as this didnt work on my Tortoise gui client. Just a simple svn log –help gave showed me how to modify the command for a range of rev nums and logs between 2 given dates.
    With this as reference i will try to write one in python. :)
    !m/! Thanks a lot !m/!

Leave a Reply

Your email address will not be published. Required fields are marked *

− four = 5

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="">