June 17, 2003
The address of the CVS server has changed. The address changes have been made in this document.
HowTo use the CVS.
Why use a CVS?
CVS
(stands for "Concurrent Version Server") enables you to acquire all of
the latest changes which have been made on our development server. The
changes are listed, file by file, so you do not need to do a complete
re-installation in order to get the latest bug fixes. One simple
command will update the entire repository. It is also possible to
update only selected files.
Will I get all of the new "bleeding edge" bugs, along with the bug fixes?
Our
CVS is set up so that one can keep up-to-date with different release
versions of WeBWorK. Most users will want to keep up with the latest
stable release, as described in these notes. This will provide fixes
for the bugs as they are discovered, and occasionally new features,
once they have been tested.
The latest experiments and
developments are kept in a separate release "tree" and are only added
to the stable release after they have been perfected and tested. For
those participating in the development of WeBWorK it is also possible
to subscribe to a "bleeding edge" release of WeBWorK.
Setting up a local version of WeBWorK 1.8 using CVS
The complete instructions are at http://webwork3.math.rochester.edu/cvs.html but here is a brief summary.
- Set the address of the CVS server
- Instructions for Unix (tcsh, csh shells)
% setenv CVSROOT :ext:anoncvs@webwork3.math.rochester.edu:/webwork/cvs/system
- or instructions for Unix (bash shell)
% export CVSROOT=:ext:anoncvs@webwork3.math.rochester.edu:/webwork/cvs/system
- Login to CVS server
% cvs login
(Logginging in to anoncvs@webwork3.math.rochester.edu)
CVS password:
- Just enter a return at the password prompt. The anonymous login does not require a password.
An error message at this point likely means that you have not defined CVSROOT correctly in the first step.
- Next move to a directory where you wish to create the webwork directory:
% mv /ww/home/gage/test
% cd /ww/home/gage/test
- This next command creates a directory called "webwork" and downloads files from the CVS server to the local repository
% cvs checkout -r rel-1-8-00 webwork
- The directory
webwork should have subdirectories: system , system_html , courses , webworkdocs and CVS
Initializing the local version of webwork
Create a file in the system directory: system/system_webwork_setup.pl
and fill it with the lines below. These are the answers you enter when
you normally run the setup script.
# to use these defaults type system_webwork_setup.pl -d #your main directory contains the webwork system $mainDir = '/ww/home/gage/test/webwork/system/'; # the location of the perl binaries. # (The entry below is standard and should be used if possible.) # Using a perl binaries in a different location will # make many scripts appear to be modified # even though only the top command line has been changed. # You can place a symbolic link in this position if necessary. # so that they point to the appropriate perl binaries $perlPath = '/usr/local/bin/perl'; # The url for the webwork scripts located in the system/cgi/cgi-scripts/ directory. # For example place a symbolic link in the apache cgi-bin which points to the cgi-scripts directory $cgiURL = '/cgi-bin/gage_system/'; # The url for the system_html directory. # In the standard distribution this is a sister directory to # the system directory, which is referenced by a symbolic # link placed in the top html directory. $htmlURL = '/webwork_my_system_html/'; $groupName = 'admin'; $update_stuff_in_courses = 'y'; $chgrp_files_and_dirs = 'y'; $chmod_files_and_dirs = 'y';
Now run the command
% cd ~/test/webwork/system/
% ./system_webwork_setup.pl -d system_webwork_setup.pl
This will automatically reinitialize your system. You may have to do this after
updating some scripts. The first responses from the script will indicate that this default file has been read.
You
will still need to respond to the initial parts of the script (just
press return), but the rest of the items will be filled in
automatically.
You can move, or rename, the top level of webwork or webwork-modperl
directory. The CVS directory inside each level keeps track of the CVS
server location and the relative positions of the enclosing files.
Make sure however that you rewrite the .defaults file and rerun the system_webwork_setup script.
Renaming files or directories inside the webwork directory will
remove them from the updating mechanism of the CVS. (For example a file
named global.save will not be affected by CVS updates.
This can be helpful when you want to update, but wish to be doubly sure
that you can restore local changes you have made if necessary.)
Updating the local WeBWorK version
- To update all of the files in the webwork system folder:
cd ~/test/webwork/system
cvs update -d
- That's it. If you want to see what files will be changed, without changing the files use this command:
cvs -n update -d
- The computer will list all of the files which will be changed if you actually run the update
- 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 serverP
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.
- If you wanted to modify only the files in the courseScripts directory (something which I do quite often), do this:
cd ~/test/webwork/system/courseScripts
cvs update
<| Post or View Comments |> |