www.ntnu.no *
INFOWEB >  developement and programming >  tools  > TortoiseCVS
Tasks
You may add comments
Or e-mail this article
Read articles written by thomasan
User rating
How much did this article help you?
Much Some Little
Print preview
You do not need a 'printer-friendly page' to print this page. Here's why
Contents

TortoiseCVS

The Program

TortoiseCVS is free and can be downloaded here. It's also installed on all general computer labs.

To install the client on you own machine you need to download the install file from the link above. When you've installed the program you'll see that some new choices has been added in the popup menu you get when you right click on a folder or file in windows explorer.

Before you begin

Before you start to use the program you should change some settings:

Preferences - Main

Getting ready to use CVS

When you want to start to use version control on a file or a folder you first need to decide if you want to have the repository (file storage) locally on your PC, or on another machine (e.g. your home directory on stud). After you've set up the repository the usage of the tortoiseCVS program will be the same.

In the article the word "project" is used. A projects can in this context either be a single file or a folder with one or many files

Using version control on a project with a local repository

The first thing that needs to be done when you want to use CVS is to create a CVS-root. In this everything you add to the CVS will be stored. The first this you should do is to make this folder. In the example below I've named this folder D:\testcvs\cvsroot.

Then you need to locate the folder you want the add to the CVS. This folder we've called content.

If you now right click on the folder content and choose CVS - Make New Module..., you will get a dialog box. If you've used TortoiseCVS earlier and already used some CVSROOTs, these will be listed in the top field in the dialog box.

If you've not changed any of the symbols for the different states of file/folder, the folder content now should get a greenish icon(which means the folder has been added to a CVS)

Local repository

Creating version control of a project with a central repository

If you want to use a central repository you need to have already created a repository in the folder you want to use (make a local repository so you can create CVSROOT folder with the accompanying files.) When you've done that do the following to add a folder to the repository:

central repository

Adding password keys

It will be practical to add a password key so you don't have to type inn your password every time you want to do a task. Instructions:

Dialogboks

Checking out a project

If you already have a repository somewhere and wish to check out a local copy. If there are more than one person cooperating on a project it is wise that all members of the project checks out a local copy and commit the files you edit.

Working with the project

When you've made some changes to a file you have in CVS you'll see on the icon by the file in explorer has changed to red from green. That means the file differs from the file in the repository.

Diff

If you've added a program to see differences between versions of files (like WinMerge) You can now right click on the file and select CVS diff... to see the changes that have been made.

Committing

To commit a file(adding a new version in the repository) right click on the file and choose CVS commit. The file will then get a new version number in the repository. If you made changes to more than one file in a directory you can commit the entire directory the same way you commit single files.

Committing

Update

If there is a new version in the repository and you wish to update the file, right click on the file and select CVS update. Directorys can be updated the same way.

Adding a file

If you've created a new file or folder in a directory that is already in CVS you'll get a question mark as an icon. This means that that file is not in the repository yet. If you want to add the file to the repository, right click on it and choose CVS add.... Click OK and add a comment if you like.

Remove a file

If you want to remove a file from the repository you can do this by right clicking and choosing CVS - Remove.

Other options

If you right click on a file you'll have some more available CVS tools. The most useful are:

Menyen

History...

Shows the file's history, including version number.

Revision graph...

Revision graph...

This tool gives you a graphical display of the file's history. The graph shows branches as hexagons with the branch's name in the middle.

If you right click on one of the versions you'll get the option to fetch the selected version from the repository.

Other resources

The user manual that is included with the program (find it as Start - TortoiseCVS - User guide has more information. There is also some info on the official homepage.


Languages: en flag_no Comments: 0 Aid: 359 User rating:
 
 
Last updated: 2007-06-20 Author: thomasan Read: 3820 times