svn diff: file marked as binary type

SvnFile Type

Svn Problem Overview


I'm doing an svn diff on one of my files and svn is detecting it as a binary type. The file is readable plain text and I would like to be able to get a diff of this file. How do I tell SVN that this is not a binary file?

Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Svn Solutions


Solution 1 - Svn

You can get diff even for a file marked as binary by using --force.

svn diff --force path/to/file

Solution 2 - Svn

You can use the http://svnbook.red-bean.com/en/1.5/svn.ref.properties.html">Subversion property svn:mime-type to set an explicit mimetype on the file:

svn propset svn:mime-type 'text/plain' path/to/file

Alternatively, you can delete this property (since Subversion assumes plaintext, otherwise) using:

svn propdel svn:mime-type path/to/file

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionCharles MaView Question on Stackoverflow
Solution 1 - SvnEvgeny RemizovView Answer on Stackoverflow
Solution 2 - SvnMichael Aaron SafyanView Answer on Stackoverflow