Switch from CVS to Subversion

From Event-B
Revision as of 22:31, 13 March 2009 by imported>Laurent (Finished procedure)
Jump to navigationJump to search

The switch from CVS to Subversion took place Friday 13 March 2009. Before this date, all source code used to be managed in a CVS repository hosted by SourceForge. After this date, source code is managed in a Subversion repository also hosted by SourceForge.

How to Access the Repository from Eclipse

To access the subversion repository, you need to install a Subversion plug-in into your Eclipse development platform. There is currently two plug-ins that are known to work quite well: Subclipse and Subversive. We do not recommend yet which plug-in to use, but experience will tell. What is currently known is that it would be a bad idea to install both plug-ins in the same platform as they conflict with each other.

The repository itself is available at URL https://rodin-b-sharp.svn.sourceforge.net/svnroot/rodin-b-sharp.

How to Move from CVS to Subversion

The simpler is to create a second workspace on your computer and to launch two Eclipse programs, one on each workspace. For each project checked out in the CVS workspace, just checkout the same project in the Subversion workspace.

If you have some yet uncommitted changes in your CVS workspace, you can select the files and drag and drop them in the appropriate place in the Subversion workspace. Alternatively, you can create a patch. For that, select the project(s) that contain uncommitted changes, then select Team > Create Patch... from the context menu and follow the wizard. Then, in the Subversion workspace, select Team > Apply Patch... to apply the patch.

Procedure Used for Moving CVS History to Subversion

When switching from CVS to Subversion, we made our best to keep the history of all files. We followed this procedure:

  1. retrieve a copy of the whole CVS repository into directory cvs
  2. launch commands
  3. cvs2svn -q --dumpfile=svndump --force-tag=GMF2 --encoding=utf-8 --encoding=latin1 cvs svndumpfilter exclude CVSROOT < svndump > svndump2 gzip -9 svndump2
  4. upload file svndump2.gz to SourceForge
  5. start a shell service on SourceForge and type the following commands
  6. adminrepo --checkout svn zcat svndump2.gz | svnadmin load /svnroot/rodin-b-sharp adminrepo --save svn

Note that the filtering on CVSROOT didn't seem to work as expected: this directory still occurred in the SVN trunk and had to be removed manually.