The K Desktop Environment

Chapter 2. Working with files

All commonly used CVS functionality is directly available in Cervisia's main view. Commands usually act on several files at once, namely all which currently selected. If the selection includes directories, its interpretation depends on the settings made under the Options menu. For example, if Options->Commit and remove recursively is checked and you choose File->Commit... while a directory is selected, then all files in the tree under that directory are commited. Otherwise, only the regular files in the directory itself are affected.

You can simply edit a file by doubleclicking on it or pressing Return. This starts the editor configured under Options->Settings... with the file name as argument.

2.1. Adding files

Adding files to a project requires two steps: First, the files must be registered with CVS. To this end, mark all files to be added in Cervisia's main view. Then, choose File->Add to repository. Cervisia issues a command

 cvs add filenames

If the operation was successful, the status column should have "Added to repository" for the added files.

In order to actually put the files into the repository, you must commit them. This procedure has an important advantage: You can commit the files together with modifications to other parts of the project. When doing this, one can easily see (e.g. in commit emails) that all these changes are part of a whole.

CVS is not designed to provide meaningful revision control for binary files. For example, merging binary files normally does not make sense. Furthermore, by default CVS performs keyword expansion (e.g. on the string $Revision: 1.5 $) when a file is commited. In binary files, such replacements may corrupt the file and make it completely unusable. In order to switch this behaviour off, you should commit binary files (or other files, like Postscript) with a command line

 cvs add -kb filenames

In Cervisia, this is achieved by choosing File->Add binary...