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

RE: svn corrupts binary files on import

From: Sacerdoti, Federico <Federico.Sacerdoti_at_deshaw.com>
Date: 2005-09-23 23:42:54 CEST

I think Paul hit the nail on the head - I had not marked files as binary
in CVS. Not that I ever had to (because of the reasons he mentioned),
but I think many people run CVS without concerning themselves about
binary file types.

If svn has a heuristic for guessing binaries, then cvs2svn should use it
too I would think.

Thanks again for your help,
-Federico

-----Original Message-----
From: Paul Koning [mailto:pkoning@equallogic.com]
Sent: Friday, September 23, 2005 5:00 PM
To: Sacerdoti, Federico
Cc: subversion-2005@ryandesign.com; users@subversion.tigris.org
Subject: RE: svn corrupts binary files on import

>>>>> "Federico" == Federico Sacerdoti <Sacerdoti> writes:

 Federico> Thanks to those that responded so quickly to my question.
 Federico> I am concerned that the default setup is to mangle EOL
 Federico> characters.

It isn't.

 Federico> I compiled svn from subversion-1.2.3-1.tar.gz using an RPM
 Federico> spec file based on the one from David Summers. I used the
 Federico> cvs2svn utility to construct the initial repository. That
 Federico> is it. The rest is a default SVN setup, I did not add any
 Federico> "auto-props" that I know of.

If you started with cvs2svn, then the cause of the problem is that you
didn't check the files into CVS correctly.

Binary files must be marked as binary in CVS. But if you make few
enough changes and are sufficiently lucky, and don't mix operating
systems, you can for a while get away with doing this wrong.

Two possible solutions.

1. Review the CVS repository. For every file that contains binary
   data, make sure it is marked as such in CVS. When in doubt, use
   the command "cvs admin -kb <file>" (issued from a CVS working
   directory where your CVS repository has been checked out.

   That's the approach I've used. It has the advantage that you're
   repairing the original problem, not just working around it in the
   conversion.

2. Do the conversion with --no-default-eol (and, if you do want native
   line endings for some of your files, also --eol-from-mime-type).
   That will give you a valid Subversion repository, though your CVS
   repository is still wrong.

           paul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Sep 23 23:44:55 2005

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