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

Re: svnlook diff doesn't ignore binary files

From: Dang Nguyen <haidangwa_at_comcast.net>
Date: Fri, 18 Jul 2008 20:00:19 -0700

Ryan Schmidt wrote:
>
> On Jul 18, 2008, at 19:11, Dang Nguyen wrote:
>
>> I’m running Subversion 1.5.0 on Windows Server 2003. My post commit
>> script usually sends me an email with each commit and shows me the
>> files committed and their diffs (normal mailer stuff). I noticed a
>> couple of times that I wasn’t getting the notifications. Digging
>> into this, I found that the “svnlook diff” portion of my script was
>> failing, because svnlook was not ignoring the binary files being
>> committed. Some of the files being committed are pdf’s and “svnlook
>> diff” tries to show me the changes between the previous version and
>> the new version.
>>
>> We recently moved from a Linux server on 1.3.2 to the current Windows
>> server and I never had this problem. Researching into this, I’ve
>> read that svnlook uses the svn:mime-type property to determine the
>> file type. None of these files have this property set, but they
>> weren’t set explicitly when we were on the Linux server either.
>>
>> Is this a regression in 1.5.0 or do I need to configure something
>> with the new Windows server?
>
> There is no regression. The behavior is normal. If there is no
> svn:mime-type property, then Subversion thinks it's a text file. When
> you add a file, Subversion briefly analyzes the file and guesses
> whether it is text or binary. If Subversion guesses that a file is
> binary, it sets svn:mime-type to application/octet-stream; if it
> guesses a file is text, it does nothing. For PDF files, Subversion
> often incorrectly guesses that they are text (because the PDF format
> is rather texty) and therefore does not add the svn:mime-type
> property. If you would like Subversion to add the svn:mime-type
> property for PDF files, set up auto-props on your client.
> application/pdf would be a good value to use for PDF files.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: users-help_at_subversion.tigris.org
>
>

Since I can't ensure that all my users will set auto-props on their
clients, it sounds like I need to modify a pre-commit hook to detect and
add this property PDFs being checked in. Any suggestions?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-07-19 05:00:45 CEST

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.