Re: turning on the viewcvs query feature



Ross Golder wrote:

On Mon, 2005-03-14 at 18:25 +0800, James Henstridge wrote:
Now that Ross has set up Bonsai, it would be nice to turn on the query database feature. While it provides similar functionality to bonsai's query page, it has the benefit of being more tightly integrated with the rest of viewcvs.

The main steps to get it enabled are:

1. update viewcvs from CVS. This can be done by performing a checkout of the viewcvs-web module somewhere, and running the command "./viewcvs-install --prefix=/usr/local/www/viewcvs-web", and then follow the prompts (if it asks, choose to overwrite existing files).

2. install the MySQL-python package (Python bindings for MySQL).

3. edit the /usr/local/www/viewcvs-web/viewcvs.conf file's [cvsdb] section, and fill in host, database_name, readonly_user and readonly_password. The "enabled" setting should be set to 1. The user account only needs read-only access to the bonsai checkin database.

That should be all that's needed to turn it on. There should be a "Query revision history" link at the top of each directory listing page in viewcvs, which will take you to the query form.


All done, but on submitting the query form, I'm getting a python
stacktrace :(
It looks like viewcvs depends on the newer version of the MySQL python bindings. I've checked in a small patch that should fix the problem.

Currently we maintain the viewcvs conf file in CVS, so it would be nice if the changes to the [cvsdb] section could be merged back in. I don't think there is much of a problem having the password in CVS because:
- the database user account only needs read access.
- the account could be limited to logins from cvs.gnome.org.
- all the information in the checkin database is publicly available in the CVS repository.


Sure, but I don't understand why the database information would need to
be merged back into CVS. Also, I don't see a viewcvs.conf in the
directory. Did you mean the viewcvs.conf.dist file?

http://cvs.gnome.org/viewcvs/viewcvs-web/
Yeah. I've been making the customisations in viewcvs.conf.dist (which viewcvs-install copies to viewcvs.conf). This makes it trivial to merge in changes from upstream.

When installing a new version of viewcvs, we generally overwrite all the old files, so it would be a pain to have to make the changes post-install every time.

James.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]