Knight of the round table

          wansong

          codeStriker(及與svn、bugzilla集成)使用過程記錄

           

          codeStriker使用過程介紹

          參考資料:

          一、      服務器端的安裝

          1 http://sourceforge.net/project/showfiles.php?group_id=41136&package_id=33315下載適合你操作系統的codestriker-1.9.8

          2 下載完后,直接解壓到目錄下(D:"codestriker-1.9.8

          3 建議參考D:"codestriker-1.9.8"html" codestriker.pdf 進行配置,這個文檔說得比較詳細;

          4 創建數據庫,以mysql為例:

              C:">mysql -uroot -p

          mysql>CREATE DATABASE codestrikerdb;

          mysql>GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, DROP, REFERENCES ON codestrikerdb.* TO codestriker@localhost IDENTIFIED BY 'cspasswd';

          mysql>FLUSH PRIVILEGES;

          4 配置你的codestriker主要修改D:"codestriker-1.9.8"codestriker.conf

             mysql數據庫為例,配置如下:

             $db = 'DBI:mysql:dbname=codestrikerdb';

             $dbuser = 'codestriker';

             $dbpasswd = 'cspasswd';

          配置你的發送email地址:

             $mailuser = 'your_email_adress';

          $mailpasswd = ' your_email_password';

          5 配置Source Code Hightlighting:

             安裝highlight-setup-2.7.exe,并修改D:"codestriker-1.9.8"html" codestriker.conf如下:

             $highlighter = 'D:/Program Files/WinHighlight/highlight.exe';

          6 svn集成配置如下:

              @valid_repositories =

              (

               'svn:file:///D:/svnroo',

          );

          $repository_name_map =

          {

              'svn:http://localhost/svn;svn_username;svn_userpassword' => 'ProjectName Subversion'

          };

          注:http://localhost/svn 這個是你svnapache里配置的url

          7bugzilla集成配置如下,即你bugzilla的數據庫信息:

              $bug_db_host = 'localhost';

          $bug_db_name = 'bugs';

          $bug_db_password = 'bugs_password';

          $bug_db_dbname = 'bugs';

          8 apache集成配置如下:

          <Directory "D:/codestriker-1.9.8/cgi-bin/">

             AllowOverride All

             Options ExecCGI

             Order allow,deny

             Allow from all

             SetHandler cgi-script

          </Directory>

          <Directory "D:/codestriker-1.9.8/html/">

             AllowOverride None

             Allow from all

          </Directory>

              ScriptAlias /codestriker/ "D:/codestriker-1.9.8/cgi-bin/"

              Alias /codestrikerhtml/ "D:/codestriker-1.9.8/html/"

          配置基本完成,在瀏覽器打開http://localhost/codestriker/codestriker.pl,即可瀏覽。

          二、      使用

          創建一個topic(如圖1):

          三、      svnbugzilla集成(修改svn代碼,提交后,自動創建toptic,并與相應的bug關聯)

          post-commit-codestriker.pl 放在D:"codestriker-1.9.8"bin目錄下,并修改此文件如下:

          根據如上配置信息,創建reviewers.txt文件,及內容如下:

          注:這個值是你在創建project(創建projecturl http://localhost/codestriker/codestriker.pl?action=create_project)后在創建toptic的頁面(創建topicurlhttp://localhost/codestriker/codestriker.pl?action=create)上Project的選項值,如果是第二個選項就是2

           

          然后,在你svn的倉庫根目錄下的hooks目錄,創建一個適合你操作系統的批處理文件,以windows為例:post-commit.bat,其內容如下:

          set REPOS=%1

          set REV=%2

          D:/codestriker-1.9.8/bin/post-commit-codestriker.pl %REPOS% %REV%


          配置完成,
          啟動svn服務器(相關命令:svnserve -d -r D:"svnroo)和apache服務器,在svn客戶端,修改文件,提交到svn服務器,就會自動生成一個topic(打開這個url可以查看到),并在bugzilla里的相應bug里看到相應comment

          注:提交代碼的格式必須如下,因為這是我post-commit-codestriker.pl定義的格式:

          Bug 1:

          注釋

          1就是你在bugzilla里,想關聯的bug號。

          posted on 2009-04-03 09:30 w@ns0ng 閱讀(3803) 評論(0)  編輯  收藏 所屬分類: J2EE

          My Links

          Blog Stats

          常用鏈接

          留言簿(2)

          隨筆檔案

          文章分類

          文章檔案

          收藏夾

          Others' blog link

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 石渠县| 桦南县| 隆安县| 贡山| 泰和县| 肥西县| 宁晋县| 九台市| 化州市| 五原县| 固始县| 罗江县| 亚东县| 陵水| 南投县| 灯塔市| 湖州市| 嘉善县| 黎城县| 玉田县| 乌鲁木齐市| 武功县| 洪雅县| 湘乡市| 依安县| 绥中县| 元谋县| 成武县| 内丘县| 当阳市| 农安县| 南江县| 平泉县| 广饶县| 哈密市| 星子县| 夹江县| 巴青县| 咸阳市| 屏东市| 繁昌县|