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

Re: Ascii/binary detection.

From: Branko Čibej <brane_at_xbc.nu>
Date: 2001-08-01 22:53:31 CEST

Jacek Prucia wrote:

>I think Subversion schould consider only Content-Type group, and safely
>ignore everything after slash, so:
>
>svn:mime-type = "application/*" -> binary file
>svn:mime-type = "image/*" -> binary file
>svn:mime-type = "text/*" -> text file
>
I don't think so. What I mean is, later on we'll add client-side plugins
that will be triggered off of the full content type, so we have to store
the full type in the props.

Of course, right now all we can say is: "text/*" is text, enything else
is binary.

>svn:mime-type = unknown|missing -> set svn:mime-type to
>"application/octet-stream" -> binary file just to be safe :)
>
Absolutely.

>Back to discussion on mime-types:
>
>Branko noted some time ago, that if we want to relay on some mime-types
>file, we have to be sure that server and client uses the same file. This
>seems a little bit complicated and not that easy to implement. However,
>there seems to be other solution.
>
>During initial checkin some files might have svn:mime-type set, some not.
>Subversion client will transfer all files that don't have svn:mime-type set
>(or that have unknown value) as application/octet-stream, but *without*
>touching svn:mime-type property. Server upon recieving file checks it's
>svn:mime-type. If it's still not set, then server fills it up with some
>value (using mime-types file), so during first checkout all files have
>svn:mime-type set to some value. If user isn't happy with what server just
>did - he can use svn propset.
>
>That way we have central mime-types management, and users can set
>svn:mime-type if they want to *or* (in case of large initial import) leave
>this decision to Subversion server.
>

I disagree. As a matter of principle, the server should never touch the
contents of a file or its properties.

    Brane

-- 
Brane �ibej
    home:   <brane_at_xbc.nu>             http://www.xbc.nu/brane/
    work:   <branko.cibej_at_hermes.si>   http://www.hermes-softlab.com/
     ACM :   <brane_at_acm.org>            http://www.acm.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:34 2006

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