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

Re: Binary file checkin problem

From: Michael L Brown <michael.l.brown_at_philips.com>
Date: 2005-05-20 00:16:46 CEST

Dam, I wish that Lotus bloats would respond to e-mail correctly. See
below for my comments.

MB
 --
Mike Brown (Michael.L.Brown@Philips.com)
            Lotus Bloats: Michael L Brown/MSN/MS/PHILIPS
Philips/ADAC, Madison, WI
Desk: 608-288-6969 Fax: 608-298-2101
PMS direct: 164-6969
You design it, I'll build it!

Ben Collins-Sussman
05/19/2005 04:30 PM

To
Michael L Brown/MSN/MS/PHILIPS@PHILIPS
cc
Blair Zajac <blair@orcaware.com>
users@subversion.tigris.org
Subject
Re: Binary file checkin problem
Classification

>On May 19, 2005, at 2:54 PM, Michael L Brown wrote:

>>
>> >You never want to set svn:keywords on a binary file, only source text
>> >files. You may get replacements to occur that you don't want to that
>> >will screw up the file.
>>
>> Unless I got misdirected somewhere, when a file is considered
>> binary, keywords are supposed to be ignored, i.e., no substitution
>> done. It certainly works that way in CVS.
>>

>Subversion is much safer than CVS in this regard. It will never
>munge your data unless you explicitly ask it to. CVS is the
>opposite; it will munge your data by default unless you remember to
>tell it *not* to.

Ah, but with CVS, even though I have to tell it which files not to
muck with, it is a MASTER config file that users can't screw with
or everride with local configs.

>In this case, the only problem here is that Subversion allowed you
>(or one of your users) to shoot yourself in the foot. You set
>svn:eol-style and svn:keywords properties on a binary file, thereby
>asking svn to alter the file contents. It did what you asked it to
>do. Don't Do That.

The svn:eol-style is not used, as we are UNIX only.

>It's already the case that if svn:mime-type is set to a binary type,
>then 'svn propset' will refuse to set the svn:eol-style or
>svn:keywords properties. But apparently there are other ways to get
>them to co-exist... I suspect that the svn:mime-type is set *after*
>the text-munging ones, then you can end up with all three properties
>set at once. So if there's a bug here to report, it's perhaps that
>we aren't doing enough to prevent foot-shooting. :-)

Ya, I remember you saying this once before, that is why I did the
auto-prop thing and used a wild card because you said that propset
wouldn't be done on binary files. Obviously that is not the case,
because the importation of the binary file indeed had the keywords
property set against a binary file.

>In general, be very careful about which files you ask Subversion to
>munge. Don't do something like use the auto-props feature to
>automatically set the text-munging properties on '*'. That's just
>dangerous. Be specific instead: munge only specific file types.

I took you at your word and believed that propset wouldn't set the
keywords property on a binary file. Even above you say it shouldn't,
but in the same breath backtrack. Obviously it didn't work as you
thought.

As pointed out in the e-mail before this one, because there isn't
a master config file that users can't override, depending on users
to keep their local config file up-to-date is going to be like
pulling teeth; very painful.

Writing a hook script to get around this problem seems like overkill
when all of the hooks are already in SVN for working with binary
files, but end up being ignored. I wouldn't mind if it had to be
placed in a config file, but there isn't a master config file in which
it can be done.
Received on Fri May 20 00:19:45 2005

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.