Next Previous Table of Contents

### 13. CVS Integration

KDevelop also takes care of managing your project via CVS repositories. The goal behind CVS (concurrent version control) is to enable groups of developers to work on the same source-tree independently and to merge changes into the repository. Usually, the repository is located at a server. The initial repository contains the base set of files that the project includes; directories and files are then added or removed to the CVS by the developers. Locally, the developer works on his copy of the CVS tree. He writes his changes into his files and tests, if his project still works, at least to a certain extend where incomplete sources don't prevent other developers from still working on the CVS repository if they receive the changes.

### 13.1 Creating a Repository

When creating a new project with KDevelop, you can directly import the project as a CVS module. To enable this, you have to have CVS installed (which should be already, if not, revise your system installation or contact your system administrator).

On the third page of the KAppWizard (VCS support), choose "CVS". Then the editing fields of this page get active and you can specify the import parameters, see below for the given options. The KAppWizard will then import the project source tree as a module into the CVS root directory and create your new project as a local copy of the CVS source tree that you will be working on.

Attention: to create an initial repository, you have to have write access to the CVS root directory ! Also the CVS root directory has to be on the same machine where you´re running KDevelop ! If you want to have the repository on a dedicated CVS server either contact this servers´ system administrator to create the project with KDevelop on the server machine or do the following steps:

- create your project locally
- import the project source tree as a module on the CVS server
- delete local project source tree
- check out the project source tree from CVS
- enable CVS support in the project options dialog as described below after loading the project file of your CVS copy you checked out.

For more details on CVS commands, please revise your system help on cvs, e.g. by doing a `man cvs`.

In the following we will discuss the options when creating a repository with the KAppWizard

VCS Location:

  This is the CVS root directory where the project source tree will be imported and where commits, checkouts and updates take place.

Repository in CVS

  This is the module name given for your project. As this is the same as your project directory you can´t change that.

Vendor Tag

  this is a tag for the entire branch

Log Message

  is the first log message entry of the new module. When adding or commiting to the repository, you will be asked for a log message each time to document your changes to the repository source tree.

Release Tag

  this specifies the tag under which your project source tree can be found, meaning that you can create several projects with the same module name in the CVS root which differ in the tag, so you can work on different branches of the same project. Example: KDE 2 is developed under the tag HEAD (default tag), KDE 1.1.2. can be found in the tag KDE_1_1_2_RELEASE.

After creating your project with the KAppWizard, the CVS support option is already set for your project, so you can commit and add changes in the way described below in the section "Using CVS Commands".

### 13.2 Enabling CVS Support

As CVS support is most often only needed by professionals or companies as well as by KDE developers maintaining their project over the KDE CVS server, using the CVS commands of KDevelop is optional. To enable the CVS commands, open the Project-Options dialog and change the option for Version Control to "CVS".

### 13.3 Using CVS Commands

Then the following commands are available in the LFV and RFV by context menus:

Over a file not included in the repository:

- Add to Repository: adds the file to the repository. The file is set up to be added and will be introduced to the repository on the next `commit` command that includes the directory where the added file is located locally.

Over a file included in the repository:

- Update: update the selected file with the CVS version
- Commit: commit the selected file to the CVS repository
- Remove from Repository: remove the file from the repository

Over a folder:

- Add: adds the folder to the repository
- Remove: removes the folder from the repository
- Update: update the folder recursively to be in sync with the repository
- Commit: commit any changes recursively to the repository

The CVS commands all require a working network connection to the CVS server. When invoking a command, you will be shown a dialog with the command sent to the CVS server and the retrieved output. Thereby you can control what actually happens and if the command was successful or not.

As the CVS commands of KDevelop only work with the `cvs` system command and its commandline options, you should have no trouble to use the cvs features.

Next Previous Table of Contents