Forum archive 2000-2006

Michael Gage - Adding files to the CVS

Michael Gage - Adding files to the CVS

by Arnold Pizer -
Number of replies: 0
inactiveTopicAdding files to the CVS topic started 5/15/2003; 10:30:03 AM
last post 5/15/2003; 10:30:03 AM
userMichael Gage - Adding files to the CVS  blueArrow
5/15/2003; 10:30:03 AM (reads: 3536, responses: 0)

HowTo use the CVS.

Contributing to the CVS

is similar to creating an anonymous repository for the CVS. You will require your own login name (e.g. mylogin is used below) and a password. Read the instructions at http://webwork3.math.rochester.edu/webwork-cvs-instructions.

In order to contribute code or problems to the CVS you must have an authors account with the CVS. Write Mike Gage gage@math.rochester.edu or Arnie Pizer apizer@math.rochester.edu to obtain an authors account and permission to upload problems to a CVS repository.

Creating an authoring repository

Set the address of the CVS server
Instructions for Unix (tcsh, csh shells)
% setenv CVSROOT :pserver:mylogin@webwork-db.math.rochester.edu:/var/cvs/system
or instructions for Unix (bash shell)
% export CVSROOT=:pserver:mylogin@webwork-db.math.rochester.edu:/var/cvs/system
Login to CVS server
% cvs login
(Logginging in to mylogin@webwork-db.math.rochester.edu)
CVS password:
You need to enter your password to this prompt.

An error message at this point likely means that you have not defined CVSROOT correctly in the first step.

The remainder of these instructions are the same as for creating an anonymous repository. We repeat the instructions for creating a repository of problems, since that will be the most common need for authors at other institutions. See Anonymous CVS) for creating a WeBWorK 1.8 system or how to use CVS with WeBWorK2 to create a WeBWorK2 system.

Setting up a local problem collection using CVS

To obtain the standard rochester problem set (included with the standard distribution)
Transfer to a directory, say ~/tests/problems and type
cvs checkout rochester_problib
This will create a directory ~/tests/problems/rochester_problib which will contain the top level set directories (e.g. setDerivatives1, etc.) which in turn contain the .pg files for the problems.
To obtain the collection (untested) of eighth grade math problems
cvs checkout rochester_grade8problems
Updating the problems is done by changing to the appropriate directory and typing
cvs update -d
or type
cvs -n update -d
to see which problems would be updated. You can also use this to determine which files you have modified locally. (They will be marked with an M.
The -d flag allows new directories to be created. If only minor updates are expected you, or for some reason you don't want the directory structure changed in the local repository, then you can omit the -d.
The files which will be changed are preceeded by a letter. The letters stand for:
M  The local copy of the file has been modified, but the CVS server's copy has not been changed. This indicates that you have made some local modifications to this file.
U   A copy of this file will be downloaded from the CVS server
P   The local copy of this file will be "patched" so that it agrees with the copy on the CVS server. This has the same affect as the U letter, but it is faster, since only portions of the file actually need to be downloaded in order to bring the local file up to date.
C   There is a conflict between changes which you have made locally and changes which have been made on the CVS server file. If you update this file you will need to examine it with a text editor in order to reconcile the two different versions. (Search for the characters "======" -- they indicate a region where changes have been made in both files.)

Files which have not been modified will not be listed.

Commiting new problems, or revisions to old problems.

In the directory with a new file newproblem.pg type
cvs commit newproblem.pg
An editor will appear, which allows you to enter comments. Say (briefly) what the new problem is, or indicate changes that you have made in an old problem.
Exit the editor (how you do this depends on the unix editor, e.g control-X for pico or nano or use escape, then capital Q, then wq for vi (ugh) ) Your comments and the new problem will be uploaded to the master CVS repository.

<| Post or View Comments |>