subversion and binary files

If you check in a binary file, but svn doesn’t realize that it’s binary (i.e., it doesn’t display (bin) when you run svn add), you can fix it by running:

svn propset svn:mime-type application/octet-stream filename

See the list of properties for other useful properties you can edit.

 If you’re annoyed that subversion isn’t smart enough to figure this out, well, it is.  Find the subversion config file on your machine (on *nix machines, each user has a personal config file in ~/.subversion/config  Also, on Debian, there’s a global config file in /etc/subversion/config).  Set

enable-auto-props = yes

Then select some of the pre-defined patterns or create your own.  For example, you can tell subversion that Adobe Illustrator files are binary with

*.ai = svn:mime-type=application/octet-stream

Leave a Reply

You must be logged in to post a comment.