CVS Term Soup

by rp

CVS Tree

I keep getting confused with terms with CVS esp. when I have to start doing some stuff that I usually don’t have to do on a regular basis. So writing it here so that I can refer to it later.
Trunk: The trunk is the mainline code base. Its similar to a branch with no name, so by default all the commits go to this nameless branch.

Branch: Its an alternate place on the codebase where the commits go other than the trunk. The idea behind is when developers want to work on fixes for a particular release where as other set of developers work on the next release. Then doing a branch is useful. My previous post Branching and Merging Code in CVS has more details on how to use it.

Working Directory: Working directory is the current directory where the code was checked out.

Tag: A tag identifies a set of revisions of files in the repository. There are two kinds of tags: static and branch.

Sticky: The term ‘sticky’ in CVS has two somewhat different meanings depending on the context. If you have checked out from a static tag, then those files in your working dir will be ‘stuck’ to that tag – and you won’t be able to commit changes to them until you ‘unstick’ them. This is because there may not be a place for that change to go. For example the tag may identify revision 1.5 of a file which already has a revision 1.6. Since there already is a revision 1.6, you can’t make a new revision 1.6 (unless of course you make a branch…)

Branches on the other hand, are implemented in CVS by being ‘sticky’ to a branch tag where commits are allowed and go into that branch rather than the Trunk. In this sense a branch tag is also known as a ‘sticky tag’. So if you have a branch based at the above file’s 1.5 revision you can now make a commit to that branch. The new file will have revision number similar to 1.5.1 meaning it is the first revision based on revision 1.5. This is a completely different revision of the file from 1.6 as it is on the ’1.5 branch’ of that file.