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

前端 未结 5 1027
抹茶落季
抹茶落季 2021-01-12 03:03

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 wit

相关标签:
5条回答
  • 2021-01-12 03:51

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

    0 讨论(0)
  • 2021-01-12 03:58

    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' {} \;
    
    0 讨论(0)
  • 2021-01-12 04:02

    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.

    0 讨论(0)
  • 2021-01-12 04:06

    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.

    0 讨论(0)
  • 2021-01-12 04:08

    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

    0 讨论(0)
提交回复
热议问题