Chapter 3. 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 folders, its interpretation depends on the settings made under the Settings menu. For example, if SettingsCommit & Remove Recursively is checked and you choose FileCommit... while a folder is selected, then all files in the tree under that folder are committed. Otherwise, only the regular files in the folder itself are affected.

Figure 3.1. A screenshot of Cervisia's context menu

A screenshot of Cervisia's context menu

The most used actions are also available by right clicking the files in the tree view, through the context menu. Figure 3.1, “A screenshot of Cervisia's context menu” shows Cervisia's main window context menu.

You can simply edit a file by double-clicking on it or selecting it and pressing Enter. This starts the default application that handles that file type (the default application for each file type is a KDE wide setting). If the default application is not the one you want to use, you can right click the file and choose the Edit With submenu, and select one of the other applications that handle that file type.

Adding Files

Adding files to a project requires two steps: first, the files must be registered with CVS, or in other words, added to the repository. This is necessary, but not sufficient. 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.

To this end, mark all files to be added in Cervisia's main view. Then, choose FileAdd to Repository..., or right click the marked files and choose Add to Repository.... The CVS Add dialog will appear, listing the files you marked, and asks for confirmation. Press OK.

Cervisia issues a command

cvs add file names

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

Warning

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.6 $) when a file is committed. In binary files, such replacements may corrupt the file and make it completely unusable.

In order to switch the above behavior off, you should commit binary files (or other files, like Postscript or PNG images) by choosing FileAdd Binary.... The CVS Add dialog will appear, listing the binary files you marked, and asks for confirmation. Press OK.

Cervisia issues a command

cvs add -kb file names