From owner-freebsd-cvsweb@FreeBSD.ORG  Sun Jan  4 19:43:12 2004
Return-Path: <owner-freebsd-cvsweb@FreeBSD.ORG>
Delivered-To: freebsd-cvsweb@freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 2020016A4CE; Sun,  4 Jan 2004 19:43:12 -0800 (PST)
Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id DE07343D48; Sun,  4 Jan 2004 19:43:05 -0800 (PST)
	(envelope-from bryce1@obviously.com)
Received: from obviously.com (h0010a4e2603c.ne.client2.attbi.com[24.61.43.4])
          by comcast.net (sccrmhc13) with SMTP
          id <20040105034302016008up6ke>; Mon, 5 Jan 2004 03:43:02 +0000
Message-ID: <3FF8DD46.5090501@obviously.com>
Date: Sun, 04 Jan 2004 22:43:02 -0500
From: "Bryce Nesbitt (mailing list account)" <bryce1@obviously.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007
X-Accept-Language: en-us, es, en, de, he
MIME-Version: 1.0
To: =?ISO-8859-1?Q?Ville_Skytt=E4?= <scop@FreeBSD.org>,
	freebsd-cvsweb@freebsd.org
References: <3FB23C1F.6040502@obviously.com>
	<1068661352.4763.72.camel@bobcat.mine.nu> <3FB28082.6070707@obviously.com>
	<1068671035.4763.136.camel@bobcat.mine.nu> <3FBCEA3F.4050106@obviously.com>
	<1069350659.2439.274.camel@bobcat.mine.nu> <3FD3547A.5010400@obviously.com>
	<1070867585.11239.52.camel@bobcat.mine.nu> <3FDF6F74.4070307@obviously.com>
	<1071618494.6993.81.camel@bobcat.mine.nu> <3FEB7626.2030606@obviously.com>
	<1072528568.7528.127.camel@bobcat.mine.nu> <3FEF5E93.8020600@obviously.com>
	<1073247519.9121.183.camel@bobcat.mine.nu>
In-Reply-To: <1073247519.9121.183.camel@bobcat.mine.nu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Subject: Re: Patch to cvsweb?
X-BeenThere: freebsd-cvsweb@freebsd.org
X-Mailman-Version: 2.1.1
Precedence: list
List-Id: CVS Web maintenance mailing list <freebsd-cvsweb.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-cvsweb>,
	<mailto:freebsd-cvsweb-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-cvsweb>
List-Post: <mailto:freebsd-cvsweb@freebsd.org>
List-Help: <mailto:freebsd-cvsweb-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-cvsweb>,
	<mailto:freebsd-cvsweb-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Jan 2004 03:43:12 -0000

I agree that using CVS's "b" (binary) flag is a good hint.

But why hard code the response?  For each combination of binary flag and 
mime type, I might want select allowable diff and download types 
independently:

Diff as:
    text
    colored
    side-by-side
    shape_diff.exe (external)
    exell_diff.exe (external)

Download as:
    Native mime type (e.g. "application/msword")
    As text

The default could be to enable everything except the
external diff utilities.

                -Bryce


Ville Skyttä wrote:

