Paul Johnson Feb 20, 2003 PS909 labExample3.txt cvs is the "Concurrent Version System". It is installed on lark, and it is installed on most linux systems and you can even get it for windows. There are some graphical cvs "client" programs, but I have found them to be a total pain. The command line version is easy to use. The cvs archive for our class sits in a directory called "cvs909" in my lark account. If all goes well, you will have permission to access that, to take out files and check them back in. In my archive, so far I have only one program, the Schelling segregation model, which is in Objective-C. So in my cvs archive, I plan to have 2 directories, objc java and then the names of the programs are under these things. So the schelling program is in /homem/pauljohn/cvs909/objc/schelling Suppose you want to get the source code and revise it, and save it back into the CVS archive. YOU ARE A CLIENT! You get stuff, edit, and send it back. First, make a directory where you want to download the archive. # mkdir trash # cd trash Since our usage is somewhat out of the ordinary, you have to type a few out of the ordinary commands to get started. # export CVS_RSH=ssh # cvs -d lark_user_name@lark.cc.ku.edu:/homem/pauljohn/cvs909 co . WHen you put a period at te end, it means you want to have "everything". Once we get this archive up and rolling, you may just want one part, and in that case you would replace the period by a "module name" or a directory name (such as "objc/shelling"). In cvs, the letters "co" are an appreviation of "checkout". I believe you can use the full word checkout in place of co if you want, but I use co because that's what the cool guys do. For comparison, in a fresh directory, try this # cvs -d lark_user_name@lark.cc.ku.edu:/homem/pauljohn/cvs909 co objc/schelling or # cvs -d lark_user_name@lark.cc.ku.edu:/homem/pauljohn/cvs909 co objc I also have labeled the schelling subdirectory as a "project module", so if you just want to work on that, you can do so by asking for it by name. In a fresh directory, do: # cvs -d lark_user_name@lark.cc.ku.edu:/homem/pauljohn/cvs909 co schelling AFTER YOU HAVE DOWNLOADED... Look over the files. Check permissions. You may see the downloaded files are "read only". You might as well give yourself write pemission with the old "chmod" command. Remember? Note there is a README and a ChangeLog. The README is a message to a visitor, the Changelog is a list of specific comments about changes that have been made. Whenever you make any change, you are supposed to make a ChangeLog entry. In Emacs, that can be done with M-x add-change-log-entry I don't use Emacs's features for dealing with CVS. They confuse me too much. So after I make edits on the files, I save them, make sure they compile, and then get out of Emacs. At the command line I check in the changes with the command # cvs commit That initiates a "check in procedure" where it wants you to enter some comments about the changes you made. The Swarm team members just paste in the ChangeLog entries they created. Other CVS users can review your comments to see what you did. Update your CVS "sandbox". Suppose you come back later and you want to find out if other members of your research team have updated some files. cd into your working directory and type cvs update -d The -d option says that, if somebody created a new directory, you want to download that, as well as files. If you leave off the -d, it tells cvs you only want file updates, not new directories. There is a lot of other fancy crap in cvs, and they have a beautiful manual that all well educated people should look over. That manual is called "cvs.ps" and it is saved in the system docs directory on all well maintained linux workstations. I leave it as a puzzle for the reader to find it. You know the tools already, if you have reviewed the stuff on http://www.ku.edu/cgiwrap/pauljohn/twiki/view pj