0

My problem is related to Eclipse and Windows/Mac. I have a project on SVN and different developers work on it, one group have Macs and another group have Windows.

When a user that uses Windows commits to the project, the group that uses Mac report a problem with all of the pictures. Specifically, the .png and .jpg files do not work properly on Mac, the preview and other programs report errors and cannot open them.

Are there other people with this problem? What is the solution to fix this?

Sameer Singh
  • 1,358
  • 1
  • 19
  • 47
phemt.latd
  • 1,775
  • 21
  • 33
  • 1
    I don't know how to fix it in Eclipse, but I bet the problem is `` vs `` difference in supposedly identical binary files. `svn:mime-type` property is the culprit. More info: http://stackoverflow.com/q/73797/395718 – Dialecticus Sep 09 '13 at 09:55
  • Your answer is the best. If you post it as answer i vote it up and choose it. – phemt.latd Jan 31 '14 at 10:08

1 Answers1

1

Text files have different end-of-line characters in different OSes (CR+LF on Windows, CR on OS X). SVN client is trying to be friendly, and convert EOLs in text file received from the SVN server to match the client's OS. Client will do that only for text files (which are default for SVN), and not for binary files, and SHOULD attach the property svn:mime-type to every new non-textual file, so that the file is not changed on different OSes.

If the file is binary, but does not have svn:mime-type property, or the property is set to some value that denotes a text file (instead of a binary file) then that file will have some bytes in it changed on some client machines.

The solution is to set the svn:mime-type property of a file to something more appropriate. Default for binary files in Tortoise SVN (for example) is application/octet-stream, and should be good enough for all other SVN clients.

For more info see this question: stackoverflow.com/q/73797/395718

Community
  • 1
  • 1
Dialecticus
  • 16,400
  • 7
  • 43
  • 103