Re: [viewvc-dev] Re: [viewvc-users] Don't display binary files
"C. Michael Pilato" <[email protected]> Mon, 24 Nov 2008 10:41:11 -0500
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.devel |
|---|---|
| Organization | CollabNet, Inc. |
| Message-ID | <[email protected]> |
JJ wrote: > Please let me know if there is anything else I can do to move this patch > forward. "This patch" is becoming a very fluid concept. :-) I need to back up a bit here -- get back to the driving goals. Please, do, walk with me. As I understand it, there's a primary goal here: Don't show binary garbage in the Markup view. And a secondary goal: Don't show links for views which are likely to be errorful when followed (diffs of binary files, annotations of binary files, etc.) [Stop me here if the goals are different, or ordered differently] To accomplish the first goal without expensive heuristic human-readability calculations, and using a baseline of what ViewVC already offers today, we decided we needed to know what MIME types were textual. That we can achieve with exactly one new configuration option: text_mime_types = [list of text MIME types, with wildcard support] "prefer_markup" is defined today to be true for text files and web-friendly image formats (GIF, JPEG, PNG). We needn't change that at all to meet that first goal. But it doesn't make sense to view annotations or diffs of image files, so the prefer_markup thing makes for an unreliable way of deciding whether to display links to those views for image files. The only clean, not-configuration-complicating solution I can come up with is to add "is_text" (alongside "prefer_markup") to the set of data dictionary items for the files. -- 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) iD8DBQFJKssXokEGqRcG/W4RApR4AJsE9M3kZNKPVnDaDuKqckpMyYFpuQCfSI6r rhu3LBljQCcR6kEw347YNlU= =/2th -----END PGP SIGNATURE-----