For those of you who have been following my work on tools to muck out the swamp that is CVS, a new shovel: cvs-fast-export. Note, this is an alpha release for testing purposes; double-check the quality of any conversions you do with it carefully.
Actually, in some ways this is an old and trusty shovel. Keith Packard wrote the analysis code in 2006 to lift the X repos to git. After that the code gathered dust; when I found it it was in a broken state due to changes in the git library API. Some of you may have seen that version as “parsecvs”.
I sawed off the direct interface to git and replaced it with a back end that emits a git fast-import stream. This is much more useful; it means other version-control systems that have importers for this format can use the tool. It also means reposurgeon can use it.
If you’ve been paying attention, you’ll notice that this is the second CVS exporter I’ve shipped recently. And you’re probably wondering why I’m maintaining two of these beasts. The answer is that they both fell into my lap at nearly the same time and I’m not yet sure either dominates the other.
One of the larger items on my near-term to-do list is to write a really good test suite for both of these, then use it to compare them with each other and cvs2git.
Just from reading the code of both I suspect that cvs-fast-export will do a better job than cvsps – Keith’s analyzer looks more powerful, less ad-hoc. But cvsps has one major feature lacking in cvs-fast-export; it can be used to lift repositories to which you have only remote access.
Depending on what the test-suite comparisons tell me, I may have to fix that by transplanting cvsps’s client code into cvs-fast-export (after which I would scrap cvsps). We’ll see. There’s a fair bit of work still to be done before I’ll know enough to make that decision.
In the meantime, those of you interested in this problem can test. And here’s a shiny thing I dangle before you: with the flip of a switch, cvs-fast-export can generate a graphical visualization of the commit DAG.