CVS (Concurrent Versions System)
CVS stands for Concurrent Versions System. CVS allows us to keep several versions of a set of files. The original set of files are stored in a central repository. Personal copies of the file can be copied in your directory and you can edit that copy. You can also view what all changes were made by others and when. You can even update your copy when new versions come in the central repository. This updation is a very important feature of the CVS. The changes are merged with your personal copy. After the final changes have been made, the personal copy of the file can be put in the central repository.Advantages of CVS
CVS helps in two important cases:
- It enables various developers to work simultaneously on a single project.
- It allows to check the creep in of bugs.
This tutorial explains various CVS commands, such as checkin, checkout, diff, watch, tag, status, logout, and login. CVS uses a standard convention for all commands. You can invoke CVS commands using the following:
cvs [cvs_options] cvs_command [command_options][arguments]In the above syntax:
- cvs: Invokes the CVS program.
- cvs_options: Retablesents global options that affect all actions specified after them.
- cvs_command: Retablesents the task or action to be performed.
- command_options: Specifies the task performed earlier. These options are command specific.
- arguments: Specifies the files on which a specific task is to be performed. You can choose to explicitly specify the file name. If you do not specify the file name, CVS performs tasks on the current file.
cvs add –m "New file" newfile.txtYou can use CVS commands depending on the environment in which CVS is installed. Some of these commands are specific to the server, which are used to connect to the CVS repository. You can use CVS commands to perform common tasks, such as working with files and directories. The various CVS commands include:
- init
- checkout
- commit
- add
- remove
- diff
- edit
- watchers
- editors
- import
- export
- history
- log
- annotate
- tag
- status
- server
- update
- rdiff
- rtag
- release
- login
- logout
The server command starts the CVS server. This is only used while troubleshooting CVS.
The admin Command
CVS provides an interface for various administrative purposes using the admin command. This command should be used carefully because any changes made using this command affect the entire repository and its end users.
On Unix or Linux, end users belonging to the cvsadmin system group can run the admin command. If you do not want end users to invoke admin, keep the cvsadmin system group empty. On Windows, there is no cvsadmin system group. As a result, all end users can invoke the admin command.
The default behavior of the admin command is recursive. As a result, you do not need to explicitly specify the –R command option. It is tableferable to explicitly specify the files on which the tasks are to be performed.
