How to use CVS for ISAM web pages

Document revision: 0.2 - 10/14/2003
http://asg.web.cmu.edu/isam/howto/cvs.html

1.0 Basic Configuration

To create a workspace in the current directory, do the following:
	% setenv CVSROOT /afs/andrew.cmu.edu/system/cvs
	% cvs co -d . web/asg/isam

This should work on any Andrew workstation.

Note that http://asg.web.cmu.edu updates the public web page every 15 minutes (starting on the hour). Thus, any commits won't show up until after this update.

1.1 Basic CVS commands

Once you have the repository set up, you can do the following:
cvs help
command summary and help info. After each cvs command you can also do --help for command specific help.
cvs update -d
This brings your work space in sync with what is in the repository. It will not overwrite any files you have modified.
cvs commit
This puts your changes into the repository. If you do not specify any files, it will recursively look for files that have changed and put them into the repository.

Note that http://asg.web.cmu.edu updates the public web page every 15 minutes (starting on the hour). Thus, any commits won't show up until after this update.

cvs diff
This shows the differences between your local workspace and the repository.
cvs add
Use this command to add a file to the repository.
cvs log
Use this command to view the change log for a file.

Note that cvs tag is likely not to work because it assumes that a common directory is writeable. There are a few other annoyances that are a result of CVS assuming that everyone using the same CVSROOT has the same write access.

1.2 CVSweb features

You can use CVSweb to browse the repository. For example: http://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/web/asg/isam/.

A handy thing with CVSweb is to use it to show diffs between revisions. For example, the following will show a diff between revision 1.1 and revision 1.4 on the main index.html page: http://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/web/asg/isam/index.html.diff?r1=text&tr1=1.1&r2=text&tr2=1.4&f=h.

2.0 Non-Andrew platforms

If you are running AFS, you can follow the instructions in section 1.0.

If you aren't running AFS then you need to obtain ssh and tell CVS that the repository is remote. This is done by:

	% setenv CVS_RSH ssh
	% setenv CVSROOT your_andrew_id@unix.andrew.cmu.edu:/afs/andrew.cmu.edu/system/cvs

Replace your_andrew_id with your andrew userid. You may replace unix.andrew.cmu.edu with any andrew machine you can log into.

2.1 Mac OS X

This is easy. Just install the developer toolkit and you get both ssh and cvs installed and then just follow the instructions above.

2.2 Windows

2.2.1 Graphical Interface

You can try http://www.wincvs.org. There is a specific FAQ at http://www.wincvs.org/ssh.html.

2.2.2 Command Line

You can download it from http://ccvs.cvshome.org/servlets/ProjectDownloadList. Here is a locally cached version of cvs.exe.

Now you need a ssh client. You can download it from ftp://ftp.ssh.com/pub/ssh/SSHSecureShellClient-3.2.9.exe

plink from the putty doesn't quite work right when a password response is required. It looks like the output of plink when prompting for a password is different than what ssh2 does and so cvs.exe gets confused.

Assuming you've put those binaries somewhere on your path, you can do:

	set CVS_RSH=ssh2
	set CVSROOT=your_andrew_id@unix.andrew.cmu.edu:/afs/andrew.cmu.edu/system/cvs
	cvs co web/asg

You can also just install Cygwin (http://cygwin.com) for a unix environment and get the cvs and ssh from there.