Re: [viewvc-dev] [PATCH] Hide query link (and RSS feeds) when database does not have the root

"C. Michael Pilato" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.devel
Organization CollabNet, Inc.
Message-ID <[email protected]>
Larry Shatzer, Jr. wrote:
> We have quite a few CVS and Subversion repository roots, and not all 
> have their information in the query database. To avoid confusion, I have 
> modified my local install of ViewVC to hide the query link (and RSS 
> feeds) for repository roots that do not have the database backing them. 
> If needed, I can create an issue and post this there instead.

Larry, thanks for tackling this.  I've been bothered by this situation, too 
(just apparently not bothered enough to fix it).

I like the general approach you've taken, but would make some suggestions:

First, rather than adding a 'querydb_populated' data dictionary item, just 
set the existing 'queryform_href' and 'rss_href' items to None if, due to 
the commits database not being populated for the relevant roots, those links 
would take a user to an errorful page anyway.  In doing so, you avoid adding 
yet another few bytes to the data dictionary, but more importantly, you keep 
the template logic simpler (and I suspect unchanged entirely).

Secondly, it appears (by visual inspection, anyway) that your patch would 
raise an exception on installations where the commits database isn't 
configured for use at all in viewvc.conf.

Care to address these issues and resubmit the patch?  Thanks!

(By the way, I've filed issue #357 to track this.)

-- 
C. Michael Pilato <[email protected]>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIWpNdokEGqRcG/W4RAnpYAKCc4TqvP+IYpJmee1mW/VOpg0Z+0QCgn4dE
GY5uKz1G84MStObGAIl6A5w=
=r9Yo
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.