51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 3889|回复: 4
打印 上一主题 下一主题

[原创] CVS与Mantis集成的问题

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2007-4-12 09:43:56 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
sdlkfj7 最近在使用Mantis,这个缺陷跟踪工具不错,细读了其说明书,发现可以与CVS集成,但是相关的集成方法介绍的章节比较少. 其中提到了commitinfo这个文件,我在CVS中没有找到,也不知何如配置.我是在windows XP装的服务,请了解的给我一些启发,谢谢!
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2007-4-17 11:25:37 | 只看该作者
要集成Mantis和SVN,需要几个工具:

SVN客户端,有个windows下的很不错的工具,TortoiseSVN,完全集成在explorer里,下载地址: http://tortoisesvn.net/

SVN服务端,这个应该都有吧。

Mantis缺陷跟踪系统,用php开发。轻量级的缺陷跟踪系统。 http://www.mantisbt.org/

首先先在TortoiseSVN里设置一下项目的属性,右键点击目录,属性,在subversion一栏里,加入这几个属性

bugtraq:label = issue
bugtraq:url = http://<mantisserver>/mantis/view.php?id=%BUGID%
bugtraq:message = issue %BUGID%
bugtraq:warnifnoissue = true

到对应的SVN版本库里,找到hooks目录,建立一个post-commit.bat文件,将以下内容拷入:

REM Post-commit hook for MantisBT integration
SET REPOS=%1
SET REV=%2
SET DETAILS_FILE=E:\svnrepo\log\svnfile_%REV%
SET LOG_FILE=E:\svnrepo\log\svnfile_%REV%_Log
set APR_ICONV_PATH=F:\software\svn-win32-1.4.2\iconv
set path=%path%;e:\software\php;F:\software\svn-win32-1.4.2\bin;


echo ****** Source code change ******>>%DETAILS_FILE%
svnlook log -r %REV% %REPOS%>>%DETAILS_FILE%
echo SVN Revision:%REV%>>%DETAILS_FILE%
svnlook diff -r %REV% %REPOS%>>%DETAILS_FILE%

php.exe E:\www\mantis\core\checkin.php <%DETAILS_FILE% >%LOG_FILE%
DEL %DETAILS_FILE%
DEL %LOG_FILE%

最后,修改mantis安装目录下的config_inc.php,加入以下内容(mantis系统里要有SVN用户):

$g_source_control_notes_view_status = VS_PUBLIC;
$g_source_control_account = 'SVN';
$g_source_control_set_status_to = OFF;
$g_source_control_regexp = "/\bissue [#]{0,1}(\d+)\b/i";

完成这些步骤后,就可以在SVN提交新版本时,同时发布内容到对应的缺陷跟踪系统了。

比如,修改了一个源文件,svn commit时,在右上的issue栏目里输入要提交到的具体的 issue/bug  编号,然后在下面的message框内输入具体的描述,svn的hook就会自动往mantis里对应的条目里写入你提交时输入的这些内容。




Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1510684
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2007-4-17 11:32:12 | 只看该作者
About CVS
CVS (Concurrent Versions System) is a tool used by many software developers to manage changes within their source code tree. CVS provides the means to store not only the current version of a piece of source code, but a record of all changes (and who made those changes) that have occurred to that source code. Use of CVS is particularly common on projects with multiple developers, since CVS ensures changes made by one developer are not accidentally removed when another developer posts their changes to the source tree.

Information about accessing this CVS repository may be found in our document titled, "CVS (Version Control for Source Code)".

In order to access a CVS repository, you must install a special piece of software called a CVS client. CVS clients are available for most any operating system. Information about CVS client software may be found in our document titled, "Recommended User Software Configuration".



Anonymous CVS Access

This project's SourceForge.net CVS repository can be checked out through anonymous (pserver) CVS with the following instruction set. The module you wish to check out must be specified as the modulename. When prompted for a password for anonymous, simply press the Enter key. To determine the names of the modules created by this project, you may examine their CVS repository via the provided web-based CVS repository viewer.

cvs -d:pserver:anonymous@mantisbt.cvs.sourceforge.net:/cvsroot/mantisbt login

cvs -z3 -d:pserver:anonymous@mantisbt.cvs.sourceforge.net:/cvsroot/mantisbt co -P modulename

Information about accessing this CVS repository may be found in our document titled, "CVS (Version Control for Source Code)".

Updates from within the module's directory do not need the -d parameter.

NOTE: UNIX file and directory names are case sensitive. The path to the project CVSROOT must be specified using lowercase characters (i.e. /cvsroot/mantisbt)



Developer CVS Access via SSH

Only project developers can access the CVS tree via this method. A SSH client must be installed on your client machine. Substitute modulename and developername with the proper values. Enter your site password when prompted.

Project administrators may limit CVS access to this repository using cvs_acls or the CVS access member permissions option. Developers may verify their CVS access status on the admin page for this project.

A significant amount of information about project CVS services may be found in our "CVS (Version Control for Source Code)".

Developers may also make use of shared SSH keys for authentication.

export CVS_RSH=ssh

cvs -z3 -d:ext:developername@mantisbt.cvs.sourceforge.net:/cvsroot/mantisbt co -P modulename

NOTE: UNIX file and directory names are case sensitive. The path to the project CVSROOT must be specified using lowercase characters (i.e. /cvsroot/mantisbt)

这应该对你有些帮助
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2007-4-18 09:15:40 | 只看该作者

感谢云层的帮助

感谢云层的帮助
回复 支持 反对

使用道具 举报

该用户从未签到

5#
发表于 2007-4-29 17:43:18 | 只看该作者
cvs也有缺陷跟踪工具工具,可以和cvs无逢接合,cvstrac呀,干吗不用
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-22 07:46 , Processed in 0.077827 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表