How to explicity tell SVN to treat a file as text, not binary

DWright picture DWright · Jan 19, 2009 · Viewed 42.7k times · Source

I have a number of files that I checked into SVN without having set up their Mime types correctly. SVN initially classified them as binary.

I've since set their Mime type in SVN via propset to "text/plain; charset=UTF-8" and I'vc made sure that all the files are UTF-8 signed. When I do 'svn blame filename', svn says that the file is binary and does not give me explicit blame-type output.

Any suggestions on how to persuade SVN that these are truly text files?

Answer

Stefan picture Stefan · Jan 19, 2009

Setting the svn:mime-type property to just "text/plain" helps:

svn propset svn:mime-type text/plain build.xml
svn commit build.xml

Also, you can force Subversion to treat a file as text when blaming:

svn blame file/to/blame --force