views:

849

answers:

3

I have a 20-year-old project that I would like to migrate from RCS to git, without losing the history. All web pages suggest that the One True Path is through CVS. But after an hour of Googling and trying different scripts, I have yet to find anything that successfully converts my RCS project tree to CVS. I'm hoping the good people at Stackoverflow will know what actually works, as opposed to what is claimed to work and doesn't.

(I searched Stackoverflow using both the native SO search and a Google search, but if there's a helpful answer in the database, I missed it.)

UPDATE: The rcs-fast-export tool at http://git.oblomov.eu/rcs-fast-export was repaired on 14 April 2009, and this version seems to work for me. This tool converts straight to git with no intermediate CVS. Thanks Giuseppe and Jakub!!!


Things that did not work that I still remember:

  • The rcs-to-cvs script that ships in the contrib directory of the CVS sources

  • The rcs-fast-export tool at http://git.oblomov.eu/rcs-fast-export in versions before 13 April 2010

  • The rcs2cvs script found in a document called "CVS-RCS- HOW-TO Document for Linux"

A: 

How big is the source tree with RCS? How many directories and sub directories? Can you post a du -k ?

bdbaddog
Not too big. I have about a dozen RCS directories containing a total of 1.7MB.
Norman Ramsey
Can you post it somewhere for folks to give it a try? (It's open source right)?
bdbaddog
+3  A: 

See InterfacesFrontendsAndTools page on Git Wiki, in "Tools", "Interaction with other Revision Control Systems", "Other". There you would find a description and a link to rcs-fast-export (gitweb) Ruby script by Giuseppe "Oblomov" Bilotta.

(Web search would find also Ohloh page and announcement for mentioned project).

Jakub Narębski
to clarify for Norman, a "fast-export" tool is a modern de facto standard for communcating across VCS systems, git's tool to read this data is called `git fast-import`
kaizer.se
Unfortunately this tool bombs with a stack trace, starting with an error at line 420. This is fairly typical of my sad experiences. Did I mention that the RCS history covers 20 years?
Norman Ramsey
Did you try to contact author of rcs-fast-export? It is probable however that it was one-shot conversion tool for author, and script is not maintained.
Jakub Narębski
A: 

I had this problem too and wrestled with cvs2svn, parsecvs and whatnot. Parsecvs (http://cgit.freedesktop.org/~krh/parsecvs) got the closest but Keith seems to have left it behind and now random forks are popping up. The problem I struck with it was it would parse the rcs files just fine but the last thing it did was 'git rm' the file, so I would have had to muck around with 'git reset' to undo the deletion.

Then I discovered mercurial's "convert": http://mercurial.selenic.com/wiki/ConvertExtension Problem solved!

I tried to incrementally add some stuff from separate RCS trees, it seems to have worked.