Being in software development, everyone of us must be using some or the other repository to save our work( popularly know as check-in check-out :) ). Recently while working on one of my project I thought of finding out the statistics of our project repository for some management reports. While there are so many tools available in the market to explore the stats, I chose to go with Tortoise SVN tool with some plugins. Following are other tools that can be very useful based on scenarios:
-Commit Monitor
-Winmerge
-Visual SVN
-SVN Monitor
-CM Synergy from Telelogic
-Many more are there
If you are using Tortoise SVN and want to know the details(for example : no of java classes checked-in, lines of codes written, developers name, total code base details and many more ) about your repository You can use the following steps to find the details:
1-check if the SVN has been installed and working properly or not by using following command:
C:\>svn help
It will output something like this:
usage: svn <subcommand> [options] [args]
Subversion command-line client, version 1.3.2.
Type 'svn help <subcommand>' for help on a specific subcommand.
Most subcommands take file and/or directory arguments, recursing
on the directories. If no arguments are supplied to such a
command, it recurses on the current directory (inclusive) by default.
Available subcommands:
add
blame (praise, annotate, ann)
cat
checkout (co)
cleanup
commit (ci)
copy (cp)
delete (del, remove, rm)
diff (di)
export
help (?, h)
import
info
list (ls)
lock
log
merge
mkdir
move (mv, rename, ren)
propdel (pdel, pd)
propedit (pedit, pe)
propget (pget, pg)
proplist (plist, pl)
propset (pset, ps)
resolved
revert
status (stat, st)
switch (sw)
unlock
update (up)
Subversion is a tool for version control.
For additional information, see http://subversion.tigris.org/
2-Use the following command to create a log file in your local system which will contain the details of SVN check-ins.
C:\>java -jar C:\SVNSTATS\statsvn.jar -dump -verbose C:\SVNSTATS\core.log
Output:
May 6, 2015 2:21:46 PM net.sf.statsvn.util.JavaUtilTaskLogger info
INFO: StatSVN - SVN statistics generation
(I have created a local folder SVNSTATS under c drive and also created a log file with name core.log)
3-If everything goes fine you can see log created in your log file (here I have used core.log as log file)
4-You can also get the HTML report for SVN stats using the following command.
java -classpath C:\SVNSTATS\SvnStat-all.jar de.agentlab.svnstat.SvnStat -jar SvnStat-all.jar -r C:\WorkSpace\eTextPorject\core.log -d C:\WorkSpace\eTextPorject\
C:\SVNSTATS - Location where I have kept the jars
C:\WorkSpace\eTextPorject\ - Location where I have checked-out the project
core.log - created a local file in project location to capture the stats
5-If you are going for HTML reports, make sure you run the step-2 before runnning step-4.
6-You have to download the following jar files and keep them in local machine:
statsvn.jar
SvnStat-all.jar
7-You may get the following error after step-2.
Make sure you are using SVN 1.7 and above. For old versions you will get the following issue. You should update your Tortoise SVN if you see the below error:
May 6, 2015 2:21:46 PM net.sf.statsvn.util.JavaUtilTaskLogger info
INFO: svn: '.' is not a working copy
May 6, 2015 2:21:46 PM net.sf.statsvn.util.JavaUtilTaskLogger error
SEVERE: Repository root not available - verify that the project was checked out with svn version 1.3.0 or above.
Happy Using SVN!!!!!!!!!!!!!!!
-Commit Monitor
-Winmerge
-Visual SVN
-SVN Monitor
-CM Synergy from Telelogic
-Many more are there
If you are using Tortoise SVN and want to know the details(for example : no of java classes checked-in, lines of codes written, developers name, total code base details and many more ) about your repository You can use the following steps to find the details:
1-check if the SVN has been installed and working properly or not by using following command:
C:\>svn help
It will output something like this:
usage: svn <subcommand> [options] [args]
Subversion command-line client, version 1.3.2.
Type 'svn help <subcommand>' for help on a specific subcommand.
Most subcommands take file and/or directory arguments, recursing
on the directories. If no arguments are supplied to such a
command, it recurses on the current directory (inclusive) by default.
Available subcommands:
add
blame (praise, annotate, ann)
cat
checkout (co)
cleanup
commit (ci)
copy (cp)
delete (del, remove, rm)
diff (di)
export
help (?, h)
import
info
list (ls)
lock
log
merge
mkdir
move (mv, rename, ren)
propdel (pdel, pd)
propedit (pedit, pe)
propget (pget, pg)
proplist (plist, pl)
propset (pset, ps)
resolved
revert
status (stat, st)
switch (sw)
unlock
update (up)
Subversion is a tool for version control.
For additional information, see http://subversion.tigris.org/
2-Use the following command to create a log file in your local system which will contain the details of SVN check-ins.
C:\>java -jar C:\SVNSTATS\statsvn.jar -dump -verbose C:\SVNSTATS\core.log
Output:
May 6, 2015 2:21:46 PM net.sf.statsvn.util.JavaUtilTaskLogger info
INFO: StatSVN - SVN statistics generation
(I have created a local folder SVNSTATS under c drive and also created a log file with name core.log)
3-If everything goes fine you can see log created in your log file (here I have used core.log as log file)
4-You can also get the HTML report for SVN stats using the following command.
java -classpath C:\SVNSTATS\SvnStat-all.jar de.agentlab.svnstat.SvnStat -jar SvnStat-all.jar -r C:\WorkSpace\eTextPorject\core.log -d C:\WorkSpace\eTextPorject\
C:\SVNSTATS - Location where I have kept the jars
C:\WorkSpace\eTextPorject\ - Location where I have checked-out the project
core.log - created a local file in project location to capture the stats
5-If you are going for HTML reports, make sure you run the step-2 before runnning step-4.
6-You have to download the following jar files and keep them in local machine:
statsvn.jar
SvnStat-all.jar
7-You may get the following error after step-2.
Make sure you are using SVN 1.7 and above. For old versions you will get the following issue. You should update your Tortoise SVN if you see the below error:
May 6, 2015 2:21:46 PM net.sf.statsvn.util.JavaUtilTaskLogger info
INFO: svn: '.' is not a working copy
May 6, 2015 2:21:46 PM net.sf.statsvn.util.JavaUtilTaskLogger error
SEVERE: Repository root not available - verify that the project was checked out with svn version 1.3.0 or above.
Happy Using SVN!!!!!!!!!!!!!!!
Comments
Post a Comment