You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Nico Kadel-Garcia <nk...@gmail.com> on 2012/09/13 00:30:06 UTC

cvs2svn failing on "non-CVS" files

I'm helping upgrade a 12 year old CVS repository to use modern source
control, and have run into a bit of a surprise. Running either cvs2svn
or cvs2git, I'm finding a couple of old CVS files that were hand
edited, 6 hears, and cause cvs2svn to fail with this kind of error.


/data/cvs/tusk/ocw/tmpl/Attic/header,v
Processed 5345 files
Pass 1 complete.
===========================================================================
Error summary:
ERROR: '/var/www/cvs/module/badfile,v' is not a valid ,v file

This is with cvs2svn 2.3.0, Subversion 1.6.12 on Ubuntu or Subversion
1.6.11 on RHEL. I've also tested with Subvesion 1.7.4 on RHEL, same
problem. My problem is that the CVS files check out OK with plain CVS,
and my clients really want to keep the history intact in their
migration.

Has anyone had fun and experience with CVS files that work in CVS, but
break cvs2svn? Are there any particular pointers? Any guidelines on
repairing such mangled files?

Re: cvs2svn failing on "non-CVS" files

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Thu, Sep 13, 2012 at 5:32 AM, Andreas Tscharner
<An...@metromec.ch> wrote:
>> /data/cvs/tusk/ocw/tmpl/Attic/header,v
>> Processed 5345 files
>> Pass 1 complete.
>> ==============================================================
>> =============
>> Error summary:
>> ERROR: '/var/www/cvs/module/badfile,v' is not a valid ,v file
>>
>> Has anyone had fun and experience with CVS files that work in CVS, but
>> break cvs2svn? Are there any particular pointers? Any guidelines on
>> repairing such mangled files?
>
> We have had similar errors when we changed. The only solution I had was to remove these files from the CVS repo and finally re-add them in the svn repo. Of course this works only if there are only a few files (it was 6 in our case)

Found it!!!!

Someone put comments in among the numerical names of revisions in the
beginning of the file, so it looked like this:

           1.100
           1.99
           1.98
           * Things had to be restructured at 1.97
           Problems with layout
           1.97
           1.96

Once I stripped out the commentary in the weird location, everything
seems to work. I have developer with the code verifying their CVS
branches. I'm unsure whether someone manually edited the files 6 years
back, or there's some way to store such comments there gracefully, but
clipping that commentary seems to resolve the cvs2svn conversion.

> The actual cause in our case was: CVSNT (!) has saved these files (they were all binary) with a '0' somewhere in the file what the converter didn't like...

Ouch.

RE: cvs2svn failing on "non-CVS" files

Posted by Andreas Tscharner <An...@metromec.ch>.
> /data/cvs/tusk/ocw/tmpl/Attic/header,v
> Processed 5345 files
> Pass 1 complete.
> ==============================================================
> =============
> Error summary:
> ERROR: '/var/www/cvs/module/badfile,v' is not a valid ,v file
> 
> Has anyone had fun and experience with CVS files that work in CVS, but
> break cvs2svn? Are there any particular pointers? Any guidelines on
> repairing such mangled files?

We have had similar errors when we changed. The only solution I had was to remove these files from the CVS repo and finally re-add them in the svn repo. Of course this works only if there are only a few files (it was 6 in our case)

The actual cause in our case was: CVSNT (!) has saved these files (they were all binary) with a '0' somewhere in the file what the converter didn't like...

Best regards
	Andreas
-- 
Andreas Tscharner                      <an...@metromec.ch>
----------------------------------------------------------------------
"Intruder on level one. All Aliens please proceed to level one."
                                      -- Call in "Alien: Resurrection" 

Re: cvs2svn failing on "non-CVS" files

Posted by Michael Haggerty <mh...@alum.mit.edu>.
On 09/13/2012 12:30 AM, Nico Kadel-Garcia wrote:
> I'm helping upgrade a 12 year old CVS repository to use modern source
> control, and have run into a bit of a surprise. Running either cvs2svn
> or cvs2git, I'm finding a couple of old CVS files that were hand
> edited, 6 hears, and cause cvs2svn to fail with this kind of error.
> 
> 
> /data/cvs/tusk/ocw/tmpl/Attic/header,v
> Processed 5345 files
> Pass 1 complete.
> ===========================================================================
> Error summary:
> ERROR: '/var/www/cvs/module/badfile,v' is not a valid ,v file
> 
> This is with cvs2svn 2.3.0, Subversion 1.6.12 on Ubuntu or Subversion
> 1.6.11 on RHEL. I've also tested with Subvesion 1.7.4 on RHEL, same
> problem. My problem is that the CVS files check out OK with plain CVS,
> and my clients really want to keep the history intact in their
> migration.
> 
> Has anyone had fun and experience with CVS files that work in CVS, but
> break cvs2svn? Are there any particular pointers? Any guidelines on
> repairing such mangled files?

Often CVS can check recent revisions out of a repository file even if it
is corrupt, because in that case CVS doesn't need to read the whole
file.  But it is likely that CVS would also have problems if you tried
to check out older revisions.  For example, for a relatively thorough
test try using CVS to check out revision 1.1 and the tips of all
branches for the affected files.

It is probably possible for somebody who knows the RCS/CVS file format
to fix these files by hand and salvage some or all of the file's
history.  If you need assistance, please contact me off-list.

Michael
(the cvs2svn maintainer)

-- 
Michael Haggerty
mhagger@alum.mit.edu