SCOUG Logo


Next Meeting: Sat, TBD
Meeting Directions


Be a Member
Join SCOUG

Navigation:


Help with Searching

20 Most Recent Documents
Search Archives
Index by date, title, author, category.


Features:

Mr. Know-It-All
Ink
Download!










SCOUG:

Home

Email Lists

SIGs (Internet, General Interest, Programming, Network, more..)

Online Chats

Business

Past Presentations

Credits

Submissions

Contact SCOUG

Copyright SCOUG



warp expowest
Pictures from Sept. 1999

The views expressed in articles on this site are those of their authors.

warptech
SCOUG was there!


Copyright 1998-2024, Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.

The Southern California OS/2 User Group
USA

SCOUG Programming SIG CVS Instructions

Overview

CVS (Concurrent Versions System) is a tool for managing source code development from multiple developers. It uses a client-server architecture via the TCP/IP RSH protocol. CVS is a powerful program - we'll be using only a very small amount if it's features.

We'll go over the process of downloading, installing, and using CVS.

Download and Install

Obviously you'll need to obtain a copy of CVS. Hobbes has two versions cvs110.zip and the slightly newer cvs1107.zip. Both are also included on the March SCOUG CD.

Either one will work, but the following examples were done with the newer cvs1107.zip. Unzip the file into it's own directory, say C:\CVS. You'll also need to have EMX installed.

You will need to make several simple changes to your CONFIG.SYS:

  • Add the CVS directory to your path.
  • Set the CVSROOT environment variable. The format of the environment variable depends on what type of server you're connecting to. The example we'll use is used to connect to a remote server with RSH: set CSVROOT=www.scoug.com:/csvdir
Once you reboot for the environment variable changes to take effect, you're set.

Usage

The fundamental concept in CVS is locking source code to make modifications. CVS manages this for you through the commands checkout and commit. But, before we can use those commands we need to look introducing files into the repository.

The import command will take all of the files in the current directory and add them to the repository. For example:

cvs import -m "Beginning of our project" ProgSig SCOUG Start Let's look at the parameters:
import
is the command
-m "Beginning of our project"
Specifies the comment to be included with the initial version of the files
ProgSig
The subdirectory in the repository to put these files into
SCOUG
The "Vendor" tag. Basically we'll ignore this
Start
The "release" tag. Again, we'll ignore it for now.
If we run the command we might see the following output. [E:\project2]cvs import -m "Beginning of our project" ProgSig SCOUG Start N ProgSig/rg.c N ProgSig/rg.h No conflicts created by this import The N character at the beginning of each line is the response that a new file was added. The second part of the line is the file that was processed.

Now it's time to checkout files so that we can modify them. Consider:

[E:\project2]cvs checkout . cvs server: Updating . cvs server: Updating CVSROOT U CVSROOT/checkoutlist U CVSROOT/commitinfo U CVSROOT/config U CVSROOT/cvswrappers U CVSROOT/editinfo U CVSROOT/loginfo U CVSROOT/modules U CVSROOT/notify U CVSROOT/rcsinfo U CVSROOT/taginfo U CVSROOT/verifymsg cvs server: Updating ProgSig U ProgSig/rg.c U ProgSig/rg.h U ProgSig/rg2.c U ProgSig/rg2.h The checkout command accepts the file or directory to check out. In this case we used . to indicate the current/root directory. CVS checked out the CVSROOT files to help it manage the files we've checked out. Then it checked out then entire repository relative to the current directory. Recall that when we imported the files we imported them into the ProgSig directory. Now that we're checking them out, a subdirectory named ProgSig is created.

If we make a change to one of the files, we need to commit the change so that other developers will have access to it. If we execute:

cvs commit ProgSig\rg.c CVS will prepare to check the file in, and then load TEDIT to allow us to prepare a comment. We could have used the -m parameter like we did during import. Once we save our comment we see: e:/cvsroot/ProgSig/rg.c,v <-- rg.c new revision: 1.2; previous revision: 1.1 done We have created a new version of the file (1.2) to replace 1.1. If we wanted to check the status of the module we just checked in, we'd use the log command: cvs log ProgSig\rg.c locks: strict access list: symbolic names: Start: 1.1.1.1 SCOUG: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/03/17 06:41:19; author: RWHITE; state: Exp; lines: +1 -0 Sample comment ---------------------------- revision 1.1 date: 2000/03/17 06:29:52; author: RWHITE; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/03/17 06:29:52; author: RWHITE; state: Exp; lines: +0 -0 Beginning of our project ============================================================================= Reading from the bottom-up, we see the comment associate with our import for revision 1.1.1.1 (the initial version). The version 1.1 was automatically created at the same time. Finally, when we checked in 1.2, we included the text "Sample comment"

We've hit the basics. Here are several references for additional reading, although none of them are as complete as they should be: