[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Textual binaries

From: Rob Oxspring <roxspring_at_imapmail.org>
Date: 2004-07-30 21:16:40 CEST

Ben Collins-Sussman wrote:
> On Fri, 2004-07-30 at 13:15, Bill Wohler wrote:
>
>>I've got this JNLP file which is XML but I've marked its mime-type as
>>application/x-java-jnlp-file so that the browser will launch Java Web
>>Start. However, now I get this when I try to diff the file:
>>
>> Index: jws/Foo.jnlp
>> ===================================================================
>> Cannot display: file marked as a binary type.
>> svn:mime-type = application/x-java-jnlp-file
>>
>>Any way to convince Subversion that this particular type is actually
>>text and let me diff it? Or is this an RFE?
>
>
> Subversion has an internal list of mime-types that it thinks are
> textual: text/*, and a few others. Otherwise it assumes that any other
> mime-type is binary, and un-diffable.
>
> I suppose you could lobby to add "application/x-java-jnlp-file" to that
> internal list of text-types, but I suspect that won't go over very
> well. :-)
>
> The long-term solution, I suspect, is to allow the client's run-time
> 'config' file to define a custom list of textual mime-types.
>

Why not add an extra property svn:text to indicate once and for all
whether a file is to be treated as text or not. The algorithm would become:

if svn:text is set
        treat as svn:text value
else if mimetype looks like text
        treat as text
else
        treat as binary

This would finally stop svn conflating the two questions "is the file
text based?" and "what's the mime-type", while keeping the current
heuristic as a backup. It also means that the configuration is server
side from the beginning and doesn't need users to change their config
files to get the benefit. If people want to set it using auto-props
they can do.

It has a side effect that the option can be configured on a file by file
  basis, but I'm not 100% sure that this is a bad thing anyway.

Just a thought,

Rob

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jul 30 21:17:16 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.