ASP.Net 中的 SVN 报告

发布于 2024-07-09 02:27:42 字数 221 浏览 12 评论 0原文

我们有一个用 ASP,net 3.5 构建的自定义项目管理工具,并使用 VisualSVN 进行版本管理。 然而,我们正在寻找一种通过项目管理工具报告版本更改的方法,即通过将 VisualSVN 与我们的项目管理工具集成,即与 Trac [基于 python 的 SCM 工具] 提供的非常相似。

基本上寻找一个简单的 VisualSVN 客户端 API 能够检测和检测 根据提供的修订集报告文件更改。

We have a custom project management tool built in ASP,net 3.5 and we use VisualSVN for our version management. However, we are looking a way to report the version changes through the project management tool by integrating VisualSVN with our project management tool, i.e. pretty much similar to what Trac [python based SCM tool] provides.

Basically looking for a simple VisualSVN Client API to be able to detect & report the file changes based on the revision set provided.

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

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

发布评论

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

评论(3

吾性傲以野 2024-07-16 02:27:42

还有 SharpSvn 封装了整个 Subversion 1.5 客户端 api。 它是根据 Apache 2.0 许可证获得许可的,并且来自 CollabNet。

There is also SharpSvn wich encapsulates the whole Subversion 1.5 client api. It's is licensed under the Apache 2.0 license and it's from CollabNet.

烟沫凡尘 2024-07-16 02:27:42

检查 Svn.NET 我认为这是目前 Subversion .NET 绑定的最佳解决方案客户端系统库。

Check Svn.NET I think is the best solution for right now .NET bindings of the Subversion client system libraries.

饮惑 2024-07-16 02:27:42

如果您对某些脚本感到满意,则可以使用 svnlook,该工具提供有关更改和存储库修改的报告。

我在提交后挂钩中使用它来将所有文件的更改发送到我的错误跟踪器,这样它就可以根据修订号显示哪些文件已更改。 我向日志添加特定文本,它会选择该文本来了解与数据关联的错误。

编辑,根据要求,从 post-commit 挂钩调用此 perl 脚本:

$url = `svnlook log -r $ARGV[1] $ARGV[0]`;

# check the string contains the matching regexp, 
# quit if it doesn't so we don't waste time contacting the webserver
# this is the g_source_control_regexp value in mantis.

exit 1 if not $url =~ /\b(?:bug|issue|mantis)\s*[#]{0,1}(\d+)\b/i;


$url = $url . "---\nSVN Revision: " . $ARGV[1];
$url = $url . "\n" . `svnlook dirs-changed -r $ARGV[1] $ARGV[0]`;

#urlencode the string
$url =~ s/([^\w\-\.\@])/$1 eq " "?"+":  sprintf("%%%2.2x",ord($1))/eg;

print "log=$url";

exit 0;

这会写入 postcommit_mantis.txt 文件,该文件通过curl 发送到 Mantis:

d:\tools\curl -s -d user=svn -d @c:\temp\postcommit_mantis.txt http://<server>/mantis/core/checkincurl.php

If you're happy with some scripting, you can use svnlook, which is the tool that provides reports on changes and repository modifications.

I use it in a post-commit hook to send the changes of all files to my bugtracker, so it can display which files were changed given a revision number. I add a specific text to the log, and it picks that up to know which bug to associate the data with.

EDIT, as requested, this perl script is called from the post-commit hook:

$url = `svnlook log -r $ARGV[1] $ARGV[0]`;

# check the string contains the matching regexp, 
# quit if it doesn't so we don't waste time contacting the webserver
# this is the g_source_control_regexp value in mantis.

exit 1 if not $url =~ /\b(?:bug|issue|mantis)\s*[#]{0,1}(\d+)\b/i;


$url = $url . "---\nSVN Revision: " . $ARGV[1];
$url = $url . "\n" . `svnlook dirs-changed -r $ARGV[1] $ARGV[0]`;

#urlencode the string
$url =~ s/([^\w\-\.\@])/$1 eq " "?"+":  sprintf("%%%2.2x",ord($1))/eg;

print "log=$url";

exit 0;

this writes to the postcommit_mantis.txt file which is sent to Mantis via curl:

d:\tools\curl -s -d user=svn -d @c:\temp\postcommit_mantis.txt http://<server>/mantis/core/checkincurl.php
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文