SVN Stats

From sselab

Jump to: navigation, search

Agile software development needs ever running integrated software. Tool support is essential. We provide the following services and are working on further ones, such as nightly build and automatic deployment of web systems that are developed. Coming soon.

Contents

Services involved

A number of additional services are available. Check out what you want to use, e.g. to generate code or tests.

Initial setup

  • Use Subversion as your version control system for your software project
  • Integrate StatsSVN into your Continous Integration process
    • Download StatsSVN from Link

Generate Stats with Ant

    • Add additional build-steps to e.g.: Ant
      • Set following properties:
   <property name="bin.dir" value="/usr/bin" />
   <property name="svn" value="${bin.dir}/svn" />
   <property name="webdav" value="${bin.dir}/cadaver" />
   
   <property name="repository-log" value="build/repository.log" />

   <!-- Change properties according to your project -->
   <!-- project properties begin -->
   <property name="repository-user" value="sselab-username" />
   <property name="repository-password" value="sselab-password" />

   <property name="repository-url" value="https://sselab.de/SVN-Repository-URL" />
   <property name="trac-url" value="https://sselab.de/TRAC-Project-URL" />

   <property name="working-copy" value="RELATIVE_PATH_TO_WORKING_COPY" />
   <!-- project properties end -->
      • Create svn log file:
<target name="fetchSvnLog">
      <mkdir dir="build" />
      <exec executable="${svn}" output="${repository-log}">
           <arg line="log --username ${repository-user} --password ${repository-password} --non-interactive --no-auth-cache -v --xml ${repository-url}" />
       </exec>
   </target>
      • Calculate SVN stats
<target name="createStats" >

       <java jar="ext-lib/statsvn.jar" fork="true" failonerror="true">
           <arg value="-output-dir" />
           <arg value="build/stats" />

           <arg value="-cache-dir" />
           <arg value="build/cache" />

           <!-- Adapt SVN properties for your project (optional) -->
           <arg value="-config-file" />
           <arg value="config.properties" />

           <arg value="-username" />
           <arg value="${repository-user}" />
           <arg value="-password" />
           <arg value="${repository-password}" />

           <arg value="-trac" />
           <arg value="${trac-url}" />

           <arg value="-threads" />
           <arg value="2" />

           <arg value="${repository-log}" />
           <arg value="${working-copy}" />
       </java>

   </target>

Upload Stats with Ant and Cadaver

  • Upload the generated html report of Stats_SVN to the project storage
    • Install a WebDAV-Client, e.g. cadaver Link
    • Add additional build-steps to e.g.: Ant
<target name="uploadStats">
       <exec executable="${webdav}" input="uploadWebDav.cadaver" dir="build/stats">
       </exec>
   </target>
open https://sselab.de/STORAGE_service-URL
mput *
    • Example:
open  https://sselab.de/lab2/private/storage/monticore/
mput *
    • In order to use the autologin feature from cadaver, you have to create the .netrc file. You have to change sselab-username and sselab-password with your credentials of your sselab account, that is used for uploading the files.
machine sselab.de
login sselab-username
password sselab-password

Upload Stats with Ant and curl

  • You have to change sselab-username and sselab-password with your credentials of your sselab account, that is used for uploading the file FILE.
 curl -T FILE -u sselab-username:sselab-password https://sselab.de/STORAGE_service-URL

Send feedback to extend this scenario

Please contact us if you have question concerning the usage of the services. We are also curious about new ideas for additional services and new usage scenarios. Send us a message over the contact form or write us an email


  • This page was last modified on 15 April 2013, at 15:23.
  • This page has been accessed 17,844 times.