Department of Electronic Systems

TortoiseCVS

What is tortoiseCVS

TortoiseCVS is a popular program that adds CVS functionality to the Windows Explorer interface. It handles directories that are marked as CVS checkouts. TortoiseCVS is distributed under a GPL licence, and is therefore free to use, you can even download the source code if you want to add features yourself.

Basic use of TortoiseCVS

The TortoiseCVS installation is straightforward, just follow the installation instructions. Contrary to many programs, TortoiseCVS is not an actual application, but more like an extra layer on top of the explorer interface which gives you an extra set of options when you right-click on a directory.

init/import

To create a module in TortoiseCVS you initially create the directory structure you want in your project. After this, you right click on the directory and choose CVS->Make New Module. After this, you are asked for a CVSROOT, here you write

:ext:nfogh04@ssh.es.aau.dk:/afs/ies.auc.dk/group/05gr509/cvs

Where you replace nfogh04 with your own username and 05gr509 with your own group directory. You will be asked to give the module a name. Here you can choose p3 or p4 or whatever you like.

If a repository is not already created TortoiseCVS will ask if you want to create a new one, click "yes".

If everything works out ok the server will ask for a few passwords and then create the new module.

TortoiseCVS is not fond of importing all the files in the subdirectory right away, so it needs to be done afterwards. It can be done by right-clicking on the directory and selecting CVS Add Contents.

Checkout

The first thing you will want to use TortoiseCVS for is to make a checkout of a repository. To do this you will need to create a directory for your projekcs and right-click on it. After this, you will notice that you have got some more options. Click CVS Checkout, which will give you a dialog where you need to enter the folowing in the textbox after CVSROOT

:ext:nfogh04@ssh.es.aau.dk:/afs/ies.auc.dk/group/05gr509/cvs

Where you replace nfogh04 with your username and 05gr509 with your group directory.

The textbox at Module is the name your group chose to call the module when you created it (ex. p3 or p4).

Click OK and enter your password.

After this, TortoiseCVS will get all the files that is contained in the module. If every directory is not created, it is because TortoiseCVS does not create empty directories. This can be changed by removing the flag called Preferences->Policy->Prune Empty Folders

After the checkout you will have your local sandbox and some nice icons on your folders which shows that it is a CVS checkout. If you dont like the icons, you can even choose some others.

Add

To add a file to the repository, just right click on a file and click CVS Add.

Another way is to add a whole folder at once. This is done by CVS Add Contents. Though, here you need to be careful that you dont include a lot of unnessescary files which are likely to cause problems. When compiling LaTeX documents latex creates a lot of auxilliary files (.toc, .aux, .log) which changes all the time. If you add these files CVS will almost certainly complain about conflicts when others from the group updates their own sandbox. CVS Add Contents should only be used just after you have created a module, or if you are certain that there are only files needed in the repository.

Update

To synchronize the local sandbox you choose CVS update. If there are any conflicts, TortoiseCVS will inform you about this, and it is then up to you to resolve the affected files.

Commit

When you commit your work you are presented with a dialog where you can enter a comment about the work you have just done, and a list of the files that have changed. There is also a comment history so you can see what you have already made.

When you click OK, your repository is synchonized with your local sandbox.

Remove

You remove files from the repository by right-clicking on it and chosing CVS->Remove. Then the file will be moved to the trashcan, and will be removed from the repository at the next commit. You can recreate the file by recreating it from the trashcan and adding it to CVS again.

Advanced use of TortoiseCVS

Tagging files

To tag a file you chose CVS->Tag, now you are presented with a dialog box which asks you to choose the name for the tag. To check out the tagged files you need to to select the tab revisions. Here you chose choose branch or tag and enter the name you tagged the files with in the text box.

Binary files

Tortoise is generally pretty good at recognizing which files are binary and which are not. When adding files you choose if the file needs to be saved as binary or text.

Ignoring files with cvsignore

TortoiseCVS can be set to ignore certain files. This is done in Preferences->Ignored files. Here you can type in a list of the files which should be ignored. Wildcards (* and ?) can be used so you can exclude *.aux, *.log, *.dvi, *.ps, *.pdf, etc. TortoiseCVS itself has a small list of files that you definately do not want in the project. If you write a single exclamation mark !, this list is ignored, and the files are added anyway.

NThe cvsignore list is a very good way of keeping order in your cvs repository, so no temporary or binary files are added.