Re: [viewvc-dev] Re: [viewvc-users] Don't display binary files

"C. Michael Pilato" <[email protected]> Thu, 20 Nov 2008 11:18:58 -0500
Newsgroups gmane.comp.version-control.cvs.viewcvs.devel
Organization CollabNet, Inc.
Message-ID <49258DF2.4060301__26250.3903978088$1227198176$gmane$org@collab.net>
JJ wrote:
> Here's another patch (including the last patch in it) that adds a config
> option prefer_markup_no_mime_type.  You can rename the variable, but
> this allows someone to decide whether files should be marked up if no
> mime type can be found.  For example, Java .properties files won't have
> a mime type, but we still want them marked up.

Okay, the number of MIME-type related options in tending towards being out
of hand.  The solution for that specific case is simple:  add a mime.types
file entry for .properties files that maps to text/plain.  This is, in fact,
the recommended solution for all such problems today save one -- files that
have no extension (README, COPYING, INSTALL, etc.).  The primary UI for
ViewVC is a web browser, for crying out loud -- let's just state outright
that files with no mime-type always prefer markup than further proliferate
mime-type related options.

I guess one semi-acceptable alternative would be teach text_mime_types to
recognize a "special" value that means mime-type-less-files ("NONE", or
something).

-- 
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)

iD8DBQFJJY3yokEGqRcG/W4RAkS3AJ9ggMGAlioI4xiHotOSjewJe9RPXQCgsp2h
TLfC7QG7wEsA/RMoU4D+Mx4=
=DHUb
-----END PGP SIGNATURE-----