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

Re: Subversion bugs

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-05-03 14:19:26 CEST

On May 3, 2005, at 4:47 AM, Martin.Budsjo@astrazeneca.com wrote:

> Hi all!
>
> cvs2svn breaks binary files and Subversion can't tell the difference
> between
> two binary different files.
>
>
> I have two problems.
>
> Problem one:
>
> The original file (bb) was migrated from cvs and now it differ from
> the version that was in CVS. We checked that the file bb was checked
> into
> cvs when the migration took place.
>

If the original binary file wasn't marked as such in CVS (with the -kb)
flags, then you were sitting on a time-bomb all along. CVS could have
corrupted the file at any time. There's no bug in cvs2svn here; if a
file doesn't have -kb flags in CVS, then cvs2svn assumes it's a
textfile and applies the 'svn:eol-style=natve' and 'svn:keywords'
properties to the file, which definitely change the file contents. If
the file is binary, then this will very likely corrupt the file.
Again, not a bug. It's because you didn't have the file marked as
binary in CVS.

If you have more questions, please mail users@cvs2svn.tigris.org, it's
a separate project and separate mailing list.

>
> Problem two:
>
> When we tried to correct the faulty file that was migrated Subversion
> is unable to detect that we have made any changes to the file. To make
> the reproduction the error easy we copied the original bb file
> from the CVS checkout area into the bb.ok filename and added it into
> Subversion. Then we show (see below) that subversion cant tell the
> difference from the "migrated" binary file to the bb.ok file when we
> overwrite the bb file with bb.ok. It have not problem seeing the
> difference the other way around though, copying he faulty bb over
> bb.ok and subversion detects the change to bb.ok file.
>
> This is completely illogical to me so I assume it's a bug in
> Subversion.
>

No, this is an expected effect of the svn:eol-style and svn:keywords
properties being 'detranslated' when you run 'svn diff' and 'svn
status'.

To solve your problem, remove those two properties, then commit. Then
overwrite the file with the good one, and set 'svn:mime-type' to
'application/x-octet-stream' or some other non-text type.

Alternately, you can simply 'svn rm' the old file, and 'svn add' the
new file.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue May 3 14:23:22 2005

This is an archived mail posted to the Subversion Users mailing list.