Stop Eclipse/Subversive from setting svn:mime-type to text/plain on initial commit
Asked Answered
G

5

9

How do I stop Subversive from setting svn:mime-type to text/plain on initial commit?

My Java code is being checked into my repository with the svn:mime-type property set as text/plain, and as a result my web-based SVN viewer (trac) isn't syntax highlighting.

I should add I'm running Eclipse 3.5 and the most recent version of Subversive with the SVNKit 1.3.0 (for SVN 1.6) adapter.


For those finding this question, this issue no longer exists as it was resolved through an option in the preferences section of Subversive.

Globetrotter answered 12/1, 2010 at 14:45 Comment(1)
I have no earthy idea. I had this exact question, and it was really helpful!Fisticuffs
P
4

You'll need to actually setup the mime types yourself in "Window > Preferences> Team > SVN > Properties Configuration > Automatic Properties"

For file type *.java for example, set it to: svn:mime-type=text/x-java

Perlman answered 22/1, 2010 at 14:57 Comment(0)
S
3

If your project already got messed by subversive, cd to project root and run the following commands

find . -name "*.java" -exec svn propset svn:mime-type 'text/x-java' {} \;
find . -name "*.xml" -exec svn propset svn:mime-type 'text/xml' {} \;
Smaragdine answered 11/8, 2011 at 22:24 Comment(0)
B
1

By default, Subversion only sets svn:mime-type to application/octet-stream when the file is binary (and you didn't explictly assign any other value). See Automatic Property Setting for reference. So this feature is courtesy of Subversive.

I'm afraid I'm not a Subversive user, but I found in Google a reference to a menu in "Window > Preferences> Team > SVN > Properties Configuration > Automatic Properties" where it seems you can remove unwanted associations.

Bellyband answered 12/1, 2010 at 16:42 Comment(3)
There are no associations in the list -- which is why this is confusingGlobetrotter
Then check the places where Subversion itself takes this setting. They're mentioned in the above link.Bozeman
Trouble is, like you said, SVN by default only sets svn:mime-type for binary files, all others the property should not be set. (and I'm using the SVNKit 1.3.0 connector)Globetrotter
I
1

We just ran into this as well. FYI all, I've posted https://bugs.eclipse.org/bugs/show_bug.cgi?id=322772

Insomniac answered 16/8, 2010 at 10:17 Comment(1)
Thanks for creating an Eclipse bug, I resigned to the fact there was nothing I could do.Globetrotter
I
0

The reported bug by vorburger (https://bugs.eclipse.org/bugs/show_bug.cgi?id=322772) has been fixed. There is an option called 'Set text MIME type for all non-binary files' under "Window > Preferences> Team > SVN > Properties Configuration > Automatic Properties" which needs to be unchecked to prevent Subversive to add the S/MIME-Type to newly added resources.

Innominate answered 30/3, 2015 at 12:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.