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

Re: Subversion and binary files

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: Fri, 1 Feb 2008 11:43:09 -0600

On Feb 1, 2008, at 09:05, Thomas Scheffler wrote:

> Removing the "svn:mime-type" is just not sufficient as this
> property is just
> evaluated once when the file is first added or imported to the
> repository. So
> removing or setting "text/*" or so will not help as the file stays
> "binary".
> I rely on tools that use "svnlook diff". So I need a solution where
> I can
> switch files into text mode after they are inserted. Where is that
> information stored? I am using the FSFS backend.

On Feb 1, 2008, at 10:03, Thomas Scheffler wrote:

> This is not stated in the documentation (svn book) I think, but you
> can read
> it in the FAQ
> http://subversion.tigris.org/faq.html#binary-files
>
> "When you first add or import a file into Subversion, the file is
> examined to
> determine if it is a binary file..."
>
> They'll tell you there that "svn:eol-style" does not switch binary
> files into
> text mode. So where is that switch?

There is no switch, and there is no binary or text "mode". All files
are stored binary in the repository. A client only handles a file as
binary if has an svn:mime-type property and it does not begin with
"text/". (There are a few other MIME types that are handled as text,
too [1], but "application/xml" is not one of them.) If a file has no
svn:mime-type property the client treats it as a text file.

If you want a file to be handled as a text file, give it a "text/
something" svn:mime-type, or delete the svn:mime-type.

If you want to correct this for all revisions in your repository, you
can svnadmin dump the repo, change the revisions with svndumptool
[2], svnadmin load it into a new repo, and check out all new working
copies.

[1] http://subversion.tigris.org/faq.html#binary-files

[2] http://svn.borg.ch/svndumptool/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-02-01 18:43:42 CET

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.