THIS HAS MOVED

CVS Client Installation
Elsewhere
In the Works
  • Don't use CVS for massive volumes of data (like maps), consider a database instead
  • I spent a really long time making changes with an old CVS checkout. I am afraid if I use CVS my edits may be merged prematurely with other people's changes, can I still use CVS? Of course, just make a branch!


WinCVS and other Tips

Cvs Admin Menu - Performing a Clean Checkout
Make sure ALL TARGET FOLDERS ARE DELETED before initiating a clean checkout. Otherwise some of the state files in the special CVS directories that are placed in every checked out folder may not acurately reflect the files being checked out. Classic symtom of an invalid clean check out is CVS thinks files are not checked out and even though a checkout of them was just completed.

CVS hangs on large binary files
Preference globals tab, enable Use TCP/IP compression. This only compresses data transfered between the client and server. However, it seems to be a workaround for transfer hangs of certain binary file types that occur when compression is not enabled. This may be a bug in WinCVS that may be fixed in a later version. I have not seen Linux, or MacCVS have this problem.

Re-adding a file
Performing a CVS remove file command does not elimiate all traces of it from the repository. If at some later time the file is re-added, the Attic/filename,v with dead state is moved to filename,v and given an exists state in the CVS repository. Now because MS Windows is somewhat case insensitive, a problem can arise if the re-added file is the same name with slightly different case letters. The symptom of this is that a re-added file can't be commited because the exact case sensitive Attic/filename,v can't be found. To resolve this, either attempt to guess what the file case originally was, or gain access to the CVS repository and look in the Attic for the exact case spelling of the file, then re-add and commit should work.

WinCVS - files are present but don't show in window!
This is a fun one. Sometimes, without warning WinCVS will startup with a View Filter settings set strangely. The Show Changed setting if disabled will hide all files WinCVS view window! Check this setting and other similar ones to make sure you are seeing everything you expect to see. Be carefull, the settings are very subtle and can be very misleading! Elsewhere: Source Forge: CVS Filters


CVS Tagging Tutorial

The following assumes the use of WinCVS

  1. Decide on the text string you would like to use for the tag you are about to create. See below for some tips on what kind of text strings make the most sense.
  2. readme.txt - this file should reside in the root module directory. Add a comment detailing the tag text string and what significance it has for the module's state. Check in readme.txt changes. Sure, you could skip having such a file or just neglect keeping it up to date. However, TAGS WILL BE MEANINGLESS UNLESS THEY ARE DOCUMENTED SOMEWHERE!
  3. In the left browse pane, select the module directory you would like to tag. For instance, if C:\PUBLIC\DEV\EDITOR\C2\assembler.cpp is in the root directory of the module you would like to tag, then select C:\PUBLIC\DEV\EDITOR\C2 in the left browse pane.
  4. In the left browse pane, left click on the selected folder, Create Tag.
  5. Fill in New tag name with the text for the tag you would like to create.
  6. Click OK. Wala, your done!
Tag Nomenclature: [module][major][minor][patch]
e.g. Tag FOO030407 equates to ...
module = FOO
major = 03
minor = 04
patch = 07

Here's a sample readme.txt file documenting a modules tag history
README



CVS Tag History

---------------

C2010101

ntree control functional



C2000102

rename ntree.cpp -> ntree.c



C2000101

some INI capability



C2000000

First check in of Gus's 'classic' code


CVS Branch/Update/Merge Tutorial

Make a clean checkout of a known working module. Often you may look at a past tag of a project and checkout a specific tagged state of it clean to insure that you have a good base to work from.

If you decide not to create a branch, you can do an update with the clear sticky bit to freshen your working directory with the main trunk files.

Now, create a branch. On WinCVS, in the left pane right click on the module root you want to branch, Tag Selection, Create branch. Make sure you use no spacees or other nonalphanumerics (e.g. BRANCH1).

OK, now the CVS repository has a notion that BRANCH1 is a sperate code state from the main trunk, even though at the moment they represent the same file state. Even though BRANCH1 may seem like a normal tag, it actually refers to the tip of the branch just created. As commits of changes to the branch's files occur, the BRANCH1 tag will move forward to always represent the tip of the branch's file state. If you need to mark a certain file state, use the standard tagging proceedure.

From this point on, a seperate file state will be maintained for the files checked out to the branch work directory. Any changes checked in will not affect the main trunk. .

At some point you may decide that you still need the branch to work in, but some changes in the main trunk have occured that you would like to pull into you branch. This is tricky.

Ultimately you will finish whatever tweaks are need to the branch files, check them into the branch, and decide that the brnach needs no more work. At this point its time to merge/join the branch changes into the main trunk. This too is tricky. . . . . . . . . .


Common CVS Commands
  WinCVS (circa v1.2) Classic Command Line (Linux)
environment prep
Menu: Admin: Preferences
Root: CVSROOT=:pserver:loginname@server.net:/cvsroot
Authentication: "passwd" ...
Remote
$ export CVSROOT=:pserver:loginname@server.net:/cvsroot
Local
$ export CVSROOT=/cvsroot
login Menu: Admin: login
Remote
$ login
Local
N/A
tag hilite file or folder
Menu: Modify: Create a tag on selection ...
New tag name: BOGUSMOD20010909_FIXED_FOOBAR
$ cvs -q tag BOGUSMOD20010909_FIXED_FOOBAR
checkout ... $ cvs co module
(this will create a 'module' directory)
update ... (cd to 'module' directory, e.g. $ cd module)
$ cvs update -R -d
update
sticky
...
Sticky options
- Retrieve rev /tag/branch: TAG123
(cd to 'module' directory, e.g. $ cd module)
$ cvs update -rTAG123
update
remove sticky
...
Update options
- Reset any sticky ...
(cd to 'module' directory, e.g. $ cd module)
$ cvs update -A
update
non-destructive
N/A ? (cd to 'module' directory, e.g. $ cd module)
$ cvs -n update
     


Dangerous But Useful Commands

Outdating files - VERY dangerous but usefull when disk space is low and repository has been very active ...
cvs admin -o ...