【问题标题】:SVN Reporting in ASP.NetASP.Net 中的 SVN 报告
【发布时间】:2008-11-14 07:43:14
【问题描述】:

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

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

【问题讨论】:

    标签: asp.net visualsvn visualsvn-server


    【解决方案1】:

    还有SharpSvn 封装了整个Subversion 1.5 客户端API。它在 Apache 2.0 许可下获得许可,并且来自 CollabNet。

    【讨论】:

      【解决方案2】:

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

      【讨论】:

        【解决方案3】:

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

        我在提交后挂钩中使用它来将所有文件的更改发送到我的 bugtracker,因此它可以显示哪些文件在给定修订号的情况下发生了更改。我在日志中添加了一个特定的文本,它会选择该文本以了解将数据与哪个错误相关联。

        编辑,根据要求,这个 perl 脚本是从 post-commit 钩子调用的:

        $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
        

        【讨论】:

        • 你能分享你使用的脚本吗?
        猜你喜欢
        • 1970-01-01
        • 2011-02-20
        • 1970-01-01
        • 2020-01-13
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多