svn diff: file marked as binary type

白昼怎懂夜的黑 提交于 2020-01-11 14:59:48

问题


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

回答1:


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



回答2:


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

svn diff --force path/to/file



来源:https://stackoverflow.com/questions/2634043/svn-diff-file-marked-as-binary-type

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!