Forum OpenACS Development: cvs2svn

Collapse
Posted by Nick Carroll on
Hi,

I've had a crack at converting the openacs cvs repository to subversion. However I've been stumped by an error in the conversion process.

The cvs2svn command that I use is:

cvs2svn --force-branch=openacs-5-1-compat --force-branch=fransola --force-branch=rtag --force-branch=vtag --force-branch=dotlrn-2-0 --force-branch=oacs-5-1 -s /var/lib/svn/repos cvsroot

For the above command you need to be in the same directory as cvsroot. It also assumes that your new svn repository will be located at /var/lib/svn/repos.

The error that I get is:

----- pass 8 -----
Creating new repository '/var/lib/svn/repos'
Starting Subversion Repository.
Starting Subversion commit 1 / 24823
Starting Subversion commit 2 / 24823
ERROR: The command 'co -q -x,v -p1.1 -kk 'cvsroot/CVSROOT/commitinfo,v'' failed with exit status: 256
and the following output:
co: cvsroot/CVSROOT/commitinfo,v:87: edit script refers to line past end of file
co aborted

As you can see the error message isn't very helpful, and googling it doesn't provide much help either.

Anybody know how to resolve this?

Cheers,
Nick.

Collapse
2: Re: cvs2svn (response to 1)
Posted by Hamilton Chua on
some in the subversion mailing list suggests adding a "--use-cvs" option.
Collapse
3: Re: cvs2svn (response to 1)
Posted by Nick Carroll on
Ok, tried the above command with --use-cvs, but it still barfs on pass 8:

----- pass 8 -----
Creating new repository '/var/lib/svn/repos'
Starting Subversion Repository.
Starting Subversion commit 1 / 24823
Starting Subversion commit 2 / 24823
ERROR: The command 'cvs -q -R co -r1.1 -p -kk 'CVSROOT/commitinfo'' failed with exit status: 256
and the following output:
cvs: WARNING: Read-only repository access mode selected via `cvs -R'.
Using this option to access a repository which some users write to may cause intermittent sandbox corruption.
cvs [checkout aborted]: invalid change text in /home/ncarroll/tmp/t/cvsroot/CVSROOT/commitinfo,v

Collapse
4: Re: cvs2svn (response to 1)
Posted by Lee Denison on
I had a go a this with the latest version of cvs2svn from their subversion repository. I used the --use-cvs flag and made it to pass 9 but then if failed trying to close a bad file descriptor on one of its own databases:

----- pass 9 (CreateDatabasesPass) -----
Finding last CVS revisions for all symbolic names...
Traceback (most recent call last):
File "cvs2svn/trunk/cvs2svn", line 121, in ?
main()
File "cvs2svn/trunk/cvs2svn", line 113, in main
pass_manager.run(run_options.start_pass, run_options.end_pass)
File "/Volumes/IcyBox/openacs-4/cvs2svn/trunk/cvs2svn_lib/pass_manager.py", line 122, in run
the_pass.run(stats_keeper)
File "/Volumes/IcyBox/openacs-4/cvs2svn/trunk/cvs2svn_lib/passes.py", line 795, in run
Ctx()._cvs_items_db.close()
File "/Volumes/IcyBox/openacs-4/cvs2svn/trunk/cvs2svn_lib/database.py", line 295, in close
self.index_table.close()
File "/Volumes/IcyBox/openacs-4/cvs2svn/trunk/cvs2svn_lib/record_table.py", line 226, in close
self.flush()
File "/Volumes/IcyBox/openacs-4/cvs2svn/trunk/cvs2svn_lib/record_table.py", line 178, in flush
self.f.flush()
IOError: [Errno 9] Bad file descriptor

Collapse
5: Re: cvs2svn (response to 4)
Posted by Hamilton Chua on
I wonder if there is a problem with your hard disk ?
ErrNo 9 seems to be a generic error

[Errno 9] Bad file descriptor
This occurs if your operating system or UNIX filesystem cannot support files larger than 4 GB, and you try to download a file larger than 4 GB. The only way to fix this is to upgrade the operating system. This mostly affects Windows 98 and Windows ME; you will need to use Windows 2000 or Windows XP to download this file. This error can also be caused by filesystem corruption. Run Scandisk and then defragment your hard drive and try again.

Collapse
6: Re: cvs2svn (response to 4)
Posted by Dave Bauer on
Very close to success. I cleaned up invalid hisotry entries and got to here

----- pass 9 (OutputPass) -----
Creating new repository '/var/lib/svn/repos'
svnadmin: Repository creation failed
svnadmin: Could not create top-level directory
svnadmin: Can't create directory '/var/lib/svn/repos'
ERROR: Command failed: "svnadmin create --bdb-txn-nosync "/var/lib/svn/repos""

Probably just a permissions error in my install I haven't checked it out yet. Looks promising.

Collapse
7: Re: cvs2svn (response to 1)
Posted by Dave Bauer on
Interestingly after all that effort I got the same error about line 87 in commitinfo,v

Basically the data at line 87 refers to a line in the commitinfo file that does exist (according to the error message). This is probably similar to the other errors in the some of the files that I fixed.