Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrate project from RCS to git?

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"

like image 810
Norman Ramsey Avatar asked Oct 25 '09 02:10

Norman Ramsey


People also ask

Which popular tool can be used to migrate SVN to Git?

There are many tools such as svn2git available to perform the migration, in this tutorial we will focus on git-svn utility: a Git extension , which can be used to check out a Subversion repository to a local Git repository and then push changes from the local Git repository back to the Subversion repository.


2 Answers

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).

like image 110
Jakub Narębski Avatar answered Sep 28 '22 00:09

Jakub Narębski


OK, after a little tinkering, I found it was trivial to convert RCS to CVS. The files are in the same format, so it's simply a matter of moving the files into an existing CVS root. This assumes you have access to the RCS files.

# Create CVS root dir. You only need to do this once. mkdir $HOME/cvs/ cd $HOME/cvs/ cvs init  # Import a repository from RCS to CVS cp -a _projectname_/RCS $HOME/cvs/_projectname_ 
like image 30
Edward Falk Avatar answered Sep 27 '22 23:09

Edward Falk