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

Re: Classifying files as binary or text

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 18 Nov 2009 16:42:24 +0000

On Sat, 2009-11-14 at 14:57 +0100, B Smith-Mannschott wrote:
> On Sat, Nov 14, 2009 at 02:10, Julian Foad <julianfoad_at_btopenworld.com> wrote:
> > On Fri, Nov 13, 2009 at 08:30:53AM +0100, B. Smith-Mannschott wrote:
> >> We've got lots of XML files in our repository. Some of them make sense
> >> to merge (Maven's pom.xml) and some do not (UML models stored in XMI
> >> format).
> >
> > Should those two types of files have the same MIME type? If so,
> > certainly you have that problem, but I suspect they should not. If you
> > choose to label them both as plain XML (text/xml? can't remember), then
> > I think it is fair that tools should handle them in the same way.
> Julian, the fragment you replied to was incomplete. The original continued thus:
> >> Currently, I use the hack of declaring the human-editable XML's to be
> >> text/xml, and the others as application/xml.
> >>
> >> I'd much rather use the
> >> more canonical application/xml, considering that we serve our
> >> repository over https.
> >>
> >> It would be idiotic to have to specify
> >> 'charset' in this case because XML *already carries it's charset
> >> internally*. I don't like to repeat myself while programming; that
> >> just breeds contradictions.

BTW, belated thanks for pointing that out. I re-read that when you
posted this message and although it swayed my original thinking it
doesn't change the fact that I still think detecting the existing
content indications (svn:mime-type, maybe filename, maybe content bytes,
maybe other props) should be the primary mechanism, with a dedicated
prop as a special override for special cases.

- Julian

Received on 2009-11-18 17:42:48 CET

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