Flag a PDF file as binary for Subversion

11 December, 2008 - 01:05

Sometimes, Subversion thinks that a PDF is a text file, instead of binary data. This can hurt during commits or diffs, because Subversion tries to do textual diffs with binary data.

Solution: you can explicitly flag the file as PDF data and Subversion will handle it as binary from then:

svn propset svn:mime-type application/pdf yourPDFfile.pdf
14 July, 2010 - 03:45

Thanks, saves me headache.

Simon (not verified)

Thanks, saves me headache. We'll have to define "sometime" someday.

14 May, 2010 - 20:43

Worked like charm

Anonymous (not verified)

Great piece of advice. Thank you!
It can also be used with wildcards, such as: "svn propset svn:mime-type application/pdf *.pdf"

Post new comment

The content of this field is kept private and will not be shown publicly.
  • No HTML tags allowed
  • Lines and paragraphs break automatically.

More information about formatting options