NOTE! If the cvs does not work the way you want it to do, the fault is not necessarily your. There are some troubleshooting tips at the end of this document.
cvs ci -m "Write a short log command here" filename
If you want to write a longer log command, write
cvs ci filename
and you will get an emacs window where you can write your command. When you are done, write C-x-c as you always do in emacs, and the log command will be saved.
That was the crash course, here come some more details.
The first session you get yourself a version of the project, with the command cvs checkout gt. All subsequent sessions you should go to the gt directory (in your home directory, write "cd gt"), and start the session by the command cvs update. The reason for this is to ensure that you start out with the most recent version of the files.
Every now and then you should write cvs checkout gt while standing in your home directory (e.g. right after having logged in). Then you will get not only the new versions of files that already are in the directory, but also eventual new files and directories that have been added since last time.
The most important cvs ocmmands are found below, with comments in parentheses after each command.
cvs update
cvs up
cvs commit filename
cvs ci filename
Then cvs asks you to write a log comment. Do that. Then write 'ctrl x ctrl c' (i.e., quit emacs). cvs ci -m "short log comment" filename if all you want to write is "short log comment".
There is an alternative way of checking in files. If you have worked on the file in emacs (as we do in this project), you may write C-x C-q inestead of the normal emacs command C-x C-c. Then you get a buffer asking for a log text. Terminate you log text with C-c C-c, and, voila, the file is checked in in cvs. (This method works for RCS as well).
Other commands:
cvs log filename | less
cvs add filename
cvs diff filename
cvs diff -r 1.123 filename
cvs diff -r 1.123 -r 1.124 filename
cvs co -r 1.123 filename
The official CVS manual is http://www.cvshome.org/docs/manual/cvs.html, also known as 'the Cederqvist Manual'.
There is an O'Reilly book, CVS Pocket Reference, it is the only CVS book, but it is all too short to be really useful.You may also write info cvs on the command line, that manual is actually quite ok.
export CVSROOT=/usr/local/cvs/repository
'remote use' means that you check out the cvs files to a machine different from cochise.uit.no. You then work offline on your local machine (at home, or on travel). Then, returning to a place where you are online, you may check in and update your cvs files as normal. In this way, you have two sandboxes: One on cochise, and one on your own local computer. Note that these two sandboxes are independent of each other.
You need a ssh client in your local computer that can connect to cochise. If you have Linux or Mac OSX this is already in place. You also need a username in the master cvs server, cochise.uit.no, and cvs group membership in cochise, but if you can read this, then that should be in place already. Then you need to set up your local machine. The following lines should be added into your local initialization file (this is the file .profile for bash on Linux, on Mac OSX).
export CVSROOT=:ext:username@cochise.uit.no:/usr/local/cvs/repository
export CVS_SSH=ssh
Another (much more cumbersome) way is to specify the repository attributes on each command line:
cvs -d :ext:username@cochise.uit.no:/usr/local/cvs/repository co gt
You are then prompted for your password to cochise. You can leave out your remote (cochise) username if your local username and username in cochise are the same.
That is all! Then you run cvs as described above: cvs update to update, etc. You will be prompted for password at every occacion, but otherwise it is the same procedure as for local work (if there are many changes done, it might be easier to first copy all the files to cochise via scp, and thereafter copy them to the sandbox and do cvs update there).
To be able to use CVS you need 4 different putty programs (cf. below), and you need the program WinCVS (cf. further below). WinCVS can be downloaded from LINK.
Authentication: ssh Path: /usr/local/cvs/repository/ Host address: cochise.uit.no User name: trond CVSROOT: trond@cochise.uit.no:/usr/local/cvs/repository/The "Show CVS console (open TTY)W should be ticked.
For the "Settings", do NOT choose RSA public identity file, but DO choose "If ssh is not in the PATH". Underneath, write in the path to the program plink.exe. In my setup, it looks like this: C:\Programfiler\ssh\plink.exe. Do not set any Additional ssh options.
For Globals, do NOT tick the "Checkout read-only" (i.e., deselect that one). All other options should be deselected, except the "Supply control when adding files", "Dirty files support", and the "Checkout text files with the Unix LF". These three shoudl be selected.
For WinCVS, under HOME (passwords and ~/.cvs* files) you set the directory where you plan to have your files (I use D:\Mine dokumenter\Trond\). The other options are deselected. As default viewer I have Notepad, but it may not be the best option.
The Command Dialogs canb be left as is, all deselected except the one saying "Shift".
Now click OK, and you should receive the gt catalogue on your Windows machine. (To good to be true, of course...)
You type cvs co gt, as you have been told. The machine answers:
cvs update: No CVSROOT specified! Pelase use the '-d' option.
Then answer with the following magic spell:
cvs -d /usr/local/cvs/repository/ co gt
Why you have to do this I do not know.