Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 602
Mark Elliot Avatar asked Jan 12 '10 14:01

Mark Elliot


2 Answers

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

like image 195
Dusty Avatar answered Nov 15 '22 21:11

Dusty


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' {} \;
like image 21
Le Duc Duy Avatar answered Nov 15 '22 21:11

Le Duc Duy