Wednesday, October 27, 2004

More Subversion

Well, this is going to be interesting.

cvs2svn ( is a python script that converts cvs repositories to svn format. I ran the script to create a kdelibs subversion repository. It goes through the cvs data and builds a list of atomic commits. Then it checks for tags and branches. make_it_cool seems a popular branch and tag name. With some command-line switches all this is resolved. It then commits to the subversion repository.

Cvs keeps branches and tags in the same file. Each change is a patch to the previous version. A tag is simply a version number, ie. KDE_3_3_RELEASE refers to a version number in each file. A branch is again a patch to the previous version. In Subversion, each branch is a separate tree. Doing a list command on the kdelibs module gives us:

# svn list file:///home/extra/kde-svn/

trunk is where HEAD is kept. tags contains all the tags defined in the cvs repository, ie.

# svn list file:///home/extra/kde-svn/tags

Each tag contains all the files (or pointers to, not sure) with that tag. The same in the branches directory. There are quite a number of branches that will need to be cleaned up, ie. unlabeled-1.98.2/. In other words, for Kde to move to Subversion won't be a matter of simply running the convert script and living happily ever after. There will need to be a fair bit of cleanup.

Subversion contains some nice features that will be very useful. The list command gives a directory listing of the repository, so you can browse the directory structure, view the logs, diffs and cat files without checking them out. In cvs, each file starts with version 1.1, and each time the file is changed a version number is assigned to it, and to it only. If there are 3 revisions, they are 1.1, 1.2, 1.3. With subversion, if you commit a change to one file, the whole repository version is incremented. So individual file revision numbers are not consecutive. A file may have a version 20456, 30876 and 56876. It will take some getting used to.

I may have some of the terminology wrong, so don't quote me. I'm figuring this stuff out as I go.

Nice KDE rlated blog. Visit my kde neumiera sa tam blog.
Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]