views:

628

answers:

3

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.

edit: 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.

edit: Actually it looks like I'm running Subversive, not Subclipse - sorry.

+1  A: 

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.

Álvaro G. Vicario
There are no associations in the list -- which is why this is confusing
Mark E
Then check the places where Subversion itself takes this setting. They're mentioned in the above link.
Álvaro G. Vicario
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)
Mark E
+2  A: 

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

Dusty
A: 

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

vorburger
Thanks for creating an Eclipse bug, I resigned to the fact there was nothing I could do.
Mark E