CVS - Concurrent Versions System

From this site you can browse the CVS repository that holds current versions of the Utrecht TWIN STARS computer code (a version of Peter Eggleton's TWIN code) and other utilities I use for my research. Note that access to these is restricted!

CVS Overview
Obtaining a CVS tree
Keeping the CVS tree up-to-date
Branches and tags
Switching branches
Comparing versions and using patch
Browse CVS Repository

CVS Overview

The cvs tool makes it easier to work on a project with a group of people. Such a project can be a programming project, but it might also be an article, say. The essence is that the files that are worked on are stored in one central location, the CVS repository. Each person working with the files `checks out' the repository and downloads the files locally. Changes are then made locally and can easily be merged with the repository later, usually without interfering with the changes made by others.

CVS also makes it easy to make sure that the same version, or at least a well-defined version, of a programme is in use by a group of people.

Last but not least, CVS makes it easier to roll-back changes to an earlier version of a file.

Obtaining a CVS tree

To obtain a local copy of a CVS tree, use the `cvs' commandline utility. This requires NFS access to the fileserver kasper (or remote acces to venus.phys.uu.nl). For instance, to obtain the CVS version of the Utrecht TWIN STARS code, one would type:

cvs -z6 -d /kasper/strknd/glebbeek/cvsroot checkout stars

After the end of this run, the CVS version of the Utrecht TWIN STARS code will be available from the stars/ subdirectory under the current directory.

As a convenience, it's also possible to do a CVS checkout through your webbrowser. Follow the link at the bottom of this page to the STARS CVS page, select a branch or tag you want to checkout and click the download button.

Branches and tags

Perhaps the most confusing aspect of CVS is its distinction between trunk, branches and tags.

Graphical representation of a CVS tree

Imagine that there is a single version of a computer code that we start with. This is what we will call the trunk, or CVS mainline. This is the central version of the code from which we derive new versions.

A branch is basically a version of the code derived from the trunk and developed along more or less independently from the main line. The Utrecht TWIN STARS code, for instance, is a branch of the original TWIN STARS code by Peter Eggleton.

A tag is a labeled set of files within the repository. Each file in the CVS repository has a version number that increases whenever it is updated. This makes it awkward to specify which version of the code is in use because all files have a different version number. By tagging the files, for instance as `version_2005_1', makes it easier to specify which version is in use. Tagged versions never change after their tag is applied.

A special tag is HEAD. Using CVS HEAD ensures that you are using the latest cutting-edge version of a computer code. However, it makes it again somewhat awkward to say which version is in use exactly.

Keeping the CVS tree up-to-date

To keep the CVS tree up to date, go to the directory that holds your local copy (stars/ in our above example) and type

cvs -z6 update

Since CVS stores all the information it needs in the directory tree where we downloaded our initial revision no additional information is required. To update only a specific file, one can also do

cvs -z6 update file

Switching branches

The update command can also be used to switch to a specific tagged version or branch of the code by using the -r switch:

cvs -z6 update -rtag

The tag HEAD always refers to the current CVS trunk or the currently most resent version in the CVS repository. The tag BASE always refers to the version you last checked out or updated to, so that you can always see what changes you made, even if the CVS repository has been updated since you last checked it out.

Comparing versions and using patch

To compare the local version of files with the repository, use cvs diff:

cvs -z6 diff -u

This will generate output similar to the diff command, which can be used to revert or apply changes with the patch command. To apply a diff file to the local tree:

patch -p0 < patch.diff

To reverse (undo) it:

patch -p0 -R < patch.diff

cvs diff can also be used to generate a list of changes between the local version and a specifically tagged version, again by using the -r switch:

cvs -z6 diff -u -rtag

To specify the changes made locally since checkout, a particularly useful form is

cvs -z6 diff -u -rBASE

Again, you can of course also specify a filename directly.

Browse CVS Repository

The CVS commandline utility works great if you are working with a large batch of files or are only interested in differences with the current tree. It is not so easy to use to keep track of changes in individual files. This is where the repository browser comes in handy

This is a web-based PHP interface to the repository. Using this you can easily see the comments in the changelog for each file, generate diff files for different versions of the files in the repository and view or download a specific version. It does not work so well for operations on a large group of files, but there the commandline cvs utility shines. Divide and conquer.

The Utrecht TWIN STARS code

The Utrecht TWIN STARS code CVS module currently has two release tags: v2005_0 and v2005_1. There are also two branches: nucleosynthesis (containing Richard Stancliffe's nucleosynthesis code from the Cambridge STARS code, to be merged back to the trunk when it works well enough in this version) and a version containing code to allow the evolution of merger remnants (restricted acces). You will notice that there are also branchname_branch_point tags in the trunk. These identify the revision from which the two branches was initially made.

Please see the CHANGES file in the root directory of the repository for more information on the changes between tagged versions and branches.

Browse the TWIN STARS code CVS repository
Browse the TWIN STARS code CVS repository (nucleosynthesis)
Browse the TWIN STARS code CVS repository (mesh dependent ENC) (Restricted!)

Yorick plotting routines

Yorick plotting utilities

Make Me An Eggleton Star

MMAES

Tools

Tools for running the code and plotting results
Valid HTML 4.01! Valid CSS!