tags:

views:

161

answers:

1

I'm trying to import a cvs module into an existing git repo. I can get it to work properly if I import into a fresh repo, but when I try to import into the existing repo it seems determined to skip all the patchsets that are dated before the last commit to the branch that I've specified with -o. This is what I'm currently trying:

git cvsimport -v -p -x -o cvs -d <cvsroot> -k -u <module>

The end of the output consists of lines like this:

skip patchset 26: 1258578534 before 1259081502

If I drop the "-o cvs", it fails with:

Branch 'origin' does not exist. 
Either use the correct '-o branch' option, 
or import to a new repository.

So, how can I get git cvsimport to import everything?

+1  A: 

Import into a new repository, duplicate the new branch into your current repository then re-write the branch to sit after what you've already got, if that's what you're after.

Alternatively, if you're trying to replicate a multi-module CVS checkout by converting a module at a time, you may want to try to convert it all at once...

It may work to convert each module to git, pull each branch into a single repository then create a commit with each branch head as a parent, putting each module in the correct place in the tree. This doesn't do a good job of preserving concurrency in the individual modules' history.

Andrew Aylett
The CVS repository contains a very large number of modules, but I'm actually only trying to convert a few. So doing it all at once doesn't seem like a great idea in this case.I'm currently experimenting with your third suggestion and it seems like it's doing what I want. Thanks!
Zack