Playing with StatSVN

Today was a project finishing day.
Using Subversion for over a month of work, it would be nice to get and study some stats.

We are using Redmine, a great project management web application, written using Ruby on Rails framework that can connect with a repository (it supports Subversion, CVS, Mercurial, Darcs, Bazaar and Git) and present the revisions with diff and the like, but the statistics page is poor including only Commits per month and Commits per author. (thanks to Jimmy for that suggestion).

In search of a more complete Statistics system for Subversion I came across with StatSVN!

Talk is cheap. Show me how to use it!

It is really simple: just download the tool from SourceForce, unzip it and get the statsvn.jar file.

Now, go to your project’s root directory and create a log file:
cd myproject
svn log --xml -v > ~/myprojectsvn.log

Then run the statsSVN tool!
java -jar /path/to/statsvn.jar ~/myprojectsvn.log /path/to/project

and open the index.html file and check the statistics.

It includes tweet buttons, how cool is that? ;)

Share

Major problems with Subversion and Eclipse

The use of Subversion with Eclipse is producing major problems.

Today I found out tha by default, Eclipse Java Builder copies all the non-java files under the source folder into the build output folder. This causes a problem if you are using Subversion, which creates a .svn folder under every workset folder.

So the solution ito prevent Eclipse from copying the .svn folders, is to go to Preferences->Java->Compiler->Building, expand the “Output folder”, and add “.svn” to “Filtered Resources”.

http://www.digizenstudio.com/blog/2005/05/07/prevent-eclipse-from-copying-svn-folders/

Share

SVN reseting, the hard way

So, my subversion screwed up my remote repository, not allowing me to commit any local changes.
Unfortunately, it screwed up my local repository too with those .svn folders and directories so I had to do a hard way reset to make it work again.

This is how I did it:

First of all BACKUP BACKUP BACKUP!
I checked out my files at a new temporary directory:
cd tempmplampla
svn checkout http://myremoterepository/code

then delete everything in it:
svn remove *

then commit the changes:
svn commit

The remote repository is empty again. Nice!

I run the following command at my local repository to clean all the svn files:
cd /cleanedworkingcopy/
find . -name “.svn” -type d -exec rm -rf {} \;

Now you just have to copy the “cleaned” directory to the temporary directory you checkedout before:
cp -r /cleanedworkingcopy/* /tempmplampla/

and commit the new files once again:
svn add *
svn commit

That’s it!

Share