>All true.  Currently I'm thinking about using CVS's keyword expansion
>mode to "detect" whether a file is a text file in the first place (if
>possible everywhere, haven't checked yet).  If a file is checked in
>using the "b" (binary) mode, we treat it as binary and will not offer
>HTMLized view of it, or a regular diff.  On the other hand, if it does
>not have the "b" flag set, we'll show the "(download as text)" link if
>the resolved MIME type is not "text/*", ditto show many diff
>links/options including a "regular diff" link if the file has dedicated
>diff tool(s) but is a text file etc etc, lots of work to do.
>
>>Bryce wrote:
>>The issue is complex.  For an XML file I might want the choice to diff
>>it as a text file, OR
>>use a generic XML diff utility, OR using a specilized utility that
>>understands the content.
>>As a system administrator I might want to prohibit diffing some files
>>as text, because I know
>>the results will be nonsense.
>>    
>>
>  
>

From owner-freebsd-cvsweb@FreeBSD.ORG  Mon Jan  5 12:14:23 2004
Return-Path: <owner-freebsd-cvsweb@FreeBSD.ORG>
Delivered-To: freebsd-cvsweb@freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7DC4116A4CE
	for <freebsd-cvsweb@FreeBSD.org>;
	Mon,  5 Jan 2004 12:14:23 -0800 (PST)
Received: from smtp1.pp.htv.fi (smtp1.pp.htv.fi [212.90.64.119])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A117143D2F
	for <freebsd-cvsweb@FreeBSD.org>;
	Mon,  5 Jan 2004 12:14:21 -0800 (PST)
	(envelope-from scop@FreeBSD.org)
Received: from posti.pp.htv.fi (posti.pp.htv.fi [212.90.64.50])
	by smtp1.pp.htv.fi (Postfix) with ESMTP id 5D1BF7FCED
	for <freebsd-cvsweb@FreeBSD.org>;
	Mon,  5 Jan 2004 22:14:20 +0200 (EET)
Received: from [62.78.131.215] (cs78131215.pp.htv.fi [62.78.131.215])
	/8.11.1) with ESMTP id i05KEJT19212	for <freebsd-cvsweb@freebsd.org>;
	Mon, 5 Jan 2004 22:14:19 +0200 (EET)
From: Ville =?ISO-8859-1?Q?Skytt=E4?= <scop@FreeBSD.org>
To: freebsd-cvsweb@FreeBSD.org
In-Reply-To: <3FF8DD46.5090501@obviously.com>
References: <3FB23C1F.6040502@obviously.com>
	<3FB28082.6070707@obviously.com><3FBCEA3F.4050106@obviously.com>
	<3FD3547A.5010400@obviously.com><3FDF6F74.4070307@obviously.com>
	<3FEB7626.2030606@obviously.com><3FEF5E93.8020600@obviously.com>
	<3FF8DD46.5090501@obviously.com>
Content-Type: text/plain
Organization: FreeBSD
Message-Id: <1073333659.9121.229.camel@bobcat.mine.nu>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) 
Date: Mon, 05 Jan 2004 22:14:19 +0200
Content-Transfer-Encoding: 7bit
Subject: MIME types, links, diff tools (was: Re: Patch to cvsweb?)
X-BeenThere: freebsd-cvsweb@freebsd.org
X-Mailman-Version: 2.1.1
Precedence: list
List-Id: CVS Web maintenance mailing list <freebsd-cvsweb.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-cvsweb>,
	<mailto:freebsd-cvsweb-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-cvsweb>
List-Post: <mailto:freebsd-cvsweb@freebsd.org>
List-Help: <mailto:freebsd-cvsweb-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-cvsweb>,
	<mailto:freebsd-cvsweb-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Jan 2004 20:14:23 -0000

On Mon, 2004-01-05 at 05:43, Bryce Nesbitt (mailing list account) wrote:
> I agree that using CVS's "b" (binary) flag is a good hint.
> 
> But why hard code the response?

Hm... I may have been unclear (or I may be missing something), but I was
not thinking about hardcoding anything in particular.  Except kind of
that for files we know (somehow, possibly using the "b" flag) are
binary, I think it would make sense _not_ to show any "as text",
HTMLified source, regular diff or annotate links since the output would
be a mess anyway.

>   For each combination of binary flag and 
> mime type, I might want select allowable diff and download types 
> independently:
> 
> Diff as:
>     text
>     colored
>     side-by-side

