CVS is a version control system, designed for collaborative maintenance of large collections of data. As such it is well suited to managing large web sites. However, with power comes some complexity, so CVS is not ideal for the novice user.
CVS maintains a central repository (hosted on www.inf.ed.ac.uk), which is the definitive copy of all of the files held by the web server. In order to edit these files you obtain a working copy of these files from the CVS repository. You can then make whatever changes you wish to those files, and send them back to the server, along with a log message, detailing the changes you made and any reasons for them. The new files will not appear on the web server until you have carried out this step.
export CVSROOT=:pserver:user@www.inf.ed.ac.uk:/cvsroot
This tells CVS to look on the machine www.inf.ed.ac.uk, and to use the username user.
If you are using a csh-like shell instead of bash, you should use the csh syntax instead - that is:
setenv CVSROOT :pserver:user@www.inf.ed.ac.uk:/cvsroot
You then need to login to the server.
cvs loginThis will prompt you for a password, which is the password you entered when you requested your Informatics publishing account. You need only login once, however CVS stores the password in your homedirectory. If you are worried about this you can use cvs logout to remove the stored copy, and then use cvs login again, later.
The www.inf.ed.ac.uk tree is rooted at the 'web' directory, so to checkout everything in it use:
cvs checkout web/As the tree gets larger, the amount of time, disk space, and processor power used to do this will increase. Please do not checkout the entire tree unless you have a legitimate reson for doing so.
cvs checkout lfcs/For the remainder of this document, if you are working with an instituties virtual web service, then you would replace occurances of web/ with the name of your virtual web server, lfcs/ for example.
The above checkout operation will create files in a subdirectory called "web/" of the current directory. If you wish to checkout into a different directory (this is especially useful when checking out small sections of the tree) you can use the -d option. For example
cvs checkout -d mycopy web/Of course, it is preferable not to checkout the entire tree, and in general you should checkout only the sections that you intend on working on. For instance, if you wanted the Computing Committee pages, then you would do the following:
cvs checkout web/admin/committees/computing
The above examples checkout the specified directory, and all sub-directories and files contained with in it. If you want to checkout just that directory and the files it contains, without also checking out any further subdirectories, then add the -l option to the command. Eg:
cvs checkout -l web/admin/committees/computingThis version of the command will not checkout the web/admin/committees/computing/meetings/ sub-directory (and all the files that it contains). Unlike the previous example, which would.
cvs updatein a directory in your working copy will update that directory and all directories below it. However, it will not create any new directories that did not exist in your working copy when you checked it out from the server. You can create these directories with
cvs update -dbut you may find that it pulls in files that you didn't originally have. This isn't a problem, because you don't have any exclusive rights to files in your working copy.
rm filename
cvs remove filenameor as an atomic operation:
cvs remove -f filenameYou then still need to commit your delete/remove:
cvs commit filename
You cannot cvs remove directories.
CVS allows you to undelete files, by checking out the last version prior to the cvs remove. It stores this undelete history in the directory, so to be able to provide this undelete facility, cvs can't let you remove the file's parent directory.
If you really do want a directory removed, perhaps because you created one accidentally, then contact support and we can do it behind the scenes. However, it will then nolonger be possible to checkout any files that were in that directory.
Note for manpage hawks: CVS does support notification of edits using cvs edit and cvs watch. Feel free to use these within your areas of the site, but we do not recommend them for general use.
Please remember the tips in the guide to the Informatics web server when editing HTML content.
cvs checkout web/template.htmland use this template as the basis for your new file. Currently the content of this file is:
<!--#include virtual="/ssi/doctype.inc"--> <TITLE>Put your title here</TITLE> <!--#include virtual="/cgi-bin/metabase"--> <!--#include virtual="/ssi/header.inc"--> Content goes here <!--#include virtual="/cgi-bin/locationbar"--> <!--#include virtual="/ssi/footer.inc"-->If you wish to use your own include files, then see the FAQ on the subject of SSIs.
cvs add filenameYou still need to commit your changes, as detailed below.
Please consult the Informatics web server guide section on file naming before creating new files.
Remember that a directory/container must contain an index.html file. Otherwise people will receive a "Forbidden" error message when they browse to that container.
See above about deleting directories, which simply says "You can't".
cvs commitYou will be prompted for a revision log message. This is stored in the revision history, and should be a brief description of the reasons for the changes. You can specifiy the log message on the command line with the -m option. The CVS repository validates all HTML documents submitted to it. You may see error messages detailing faults in your HTML, which will need to be fixed before they will be accepted for publishing.
To configure your working copy:
| Server Hostname: | www.inf.ed.ac.uk |
| CVS Root: | /cvsroot |
| Authentication method: | Password |
Use the Action menu to checkout parts of the tree, and the Commit option to commit them back to the repository.
|
Informatics Forum, 10 Crichton Street, Edinburgh, EH8 9AB, Scotland, UK
Tel: +44 131 651 5661, Fax: +44 131 651 1426, E-mail: school-office@inf.ed.ac.uk Please contact our webadmin with any comments or corrections. Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh |