您集成了 Mantis 和 Subversion 吗?

发布于 2024-07-05 15:06:25 字数 440 浏览 5 评论 0 原文

我主要做 Windows 开发。 我们使用 MantisSubversion 用于我们的开发,但它们没有集成在一起,事实上它们位于不同的服务器上。

我做了一些关于将两者集成在一起的谷歌搜索,发现了 这篇文章。 看起来很有趣。

我想知道是否有人正在这样做或已经这样做了,以及您的经验是什么。 如果您有不同的解决方案,我也有兴趣知道!

谢谢!

I do mostly Windows development. We use Mantis and Subversion for our development but they aren't integrated together, in fact they are on different servers.

I did a little googling about integrating the two together and came across this post. It looked interesting.

I was wondering if anyone is doing this or has done this and what your experience has been. If you've got a different solution, I'd be interested in knowing that too!

Thanks!

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

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

发布评论

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

评论(6

同尘 2024-07-12 15:06:25

我将 Mantis 与 SVN 结合使用。 正如该链接所说,尽管我将正则表达式放在提交后,所以如果提交消息不相关,它不会尝试更新错误,这使得非错误更新提交的响应速度稍快一些。

我的 Mantis 安装也在不同的服务器上。 我使用 curl调用Mantis 1.1.6中的php方法。

将其放入 post-commit.cmd 挂钩中(您需要下载 strawberry perl 并获取 perl.exe 和 perl510 .dll,你不需要其余的)

c:\tools\perl c:\tools\mantis_urlencode.pl %1 %2  > c:\temp\postcommit_mantis.txt
if %ERRORLEVEL% NEQ 0 exit /b 0

c:\tools\curl -s -d user=svn -d @c:\temp\postcommit_mantis.txt http://swi-sgi-l-web1.ingrnet.com/mantis/core/checkincurl.php

并将其放入 mantis_urlencode.pl

$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 . "\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;

如果你想从 VSS 迁移,有很多脚本,包括我在 codeplex

一切都很好,我们一直在使用它,而且它的速度足够快,以至于我们没有注意到它的存在。 只需输入“Fixed Mantis #1234”,它就会解决该错误并为其添加错误注释。 该脚本还将修改的目录添加到错误注释中(我尝试显示更改的文件,但太多不利于理解)

I use Mantis with SVN. Pretty much as that link says, though I put the regexp in the post-commit so it doesn't try to update the bug if the commit message is not relevant, that makes non-bug-updating commits respond slightly faster.

My Mantis install is on a different server too. I use curl to call the php method in Mantis 1.1.6.

Put this in your post-commit.cmd hook (you'll need to download strawberry perl and grab perl.exe and perl510.dll from it, you don't need the rest)

c:\tools\perl c:\tools\mantis_urlencode.pl %1 %2  > c:\temp\postcommit_mantis.txt
if %ERRORLEVEL% NEQ 0 exit /b 0

c:\tools\curl -s -d user=svn -d @c:\temp\postcommit_mantis.txt http://swi-sgi-l-web1.ingrnet.com/mantis/core/checkincurl.php

and put this in mantis_urlencode.pl

$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 . "\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;

If you want to migrate from VSS, there are a load of scripts, including one I wrote on codeplex.

It all works well, we use it all the time, and its quick enough not to notice its there. Just type "Fixed Mantis #1234" and it resolves the bug and adds a bugnote to it. The script also adds the directories that were modified to the bugnote too (I tried showing changed files but too many detract from easy understanding)

心舞飞扬 2024-07-12 15:06:25

我们使用 scmbug 将 SVN 链接到 Bugzilla 已经有一段时间了。 工作得很好,直到我们最近升级到 Bugzilla 3.2,这破坏了集成。 当 SCM 工具的新版本发布时,scmbug 团队需要一段时间才能跟上,这是可以理解的。

We've used scmbug for quite some time to link SVN to Bugzilla. Worked very well until we upgraded to Bugzilla 3.2 recently, which broke the integration. It takes a little while for the scmbug team to catch up when new releases of the SCM tools come out, which is understandable.

美煞众生 2024-07-12 15:06:25

这是我们使用的 Subversion 提交后脚本。 它使用 PHP 运行 Mantis 签入 PHP 脚本,如 此链接

Here's the Subversion post-commit script we use. It uses PHP to run the Mantis checkin PHP script as suggested in this link in the original post.

梦屿孤独相伴 2024-07-12 15:06:25

我遇到了 scmbug。 看起来它将把 Mantis 之类的东西连接到 Subversion 之类的东西上。

I came across scmbug. Looks like it will hook up things like Mantis to things like Subversion.

无戏配角 2024-07-12 15:06:25

我们按照您的链接中的步骤操作 - 唯一的区别是在 Windows 上您有 post-commit.bat。 如果您向下滚动,就会有人发布示例。 我们修改了它,以便它记录更改的文件以及更改它们的人 - 对批处理文件的相当简单的破解。 我们尝试在某一时刻包含差异 - 但很快就很明显,由于某些签入的大小,这样做是一个坏主意。

它工作得非常好,我真的很高兴 - 现在我必须将我们所有的 Sourcesafe 东西转移到...

We followed the steps in your link - the only difference is that on Windows you have post-commit.bat instead. If you scroll down someone posts a sample. We modified that so it logs the files changed and who changed them - a fairly easy hack to the batch file. We tried including the diffs at one point - but it was obvious pretty quickly that doing that is a bad idea because of the size of some checkins.

It works really well and I'm really happy - now I have to move all our Sourcesafe stuff across...

情痴 2024-07-12 15:06:25

我个人在本地开发环境中使用 VisualSVN Server 和公共 Mantis 错误跟踪器来使用私有 SVN 存储库。 我必须稍微更改 checkin.php 文件以处理来自网络服务器的调用(借助此网页: http://www.mantisbt.org/bugs/view.php?id=8847

我制作了一个简短的 C# 控制台应用程序来处理这个问题,而不是批处理文件,所以它更具可配置性,支持远程或本地 checkin.php 文件。

如果您有兴趣,我已经在我的博客上发布了一篇关于此问题的文章,其中包含源代码: http://mp4m.org/blog/svn-and-mantis-bug-tracker-integration/

希望有帮助!

I am personally using a private SVN repository on my local development environment using VisualSVN Server and a public Mantis bug tracker. I had to change the checkin.php file a bit to handle calls from a web server (with help of this web page: http://www.mantisbt.org/bugs/view.php?id=8847)

I have made a short C# console application to handle this instead of a batch file, so it is more configurable and supports remote or local checkin.php files.

I have posted an article about this on my blog with the source code if you are interested: http://mp4m.org/blog/svn-and-mantis-bug-tracker-integration/

Hope that helps!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文