I would not show those difftypes for binary files (again, assuming we
have some robust/consistent way of determining exactly what is a "binary
file").

>     shape_diff.exe (external)
>     exell_diff.exe (external)

These, on the other hand, would be shown for all files that have these
dedicated diff tools set (probably based on the MIME type), no matter if
binary or not.

> Download as:
>     Native mime type (e.g. "application/msword")
>     As text

Again, I would skip the "as text" link if we know the file will most
likely not be viewable as text anyway.

Of course, as a safety measure against detection bugs, there could be a
"sticky" option somewhere for users to choose whether they'd want to see
the "intelligent, detected" set of diff/download/view options, or all of
them.  And probably default that to the "intelligent" set.

Diffing archive contents adds another level of complexity, whether to
use plain "diff -r" or dedicated tools for diffing each file in the
arcive separately, and how to sanely combine the results of different
diff tools if the latter way is chosen.

Thoughts?

From owner-freebsd-cvsweb@FreeBSD.ORG  Mon Jan  5 12:40:05 2004
Return-Path: <owner-freebsd-cvsweb@FreeBSD.ORG>
Delivered-To: freebsd-cvsweb@freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1353A16A4D0
	for <freebsd-cvsweb@freebsd.org>;
	Mon,  5 Jan 2004 12:40:05 -0800 (PST)
Received: from idiom.com (idiom.com [216.240.32.1])
	by mx1.FreeBSD.org (Postfix) with ESMTP id F1AA443D2F
	for <freebsd-cvsweb@freebsd.org>;
	Mon,  5 Jan 2004 12:40:03 -0800 (PST)
	(envelope-from bryce1@obviously.com)
Received: from obviously.com (h0010a4e2603c.ne.client2.attbi.com [24.61.43.4])
	by idiom.com (8.12.9p2/8.12.9) with ESMTP id i05Ke2IM037833
	for <freebsd-cvsweb@freebsd.org>; Mon, 5 Jan 2004 12:40:03 -0800 (PST)
	(envelope-from bryce1@obviously.com)
Message-ID: <3FF9CB74.5000707@obviously.com>
Date: Mon, 05 Jan 2004 15:39:16 -0500
From: Bryce W Nesbitt <bryce1@obviously.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
	rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: freebsd-cvsweb@freebsd.org
References: <3FB23C1F.6040502@obviously.com>
	<3FB28082.6070707@obviously.com><3FBCEA3F.4050106@obviously.com>
	<3FD3547A.5010400@obviously.com><3FDF6F74.4070307@obviously.com>
	<3FEB7626.2030606@obviously.com><3FEF5E93.8020600@obviously.com>
	<3FF8DD46.5090501@obviously.com> <1073333659.9121.229.camel@bobcat.mine.nu>
In-Reply-To: <1073333659.9121.229.camel@bobcat.mine.nu>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Subject: Re: MIME types, links, diff tools
X-BeenThere: freebsd-cvsweb@freebsd.org
X-Mailman-Version: 2.1.1
Precedence: list
Reply-To: bryce1@obviously.com
List-Id: CVS Web maintenance mailing list <freebsd-cvsweb.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-cvsweb>,
	<mailto:freebsd-cvsweb-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-cvsweb>
List-Post: <mailto:freebsd-cvsweb@freebsd.org>
List-Help: <mailto:freebsd-cvsweb-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-cvsweb>,
	<mailto:freebsd-cvsweb-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Jan 2004 20:40:05 -0000

My guess is that diffing archives is a relatively rare operation, and 
not worth too much
work.  My patch took a pragmatic approach:
       Unpack the archive
       Check if any constituent files have a special diff associated 
with them
       If no, then "diff -r".
Before this patch, archives were completely undiffable.  So "diff -r" is 
better than nothing.
I use archives as a method of grouping related files, since CVS can't do 
this itself.

Perhaps more common than archives are compressed files.  "file.doc.bz2" 
probably
is best handled by unpacking it first, then applying the mime type 
detection to the result.

                      -Bryce

Ville Skyttä wrote:

>Diffing archive contents adds another level of complexity, whether to
>use plain "diff -r" or dedicated tools for diffing each file in the
>arcive separately, and how to sanely combine the results of different
>diff tools if the latter way is chosen.
>
>Thoughts?
>