ViewCVS 에 MySQL 연동 문의

단풍의 이미지

OS : RHEL4

ViewCVS 버전은 1.0-dev 개발 버전입니다.
http://cvs.sourceforge.net/viewcvs.py/viewcvs/viewcvs/

ViewCVS 에 MySQL 연동 할려면 어떻게 하나요?

제가 작업 내용은 아래와 같습니다.

--- make-database.orig  2005-05-31 04:45:42.000000000 +0900
+++ make-database       2005-06-01 17:34:46.000000000 +0900
@@ -38,7 +38,7 @@

 DROP TABLE IF EXISTS branches;
 CREATE TABLE branches (
-  id mediumint(9) DEFAULT '0' NOT NULL auto_increment,
+  id mediumint(9) NOT NULL auto_increment,
   branch varchar(64) binary DEFAULT '' NOT NULL,
   PRIMARY KEY (id),
   UNIQUE branch (branch)
@@ -69,7 +69,7 @@

 DROP TABLE IF EXISTS descs;
 CREATE TABLE descs (
-  id mediumint(9) DEFAULT '0' NOT NULL auto_increment,
+  id mediumint(9) NOT NULL auto_increment,
   description text,
   hash bigint(20) DEFAULT '0' NOT NULL,
   PRIMARY KEY (id),
@@ -78,7 +78,7 @@

 DROP TABLE IF EXISTS dirs;
 CREATE TABLE dirs (
-  id mediumint(9) DEFAULT '0' NOT NULL auto_increment,
+  id mediumint(9) NOT NULL auto_increment,
   dir varchar(255) binary DEFAULT '' NOT NULL,
   PRIMARY KEY (id),
   UNIQUE dir (dir)
@@ -86,7 +86,7 @@

 DROP TABLE IF EXISTS files;
 CREATE TABLE files (
-  id mediumint(9) DEFAULT '0' NOT NULL auto_increment,
+  id mediumint(9) NOT NULL auto_increment,
   file varchar(255) binary DEFAULT '' NOT NULL,
   PRIMARY KEY (id),
   UNIQUE file (file)
@@ -94,7 +94,7 @@

 DROP TABLE IF EXISTS people;
 CREATE TABLE people (
-  id mediumint(9) DEFAULT '0' NOT NULL auto_increment,
+  id mediumint(9) NOT NULL auto_increment,
   who varchar(32) binary DEFAULT '' NOT NULL,
   PRIMARY KEY (id),
   UNIQUE who (who)
@@ -102,7 +102,7 @@

 DROP TABLE IF EXISTS repositories;
 CREATE TABLE repositories (
-  id mediumint(9) DEFAULT '0' NOT NULL auto_increment,
+  id mediumint(9) NOT NULL auto_increment,
   repository varchar(64) binary DEFAULT '' NOT NULL,
   PRIMARY KEY (id),
   UNIQUE repository (repository)

shell> ./make-database
This script creates the database and tables in MySQL used by the ViewCVS
checkin database. You will be prompted for: database user, database user
password, and database name. This script will use mysql to create the
database for you. You will then need to set the appropriate parameters
in your viewcvs.conf file under the [cvsdb] section.

MySQL User: 유저
MySQL Password: 비빌번호
ViewCVS Database Name [default: ViewCVS]: ViewCVS

Database created successfully.

shell> mysql ViewCVS
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1297291 to server version: 4.1.11-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show tables;
+-------------------+
| Tables_in_ViewCVS |
+-------------------+
| branches          |
| checkins          |
| descs             |
| dirs              |
| files             |
| people            |
| repositories      |
| tags              |
+-------------------+
8 rows in set (0.00 sec)

mysql>

shell> ./cvsdbadmin
Usage: ./cvsdbadmin <command> [arguments]
Preforms administrative functions for the CVSdb database
Commands:
  rebuild <repository>            rebuilds the CVSdb database
                                  for all files in the repository
  update <repository>             updates the CVSdb database for
                                  all unrecorded commits

shell> ./cvsdbadmin rebuild /home/CVS
Traceback (most recent call last):
  File "./cvsdbadmin", line 122, in ?
    db = cvsdb.ConnectDatabase()
  File "/home/web/junghyun/project/lib/cvsdb.py", line 666, in ConnectDatabase
    gCheckinDatabase.Connect()
  File "/home/web/junghyun/project/lib/cvsdb.py", line 76, in Connect
    self.db = dbi.connect(
  File "/home/web/junghyun/project/lib/dbi.py", line 66, in connect
    return MySQLdb.connect(host=host, user=user, passwd=passwd, db=db)
  File "/usr/lib/python2.3/site-packages/MySQLdb/__init__.py", line 64, in Connect
    return apply(Connection, args, kwargs)
  File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 116, in __init__
    self._make_connection(args, kwargs2)
  File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 41, in _make_connection
    apply(super(ConnectionBase, self).__init__, args, kwargs)
TypeError: connect() argument 3 must be string, not int

viewcvs.conf db 부분

#---------------------------------------------------------------------------
[cvsdb]

enabled = 1
host = localhost
database_name = ViewCVS
user = 유저
passwd = 비밀번호
readonly_user = 유저
readonly_passwd = 비밀번호
row_limit = 1000

위와 같이 에러가 나는대 MySQL 4.1.x 에 ViewCVS 연동해 보신분 계신가요?

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.