是否可以确定有多少行代码被签入构建中?

发布于 2024-10-21 12:16:07 字数 125 浏览 3 评论 0原文

是否可以确定有多少行代码被签入构建中?

例如,有多少行代码进入 main-dev build #50

我使用 SVN 和 Hudson 服务器。

请让我知道您的意见。

谢谢

Is it possible to determine how many lines of code are being checked into a build?

For example, how many lines of code went into main-dev build #50

I use SVN and Hudson server.

Please let me know your input.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浊酒尽余欢 2024-10-28 12:16:07

尝试 StatSVN:http://www.statsvn.org/index.html

这是一个示例报告(对于 Java):http://www.statsvn.org/jdepend-report.html

Try StatSVN: http://www.statsvn.org/index.html

Here's an example report (for Java): http://www.statsvn.org/jdepend-report.html

缱绻入梦 2024-10-28 12:16:07

我使用以下脚本(Linux 中的 bash shell)来计算与最新版本相比在本地修改的当前代码行:

insert=`svn diff -x -b | grep "^+" | grep -v -c "^+++"`
delete=`svn diff -x -b | grep "^-" | grep -v -c "^---"`
loc=`expr $insert + $delete`
echo "$loc lines diff (Inserted $insert, deleted $delete)."

这将为您提供如下输出:

106 lines diff (Inserted 65, deleted 41).

要检查过去版本的代码行更改,您可以只需使用 -r 参数即可。以下脚本采用一个参数作为感兴趣的版本:

ver=$1
nextVer=`expr $ver + 1`
insert=`svn diff -r$ver:$nextVer -x -b | grep "^+" | grep -v -c "^+++"`
delete=`svn diff -r$ver:$nextVer -x -b | grep "^-" | grep -v -c "^---"`
loc=`expr $insert + $delete`
echo "$loc lines diff (Inserted $insert, deleted $delete)."

I use the following script (bash shell in linux) to compute the current lines of code being modified locally compared to the most resent version:

insert=`svn diff -x -b | grep "^+" | grep -v -c "^+++"`
delete=`svn diff -x -b | grep "^-" | grep -v -c "^---"`
loc=`expr $insert + $delete`
echo "$loc lines diff (Inserted $insert, deleted $delete)."

This gives you the output like this:

106 lines diff (Inserted 65, deleted 41).

To check the lines of codes changes of a past version, you can simply use the -r argument. The following script takes one argument as the version of interest:

ver=$1
nextVer=`expr $ver + 1`
insert=`svn diff -r$ver:$nextVer -x -b | grep "^+" | grep -v -c "^+++"`
delete=`svn diff -r$ver:$nextVer -x -b | grep "^-" | grep -v -c "^---"`
loc=`expr $insert + $delete`
echo "$loc lines diff (Inserted $insert, deleted $delete)."
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文