[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: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-05-19 23:30:33 CEST

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.

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.

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. :-)

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.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu May 19 23:34:26 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.