{"id":123,"date":"2011-09-14T14:47:08","date_gmt":"2011-09-14T13:47:08","guid":{"rendered":"http:\/\/www.arensa.net\/?p=123"},"modified":"2011-09-14T14:48:05","modified_gmt":"2011-09-14T13:48:05","slug":"svn-statistics-using-statsvn","status":"publish","type":"post","link":"https:\/\/www.arensa.net\/?p=123","title":{"rendered":"SVN Statistics using StatSVN"},"content":{"rendered":"<p>While testing a few tools to quickly get useful statistics on SVN repository, I stumbled on <a href=\"http:\/\/www.statsvn.org\" title=\"StatSVN Homepage\">StatSVN<\/a>, which I liked the most. As it is written in Java, it should run on most systems. Just follow the instructions of the Quick Start section in the <a href=\"http:\/\/wiki.statsvn.org\/\" title=\"StatSVN wiki\">Wiki<\/a> to create comprehensive statistics of your projects.<\/p>\n<p>As StatSVN works on the svn log file you have to create for your checked out modules, it might make sense to create the logs only for a specific period of time:<\/p>\n<p><code>svn log -v --xml -r {2011-06-30}:{2011-01-01} &gt; log.xml<\/code><\/p>\n<p>It is also possible to create joined statistics for several SVN modules. If you have a bunch of modules with branches you may want to make sure that you only check out the trunk portion of the modules and not all branches. For this, check out all the modules you have in the SVN repository but only the first level:<\/p>\n<p><code>svn checkout --set-depth immediates;<\/code><\/p>\n<p>This should give you the wanted directory structure. Now &#8221;cd&#8221; into each module directory and check out the &#8221;trunk&#8221; part of each module:<\/p>\n<p><code>cd MODULE_DIR<br \/>\nsvn update --set-depth immediates;<br \/>\ncd trunk;<br \/>\nsvn update --set-depth infinity;<\/code><\/p>\n<p>After creating the appropriate svn log file you can generate the statistics by invoking StatSVN, e.g. <\/p>\n<p><code>java -jar \/path\/to\/statsvn.jar \/path\/to\/module\/logfile.log \/path\/to\/module <\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>While testing a few tools to quickly get useful statistics on SVN repository, I stumbled on <a href=\"http:\/\/www.statsvn.org\" title=\"StatSVN Homepage\">StatSVN<\/a>, which I liked the most. &#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,13],"tags":[],"_links":{"self":[{"href":"https:\/\/www.arensa.net\/index.php?rest_route=\/wp\/v2\/posts\/123"}],"collection":[{"href":"https:\/\/www.arensa.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.arensa.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.arensa.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.arensa.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=123"}],"version-history":[{"count":8,"href":"https:\/\/www.arensa.net\/index.php?rest_route=\/wp\/v2\/posts\/123\/revisions"}],"predecessor-version":[{"id":133,"href":"https:\/\/www.arensa.net\/index.php?rest_route=\/wp\/v2\/posts\/123\/revisions\/133"}],"wp:attachment":[{"href":"https:\/\/www.arensa.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.arensa.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.arensa.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}