使用CVSHistory查询CVS访问历史(与CVSWeb集成)

    技术2022-05-11  52

    作者:龚云卿 2007年2月14日

    作为CVS历史的查询工具,CVSHistory与CVSWeb集成是一个最佳的选择。我用过CVSTrac中的时间线,发现速度和记录的内容都与CVSHistory无法相比。下面介绍CVSHistory的安装方法。

    1)将cvshistory-2.2.tar.tar解压,然后将cvshistory.cgi和cvshistory.conf复制到cvsweb.cgi所在目录。我这里的位置是:/web/apache/cgi-bin/cvsroot/。因为我使用了多仓库的CVSWeb,所以在cgi-bin下添加了对应仓库名称的目录cvsroot,仓库路径为/cvs/cvsroot/。

    2)修改cvshistory.cgi将CONFIGFILE = "/path/to/cvshistory.conf"改为下面的内容:CONFIGFILE = "/web/apache/cgi-bin/cvsroot/cvshistory.conf"

    3)修改cvshistory.conf找到下面内容HISTORY = {    '':         "/home/cvsroot/CVSROOT/history",}修改其中的"/home/cvsroot/CVSROOT/history"为"/cvs/cvsroot/CVSROOT/history"

    修改SCRIPTPATH = "viewcvs.cgi"为SCRIPTPATH = "cvsweb.cgi"

    根据需要修改cvshistory检索结果每页显示数量,我将PERPAGE = 20改为PERPAGE = 50

    4)修改cvsweb.cgi找到下面的内容:print "<p>Current tag: <b>", $input{only_with_tag},"</b></p>/n"                    if $input{only_with_tag};在其后添加:print "<a href=/"$urlpath/cvshistory.cgi/">";                print "CVS History</a>/n"

    这样cvsweb页面上会显示cvshistory的链接。

    这样可以使用了,通过打开CVSWeb页面,看到CVS History的链接。多个仓库先参考《为多个仓库配置登录访问的CVSWeb》,然后按上述方法安装CVSHistory进行。


    最新回复(0)