You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Paulo J. Matos" <po...@ecs.soton.ac.uk> on 2008/07/11 07:58:39 UTC

PDF in repository

Hello,

Sometimes SVN treats pdf as binary other times as text.
Is it possible to manually tell svn: "treat this file as binary"?

Cheers,

-- 
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: PDF in repository

Posted by Kevin Grover <ke...@kevingrover.net>.
On Fri, Jul 11, 2008 at 1:34 AM, Paulo J. Matos <po...@ecs.soton.ac.uk>
wrote:

> On Fri, Jul 11, 2008 at 8:58 AM, Paulo J. Matos <po...@ecs.soton.ac.uk>
> wrote:
> > Hello,
> >
> > Sometimes SVN treats pdf as binary other times as text.
> > Is it possible to manually tell svn: "treat this file as binary"?
> >
>
> Got it! :)
>
> Just need to set the mime-type property to application/pdf.
>
> > Cheers,
> >
> > --
> > Paulo Jorge Matos - pocm at soton.ac.uk
> > http://www.personal.soton.ac.uk/pocm
> > PhD Student @ ECS
> > University of Southampton, UK
> >
>
>
>
> --
> Paulo Jorge Matos - pocm at soton.ac.uk
> http://www.personal.soton.ac.uk/pocm
> PhD Student @ ECS
> University of Southampton, UK
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
As an FYI, this 'sometimes' behavior is probably an artifact of PDF file
format and the hueristic Subversion uses to see if a file is binary.
Subversion is probably (I have not checked this) looking for non 0-127 chars
in the first x KB (typically 1 to 4) of the file.  PDF files are a special
flavor of PostScript files.  PostScript is text based and so it's quite
likely that a PDF will contain much text - it can even be all text if
compression is not use and bitmapped images are not present.

- Kevin

Re: PDF in repository

Posted by "Paulo J. Matos" <po...@ecs.soton.ac.uk>.
On Fri, Jul 11, 2008 at 8:58 AM, Paulo J. Matos <po...@ecs.soton.ac.uk> wrote:
> Hello,
>
> Sometimes SVN treats pdf as binary other times as text.
> Is it possible to manually tell svn: "treat this file as binary"?
>

Got it! :)

Just need to set the mime-type property to application/pdf.

> Cheers,
>
> --
> Paulo Jorge Matos - pocm at soton.ac.uk
> http://www.personal.soton.ac.uk/pocm
> PhD Student @ ECS
> University of Southampton, UK
>



-- 
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org