I have a local overlay repo that's (still... nothing stays around longer than a temporary fix) version controlled using subversion. When I added a new ebuild today, I noticed that subversion defaults to treating (at least) ebuilds and Manifests as binary files (which in turn, as I understand it, makes diff/patch not work as expected etc.) I traced this to subversion identifying those files with MIME types of application/vnd.gentoo.ebuild and application/vnd.gentoo.manifest, respectively. Manually setting the MIME type is a workaround: $ svn propset svn:mime-type text/plain *.ebuild Manifest I guess some system wide MIME configuration system has been upgraded to a point where it identifies the gentoo specific files with the above-mentioned MIME types. I can't help but wonder whether application/... is a good category for those, since those files are, in fact, text-based - why is it not text/...manifest and text/...ebuild? (What are the MIME type conventions for source code etc. like, anyway...?) Does subversion simply look at the category (application/... vs text/...), or is there more going on? Does it have a compiled-in list of MIME types that should NOT be treated as binary, that could be patched? Anyway, lest I forget, I'm writing this up straight away.
(In reply to Joe Breuer from comment #0) > I have a local overlay repo that's (still... nothing stays around longer > than a temporary fix) version controlled using subversion. > > When I added a new ebuild today, I noticed that subversion defaults to > treating (at least) ebuilds and Manifests as binary files (which in turn, as > I understand it, makes diff/patch not work as expected etc.) > > I traced this to subversion identifying those files with MIME types of > application/vnd.gentoo.ebuild and application/vnd.gentoo.manifest, > respectively. They're actually officially registered! :) https://marc.info/?l=gentoo-dev&m=166245650202553&w=2 (They've since been ratified or whatever.) > > Manually setting the MIME type is a workaround: > $ svn propset svn:mime-type text/plain *.ebuild Manifest > > I guess some system wide MIME configuration system has been upgraded to a > point where it identifies the gentoo specific files with the above-mentioned > MIME types. > I can't help but wonder whether application/... is a good category for > those, since those files are, in fact, text-based - why is it not > text/...manifest and text/...ebuild? (What are the MIME type conventions for > source code etc. like, anyway...?) This is either beyond me, or I've forgotten, but IIRC application/ is right for it. > > Does subversion simply look at the category (application/... vs text/...), > or is there more going on? Does it have a compiled-in list of MIME types > that should NOT be treated as binary, that could be patched? > Maybe we're triggering something around here https://github.com/apache/subversion/blob/256922fa2eeda6bfb4354a32933da57baf0afeff/subversion/libsvn_subr/magic.c#L143?