Import a CVS repository into Fossil

afbeelding van VinceW

Ever since the beginning of EurInSol's development of software, we are using CVS as our Version Control System (VCS) to store our projects. CVS was our choice at the time, since it was mature, stable, documentation of good quality was available  and it was Open Source software. Lately various reasons made me decide to look around for another SCM to store our projects in. One of my candidates, and a very good one, is Fossil. (The reasoning on why I find Fossil a good candidate is subject for another post). 

With a VCS one can record the history of sources files, and documents. When EurInSol is going to change it's repository system, one of the criteria that has to be met is this one: keep the history. So the question for this post is: Can a CVS project be stored into a Fossil repository?

 

CVS | Fossil = FALSE   but  CVS | Git | Fossil = TRUE

Directly from CVS | Fossil ..... in short... no. CVS can't export to a Fossil format and Fossil can't read a CVS repository. There is an article on this topic (Import CVS Repositories) at the Fossil site, but I don't know what priority those plans have. So Fossil can't import from a CVS repository (yet) but Fossil can import from a Git repository. Here is the article (Import And Export) on this at the Fossil site. 

I recalled I had a post in my bookmarks about the importing of CVS code to Git. (For those interested... It was a post of Meitar Moscovitzit (a social justice technologist specializing in semantic web development). Here is his post on:  How to import CVS code repositories into Git using `git cvsimport`)

 

Since a proof of concept looked like a good start to me, here it is:

CVS | Git (as per Meitar's post)

  • Install the git-core package (with git-cvsimport included)
  • Have the cvsps command-line tool installed
  • Prepare your CVS login information for the remote server before you run git cvsimport (for instance: CVSROOT=:pserver:username@server:/path/to/cvsroot cvs login)
  • Finally, run the git cvsimport tool, and specify the proper options (for instance: git cvsimport -v -d :pserver:username@server:/path/to/cvsroot path/to/module)

 

a new Git repository has been created.

Git | Fossil (as per Fossil Import/Export specs)

  • Go to the directory where the git-repo lives
  • Export the git repository into a new Fossil repository (git fast-export --all | fossil import --git new-repo.fossil)

 

The Git repository is now in (a new) Fossil repository. 

So far the theory that CVS code can be imported into a Fossil repository (with help from Git). The concept works. This said, more work on this has to be done. For instance... how about the data integrity? Was there any loss, was data altered during the conversion, and if so where did this happen? In short... the work just begins :-) but on the other hand... that could be input for a follow-up post on this. If anyone has any experience in this area, feel free to contact me about it.

 

Sources / References:

Reacties

Reactie toevoegen

Plain text

  • Geen HTML toegestaan.
  • Adressen van webpagina's en e-mailadressen worden automatisch naar links omgezet.
  • Regels en alinea's worden automatisch gesplitst.
Geef de karakters in die u in de afbeelding ziet. (verify using audio)
Neem de tekens uit het bovenstaande figuur over. Waneer de tekens niet duidelijk zijn, kunt u het formulier verzenden om een nieuw figuur weer te geven. De tekens zijn niet hoofdlettergevoelig.