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
If Subversion determines that the file is binary, the file receives an svn:mime-type property set to application/octet-stream. You can always override this by using the auto-props feature or by setting the property manually with svn propset . Subversion treats the following files as text: Files with no svn:mime-type.
The svn diff command reveals the differences between your working copy and the copy in the master SVN repository.
Each time you commit a change, the repository stores a new revision of that overall repository tree, and labels the new tree with a new revision number. Of course, most of the tree is the same as the revision before, except for the parts you changed.
You can get diff even for a file marked as binary by using --force
.
svn diff --force path/to/file
You can use the 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With