Chapter 2. Basic Usage of TortoiseCVS

Table of Contents

Sandboxes
Checking out a Module
Windows Explorer and TortoiseCVS
Total Commander and TortoiseCVS
Updating your Sandbox
Committing your Changes to the Repository
Resolving Conflicts
Adding Files and Directories to the Repository

Sandboxes

CVS has a unique method of working from most other version control systems in that developers can edit the same files concurrently. First you Checkout a version of the source code from the repository into a local copy on your computer. This local copy is called a sandbox.

You then simply edit the files that you want to change. You can Add new files or remove files you no longer require. When you're done you Commit the changes to the repository.

If someone else has changed the same file while you were working on it, then the commit will fail. You must then Update all your source code files from the repository. This will automatically merge the other developers changes into your copy of the file.

Sometimes CVS cannot do this automatically, for example if you both changed the same line of code. This is called a Conflict. Conflicts happen much less often than you might expect. CVS puts both versions of the conflicting code in the file, with markings separating them. Then you manually edit the file to resolve the conflict before you can commit the changes.

This method of working has lots of advantages. Each developer lives in a sandbox. Changes that another developer makes are isolated from you until you want to check in your changes. It stops bottlenecks where people cannot do things because someone else has the file checked out. Any developer can work on files without direct access to the server, they only need to connect to update or commit.