Skip past introduction.

WolfBlog

Reflections from a Swede in Norway.

Here you will find my small graffiti board where I write about things I come to think about.

In my blog, I write about the general unfairness of life, about spam mail, vintage computers, board games, Norwegians, current and not-so-current affairs, technology and whatever else occurs to me — in other words, a glorious mess. All opinion expressed here are of course my own, and all similarities with any living people is of course intentional.

These pages are using automatic language selection, if you prefer to read in Swedish, please use this page instead. See the help for info on how to make your web browser select the correct language automatically. A monthly overview is also available.

All text and pictures copyright Peter Krefting, unless otherwise noted. More about the author.

Importing revision history from CVS to Git

Published: Thursday 2007-09-13.

I have been using CVS to do revision control in several of my projects for quite some time, for instance this blog, and the web site it is part of, is revision controlled by CVS. One of the major problems of CVS is that it is centralised, which means that new users that are to be participate need to be allowed access, and also it means that you always need to have network access to be able to do anything useful. That is why I recently have become interested in distributed revision control systems.

My first attempts was as a translator for Dpkg when the then lead developer switched over to version control Dpkg with Arch. I never really learnt enough of Arch, and never really got an overview of how it worked, so the translation was left dangling for a while. Dpkg have now switched to using Git, which I have tried to learn quite a bit more. (Another project I am translating, Apt, is using Bazaar, a descendant of Arch that I haven’t had time to learn more about yet, either).

Since I found git to have a good structure I decided to try to move parts of my own projects to the system. I started with my Turquoise project, a statistics gathering tool for Fidonet and Usenet, which unfortunately has not been under very active development lately. Following the model of Dpkg, I decided to make sure I brought over the entire development history for the project. I first tried it with Git’s own git-cvsimport and Tailor, but none of them were able to import more than the CVS main branch, and I had several branches of side-development that I would like to keep.

To my rescue came Parsecvs that was able to import everything. The drawback with Parsecvs is that you have to have access to the physical CVS repository to run it, since it does interpret the files in the repository directly. It does, however, do it well, unless you have done something very magical with cvs admin. The result is that my project now has a Git repository on Alioth and that I have tried to activate it a bit more, at least I am planning to try and finish off the template handling that I started on at one time five years ago.

My only unsolved problem at the moment is to try and figure out if it is possible to modify the revision tree so that the merges I have performed in CVS can show up as Git merges (i.e insert an extra parent node for those versions).

Footnote: To convert the CVS repository to Git I performed the following steps:

  1. Created the file Authors that contained a mapping table for CVS users. In my case only the line
    peter=Peter Karlsson <peter@softwolves.pp.se>
  2. From a directory with the Authors file and the CVS repository in it, ran
    find turqstat -name "*,v" | parsecvs
  3. Copied/cloned the .git directory over to Alioth.
  4. Moved the definition of the imported branches from .git/refs/remotes/origin/ to .git/refs/heads

This entry is referenced in: But it does move and Now in Git.

Categories: software. Share: Facebook, Google+, email

| | Latest postings | This month | All months and categories

This page is best read on the Internet.

[Bloggportalen]

peter@softwolves.pp.se