StatSvn导出SVN代码量报告

Step 1.从subversion官网下载安装程序,下载地址为:http://sourceforge.net/projects/win32svn/(这个是Windows版的~)。安装之后就有了svn.exe这个基于命令行的客户端工具,安装程序把svn.exe的路径加入了path环境变量,我们已经可以在命令行中直接输入svn就可以使用了;


Step 2.从SVN仓库拉取最新的项目,svn checkout [svn地址] --username [用户名];


Step 3.进入到工作目录,生成SVN Log文件:svn log -v --xml > logfileName.log;logfileName.log为log文件的名称;


Step 4.到StatSvn的官网下载StatSvn的压缩包,官网地址:http://www.statsvn.org/;解压到硬盘随意一个目录,会发现里面有个StatSvn的jar包~;


Step 5.调用StatSvn的命令进行统计:java -jar statsvn.jar [LogFile Path] [SVN CheckOut Path]


执行完上面的步骤,会发现在解压的statSvn的文件夹下生成了一大堆的文件,找到index.html双击打开查看统计结果~微笑


Some options:  
-version            print the version information and exit  
-output-dir <dir>         directory where HTML suite will be saved  
-include <pattern>        include only files matching pattern, e.g. **/*.c;**/*.h  
-exclude <pattern>    exclude matching files, e.g. tests/**;docs/**  
-tags <regexp>        show matching tags in lines of code chart, e.g. version-.*  
-title <title>            Project title to be used in reports  
-viewvc <url>         integrate with ViewVC installation at <url>  
-trac <url>           integrate with Trac at <url>  
-bugzilla <url>           integrate with Bugzilla installation at <url>  
-username <svnusername> username to pass to svn  
-password <svnpassword> password to pass to svn  
-verbose            print extra progress information  
-xdoc                   optional switch output to xdoc  
-xml                    optional switch output to xml  
-threads <int>            how many threads for svn diff (default: 25)  
-concurrency-threshold <millisec> switch to concurrent svn diff if 1st call>threshol  
-dump               dump the Repository content on console  
-charset <charset>        specify the charset to use for html/xdoc  
-tags-dir <directory>     optional, specifies the director for tags (default '/tags/')  
Full options list: http://www.statsvn.org  

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值