[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Binary Files

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-06-30 16:18:01 CEST

On Wed, 2004-06-30 at 08:54, Butler, Frances H (FHB) wrote:
> Can someone tell me how to tell subversion to treat pdf files as binary?
> It apparently does not by default, as it just sent me a diff of two pdf
> files.

When you 'svn add' or 'svn import' a file, svn tries to detect if the
file is binary. If it thinks a file is binary, then it sets the file's
"svn:mime-type" property to "application/octet-stream".

Later on, the client interprets this property. If a file has no
svn:mime-type property at all, or if the property is set to some text/*
value, then the client assumes the file can be contextually diffed and
merged. "svn up" will attempt to do line-based merging on the file, and
"svn diff" will try to show line-based diffs. If the mime-type property
is set to something non-texty, then the client will assume the file is
binary of some sort. "svn diff" won't work, and "svn up" will produce 3
fulltexts in the case of a conflict, rather than trying to merge
conflict markers into the file.

So I'm guessing your PDF file looked too much like ASCII, and 'svn
add/import' never set the property. You can do it yourself with 'svn
propset'.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jun 30 16:26:13 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.