echothrust/howtos

A list of OpenBSD (mostly) material

View on GitHub

General Things To Know About CVS

Author: Pantelis Roditis Created: 2006/08/14 05:08

Introduction

Here is a basic tutorial for CVS for new users. If you are new to CVS these are some basic commands to help you.

Basic Commands

How to add a new user

In order to add a new user you need to modify two files, the passwd and the readers/writers file. Both files can be found under the CVSROOT directory.

The first step is to add the user into the passwd file. The file looks something like:

user1:-p1MW3dBhIj3w:cvs
user2-pgh0UZHzz4ho::cvs
user3:-pRzNIIV2J0L6:cvs

Where, user1 is the username of each user, p1MW3dBhIj3w is the encrypted password of the user and cvs is the optional system username.

In order to add a new user simply copy a line and change the username and the password in its encrypted form. In order to encrypt the password type:

encrypt -s SA -p
Enter string: type here the desired password

After adding the user to the passwd file, you also need to add him/her into the readers or writers file (see more details about readers and writers file in the sections that follow).

The readers/writers files look something like:

user1
user2
user3

So just simply type the user you desired to add in a new line.

How to give write access to a user

In order to give write access to a user, simply add his/her name to the writers file which can be found under CVSROOT directory. The writers file looks something like:

user1
user2
user3

To add a new user into the writers file, simply add that user in a new line. Save and exit.

How to give read only access to a user

Similarly to above, but this time the name of the user is added in the file readers which can be found under the CVSROOT directory. The readers file looks something like:

user1
user2
user3

In order to add a new user to the readers file, simply add him/her under a new line. Save and exit.

Start a new project

In order to start a new project follow the following steps:

Where:

NOTE: cvs will ignore certain files based on some rules:

  • Empty directories will not be imported (you can fix this by simply creating a dummy file like \ find . -type d -empty -exec touch {}/.dummy \;
  • Certain filename and directory patters will not be imported. This can be fixed by adding -I! after the import, so the command will look like \ cvs import -I! -m "mycomment" myproj echothrust start

How to create new file/directory

The added files will be placed in the repository after a cvs commit will be performed. If a file was removed and a cvs commit has not taken place yet, you can retrieve that file using cvs add.

Similarly, in order to create a new directory in the repository firstly you need to:

NOTE: You cannot add an empty directory into the repository. You need to create a file into the directory and then you can do:

cvs add new_directory
cvs add new_file