StatSVN:统计代码行数工具

http://www.cnblogs.com/allenblogs/archive/2010/12/31/1923121.html

It takes three steps to create reports for a Subversion module:

  1. Check out a copy of the module from Subversion
  2. Create a log file for the module
  3. Run StatSVN

Checking out a module from Subversion

You can skip this step if you have already checked out a working copy, whether with the command line utility as shown here or a graphical interface, such asTortoiseSVN, but make sure to run an "svn update" on your working copy or you may not see all your log entries (seethis section of the SVN bookfor more information). Typically, the command looks like this (assuming modulename to be the name of the module):

svn co svn://server/repo/trunk/modulename

Creating an SVN log file

Change into the directory where you have checked out the module, and use the svn log command to create a log file.

cd checkout_dir

svn log -v --xml > logfile.log


Donotforget the-voption otherwise it will not work.

Running StatSVN

StatSVN is run using the command java -jar statsvn.jar. It takes a bare minimum of two command line parameters:

java -jar statsvn.jar <logfile> <checked-out-module>


For example:

java -jar /path/to/statsvn.jar /path/to/module/logfile.log /path/to/module


This command creates the reports in the current user directory. You can now point your browser to the file index.html, which is the table of contents of the report.

Work for fun,Live for love!


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值