statsvn使用详细说明

Posted davidchen211

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了statsvn使用详细说明相关的知识,希望对你有一定的参考价值。

下载并安装SVN统计工具StatSVN

1)下载地址:sourceforge.net/projects/statsvn/

2)解压压缩包,到一个目录,如E:CodeAnalysis

找一个svn上项目

check或update这个项目到 指定目录下

新建生成html文档目录 E:CodeAnalysis

cmd下指定到E:CodeAnalysis 这个目录

利用命令:

svn co svn://ip/项目  或者 https协议

生成日志:

svn log -v --xml > logfileName.log (导出所有的svn log)

svn log -r HEAD:版本号 -v --xml > logfileName.log(导出指定版本的svnlog)

svn log -r {2018-10-14}:{2013-06-14} -v--xml > logfileName.log (导出指定时间的svn log)

例子:

svn log svn://IP/项目 -r {2018-10-26}:{2018-10-30} -v --xml > /tmp/logfile.log

生成统计信息

java -jar statsvn.jar E:logfile.log(日志目录)  E:svn项目(svn checkout 目录)

生成详细信息

java -jar statsvn.jarE:logfile.log(日志目录)  E:svn项目 -charset gbk -output-dir ./report

例子:

java -jar statsvn.jar E:logfile.log(日志目录)  E:svn项目 -charset gbk -exclude "docs/**" -output-dir ./report

等待一段时间,E:CodeAnalysis目录下就会生成大量的统计文件,打开index.html即可进行查看。

 

 

satasvn.jar选项   http://wiki.statsvn.org/User%20Manual.ashx    http://www.statsvn.org/


A list of all options understood by StatSVN follows.

General Options


-output-dir <directory>
Specify an output directory. The reports will be generated in this directory. The directory will be created if it doesn‘t exist.

 

-include <include-pattern-list>
-exclude <exclude-pattern-list>
Specify filters to exclude files from the analysis. A file will be ignored if it doesn‘t match any of the patterns ininclude-pattern-list, or if it matches any pattern inexclude-pattern-list.

The patterns are lists of Apache Ant-style wildcard patterns, seperated by colons or semicolons. The wildcards are:

‘?‘ matches a single character
‘*‘ matches zero or more characters
‘**‘ matches zero or more directories
For example, src/**/*.java matches all java files in thesrc directory or its subdirectories. Note that*.java only matches java files in the root directory, because ‘*‘ does not match subdirectories.

One more example:

-include "**/*.c:**/*.h" -exclude "legacy/**"
This matches all .c and .h files anywhere in the directory tree except those in thelegacy directory and its subdirectories.

For more information on Ant‘s wildcard syntax, see thePatternset section of the Ant manual.

If not specified, all files will be included and no files will be excluded.

Note: Unix users must put the patterns in quotes, or the shell will interfere with the wildcards.

-cache-dir <directory>

Specify a cache directory for information retrieved from the Subversion server (e.g. line counts). The data will be saved in this directory. The directory will be created if it doesn‘t exist. By default, the current user directory is used.

-username <subversion_username>
Specify a username to use when connecting to the Subversion server.

-password <subversion_username>
Specify a password to use when connecting to the Subversion server.

-tags <tags-regularexpression>
Includes information about Subverison tags into the reports. Only tags matching the regular expression are included. To includeall tags, add-tags ‘.*‘ to the command line.

Note: Unix users must put the expression in quotes, or the shell will interfere with the wildcards.

Note: Tags are determined by looking at your repository‘s /tags directory. To be able to use this feature, you must generate the log file from the root of your repository, so that the log contains information from both the /tags and the /trunk. The checked out version does not have to contain the tags directory.

-tags-dir <directory>
Specifies the root directory from which the tags regular expression is evaluated. The default -tags-dir is/tags/

-no-developer <login-name>Excludes a Subversion account name from all developer reports. This is useful to reduce noise from administrative and other non-developer accounts. Multiple accounts can be excluded by adding the option to the command line once for each account.
Report Options
-xdoc
Generate Maven XDoc instead of HTML. This allows Maven and Maven 2 to integrate the reports when it generates the projects Maven site. Reports could be placed, for example, intosrc/site/statsvn.

-xml
Generate XML instead of HTML.

-css <stylesheet>
Optional (default varies for html or xdoc). Specify aCascading Style Sheet for the report. This can be a HTTP URL or a local file. A URL will simply be linked in every page of the report. A local file will be copied into the report directory.

-notes <notes-file>
The contents of the specified file will be included at the top of the report‘s index page. The file should contain a valid block-level HTML fragment, for example:

<p>
These are development statistics for the
<a href="http://www.statsvn.org">StatSVN</a>
project, created by StatSVN itself.
</p>
<p>
<strong>Note:</strong>
This report was generated by an unreleased
development version of StatSVN. It might
contain features not yet found in the
official release.
</p>

-title <title>
Specifies a display title to be used in the reports. The name of the Subversion module will be used as default if no title is specified.

-config-file <path to properties file>
Allows one to replace the source control username with more information such as real name, website, email and avatar icon. Seethis file for an example.

-charset <charSet>
Specifies the charset to use in HTML or XDOC output. ISO-8859-1 will be used as default if no charset is specified.

-disable-twitter-button
if present, exclude the Twitter "Tweet This" buttons from the output.

Options for Integration with External Tools
-bugzilla
Specify the URL of a root of a Bugzilla installation. Will replace ‘Bug ###‘ in commit logs with a link to the appropriate bug. (New in StatSVN)

-chora <chora-url>
Specify the URL of a Chora installation for the module. This must be the URL of the page for the module‘s root directory. StatSVN will create links to Chora for directories, files and revisions.

-viewvc <viewvc-url>
Specify the URL of a ViewVC installation for the module. This must be the URL of the page for the module‘s root directory. StatSVN will create links to ViewVC for directories, files and revisions.

-mantis <mantis-url>
Specify the root URL of a Mantis bug tracker installation. In commit messages, this will turn “Bug ####” into a link to the appropriate bug.

-trac <trac-url>
Specify the root URL of a Trac installation. In commit messages, this will turn “Bug ####” into a link to the appropriate bug.

Miscellaneous Options
-debug
Output lots of additional progress information.

-verbose
Output additional progress information.

-version
Output the version of StatSVN.

-dump
Will output the repository content on console and stop

-concurrency-threshold <millisec>
Switch to concurrent svn diff if the first call takes more than the threshold (in milliseconds) (default: 4000) 

-threads <int>
How many threads for svn diff (default: 25)

-anonymize
Anonymizes committer names.

 

















































以上是关于statsvn使用详细说明的主要内容,如果未能解决你的问题,请参考以下文章

java事务处理的详细说明

Nginx配置文件详细说明 配置文件详细说明

HighCharts 详细使用及API文档说明

vuex的使用详细说明

vuex的使用详细说明

网络通信框架Volley使用详细说明