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

Re: Bug report: The auto-props setting of svn:mime-type is impossible to avoid.

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Sun, 4 Oct 2015 12:35:08 +0300

On 2 October 2015 at 11:06, Edward d'Auvergne <true.bugman_at_gmail.com> wrote:
> Hi all,
> I was wondering if this should be considered a bug. At the FlightGear
> project we have a 6 GB data svn repository for aircraft (
> https://sourceforge.net/projects/flightgear/ ,
> https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/ ). A large
> quantity of the files, almost 30,000 in number, are XML text files.
> The problem is that modern Subversion clients appear to all be using
> libmagic to determine the file type, to then set the svn:mime-type
> property. However this is rather problematic:
> $ file -ib Aircraft/747-400/747-400-set.xml
> application/xml; charset=us-ascii
> Libmagic detects all these XML files as "application/xml". Hence they
> are treated as binary files! There are many other text files with
> extensions such as *.ac, *.nas, etc. present in the repository that in
> the future might be detected by libmagic as "application/xyz".
Easy fix would be change svn_mime_type_is_binary() to consider
'application/xml' as text file. We can also extend for other specific
application/* mimetypes that are text files. We already have special
handling for 'image/x-xbitmap' to consider it as text file.

Does it make sense?

Ivan Zhakov
Received on 2015-10-04 11:35:39 CEST

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.