On 04.10.2015 11:35, Ivan Zhakov wrote: > On 2 October 2015 at 11:06, Edward d'Auvergne <true.bug...@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?
Please let's not have that discussion again. A quick search of the archives will show that we've talked this idea to death already. To summarize: To Subversion, "text" implies that you can do textual diff/merge with the contents. With XML, that may sometimes work, but usually won't. And the problem doesn't stop with 'application/xml' because there are literally hundreds of media types for documents that use XML. On the other hand, I am surprised that the logic that uses libmagic isn't turned off with 'enable-auto-props=no'. After all, using libmagic is just a convenient extension to the definitions in the [auto-props] section. -- Brane