svn 可以提供哪些报告?
我们正在迁移到 SVN。
对我们来说不幸的是,我们会定期接受审核,审核员需要以下信息:
文件更改历史
访问 SVN 的历史
添加了新文件
文件更改
是否有工具可以为我们生成这些报告(或其中一些报告)?
We are in the process of moving to SVN.
Unfortunately for us, we are audited periodically, where the auditors require information like:
Histories of changes to files
History of access to SVN
New files Added
Changes in files
Is there a tool which can produce these reports for us (or some of these)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
StatSVN
是一个轻量级的颠覆报告生成器。http://www.statsvn.org/
首先生成详细日志文件 -
svn 日志
运行 < code>StatSVN ,它是一个 jar 文件。
StatSVN
提供了一个指标列表:StatSVN
is a light weight subversion report generator.http://www.statsvn.org/
first generate the verbose log file -
svn log
run
StatSVN
, it is a single jar file.StatSVN
provides a list of metrics:Trac (http://trac.edgewall.com) 可用于查看 SVN 详细信息。 Trac 具有很好的功能,例如变更集视图,允许查看不同的变更集(并来回浏览它们)。 它还提供了一个漂亮的 UI,比 ViewVC(www.viewvc.org) 好得多
Trac (http://trac.edgewall.com) can be used to view the SVN details. Trac has nice features like a changeset view that allows to see different changesets (and go back or forth through them). It also presents a nice UI , much better than ViewVC(www.viewvc.org)
svn log 是获取文件相关信息的基本命令正在寻找...
svn log is the basic command to get the file related information you're looking for...
您只需通过 SVN 修订日志即可获得所有这些信息。 您可能需要考虑一个不错的工具,例如 Fisheye 来为您完成此操作。
You can have all of that information just through the SVN revision logs. You might want to consider a nice tool like Fisheye to do it for you though.
SVN 直接从命令行提供您所需的大部分内容:
svn log /your/path
为您提供源代码差异、作者、签入日期等 添加了新文件svnlook 已更改 -r; <存储库路径>
为您提供给定修订版中涉及的所有文件。 循环遍历所有相关修订,并使用grep
查找“A”,表示添加的文件。svn diff -r:;
为您提供整个修订范围的差异svn log
)。 至于读取访问,我不知道内置机制,但是您可能可以轻松创建自己的机制,具体取决于配置。 如果您只允许 http 访问,则可以使用网络服务器的日志文件。它并不漂亮,但 SVN 的输出是高度结构化的,因此您可以轻松地进行自己的格式化。
SVN provides much of what you ask for right from the command line:
svn log /your/path
gives you source code diffs, authors, check-in dates etc.svnlook changed -r <rev> <path to repository>
gives you all files which were touched in the given revision. Loop over all relevant revisions, andgrep
for "A" which denotes added files.svn diff -r <first rev>:<last rev> <path>
gives you a diff of for the entire span of revisionssvn log
). As for reading access, I don't know of a builtin mechanism, however you can probably create your own with little effort, depending on the configuration. If you only allow http access, you can use the webserver's log files.It's not pretty, but SVN's output is highly structured so you can do your own formatting easily.
以下是我之前用来浏览变更活动报告和趋势的一些内容。 过滤并不完美,但您可以得到这个想法:
受影响的配置项:
变更集:
在给定修订范围内受到影响的唯一文件列表(我安装了 cygwin):
Here are some that I have used before to give a glance at change activity reporting and trends. The filtering isn't perfect, but you can get the idea:
Affected Configuration Items:
Changesets:
List of unique files that have been affected over the given revision range (I had cygwin installed):
看看 codesaga。 它可以很好地可视化源代码控制提交。 我不能保证报告部分。
Take a look at codesaga. It makes a good job of visualizing source control commits. I can't vouch for the reporting part.
该程序可能会帮助您,但不是审核,而是更新
http://www.svnmonitor.com/default .shtml
This program might help you out, not with audits, but updates
http://www.svnmonitor.com/default.shtml
要查看对 SVN 的实际访问,您需要解析 Apache 服务器日志(假设您通过 Apache 提供 SVN)。
To see actual accesses to SVN, you'd need to parse the Apache server logs (assuming you're serving SVN over Apache).
这个问题也有点老了,但我制作了一个脚本,可能对 Subversion 的简单报告/审核有用,并跟踪对 SVN 存储库所做的更改,我想分享它。 它提取
有关 SVN 提交的信息与命令“svnlook”类似,但它有两个优点。 首先,它允许迭代存储库的所有修订以跟踪所做的所有更改。 其次,
信息以制表符分隔的表格格式(如 ps 或 df 等 Unix 命令)打印,既便于人类阅读,又易于解析或导入到电子表格中,这非常适合报告。 它也可以被称为或
嵌入到 SVN post-commit hook 中。
它是一个名为 svn-commit-info.pl 的 Perl 脚本,带有三个参数。 第一个是存储库路径
这是强制性的。 第二个是可选的,是要搜索的文件模式。 第三个也是可选的,是
要查询的修订号。
如果仅使用存储库路径执行,它将打印到 STDOUT 有关受所有影响的文件的信息
在存储库中进行的提交。 例如,假设存储库存储在 /svn/repos/test 中
Subversion 服务器:
制表符分隔的字段为:执行的操作、修订版本号、日期和时间、修订版本的作者、
文件大小(以字节为单位)(除非文件是由字符串“
存储库。 前三行包含有关输出的以人为本的注释。
如果存储库很大,有很多文件或,前一个命令的输出可能需要很长时间才能完成
修订。 如果您想跟踪对特定文件(或一组文件)所做的更改,最好
指定文件模式(实际上,这是一个 Perl 正则表达式)。 例如,获取有关更改的信息
对文件 style.css 进行修改:
如果您对特定修订版感兴趣,则可以指定第三个参数。 例如打印所有更改
第三次修订,考虑到“.” 匹配 Perl 正则表达式中的任何字符:
当然,您可以利用 Unix 过滤器和管道的强大功能来执行更复杂的查询,例如
查找用户 David 所做的所有修改:
查找所有创建的大小 >= 1Mb 的文件:
该脚本使用标准 Subversion 命令“svnlook”,但除此之外它是自包含的。 那里
是两个辅助函数,用于构建命令并获取“svnlook”的输出,然后连续调用
组成输出的命令。 它需要 Subversion >= 1.7 并且它有
在 Perl 5.10 上进行了测试。
希望这对您有所帮助,并对这么长的帖子表示歉意。
This question is also a bit old, but I've crafted a script that may be useful for simple reporting/auditing of Subversion and to keep track of the changes made to a SVN repository and I wanted to share it. It extracts
information about SVN commits in a similar way to the command "svnlook" but it has a pair of advantages. First, it allows to iterate over all revisions of a repository to keep track of all the changes made. Second, the
information is printed in a tab-separated tabular format (as in Unix commands like ps or df) that is both human readable and easy to parse or to import into a spreadsheet, which is great for reporting. It can also be called or
embedded in a SVN post-commit hook.
It is a Perl script called svn-commit-info.pl and takes three arguments. The first is the repository path
and it is mandatory. The second, optional, is the file pattern to search. And the third, also optional, is
the revision number to query.
If executed only with the repository path, it prints to STDOUT information about the files affected by all the
commits made in the repository. For example, assuming the repository is stored in /svn/repos/test in the
Subversion server:
The tab-separated fields are: the operation performed, the revision number, the date and time, the author of the revision, the
file size in bytes (unless the file is a directory marked by the string "<DIR>") and the path of the affected file in the
repository. The first three lines contain human oriented comments about the output.
The output of the former command can take a long time to complete if the repository is big, with many files or
revisions. If you want to keep track of the changes made to a particular file (or a set of files), it is better
to specify the file pattern (that, in fact, is a Perl regexp). For example, to get information about the changes
made to the file style.css:
If you are interested in a particular revision, you can specify the third parameter. For example to print all the changes
of the third revision, taking into account that '.' matches any character in a Perl regular expression:
And of course you could harness the power of Unix filters and pipelining to do more complex queries, for example to
find all the modifications made by user David:
To find all the files created with size >= 1Mb:
The script uses the standard Subversion command "svnlook" but otherwise it is self contained. There
are two helper functions to build the command and get the output of "svnlook" and then mades successive calls to
the command to compose the output. It requires Subversion >= 1.7 and it has
been tested on Perl 5.10.
Hope this helps and sorry for the long post.