The University of Arizona

Resources

CVS (Concurrent Versions System)

A CVS server is now installed on cvs.cs.arizona.edu. CVS (Concurrent Versions System) is a tool for version control. This server can be used by faculty, staff and students within the department. If you need a project area on this set up, you should use the web based group/CVS application process available at http://www.cs.arizona.edu/computing/services.

You can use the :pserver: method to obtain anonymous read only access to a limited number of project areas.

These areas are 'test', 'algovista', 'sr', and 'icon'.

For example:

% cvs -d 
   :pserver:anonymous@cvs.cs.arizona.edu:/cvs/test login
% cvs -d 
   :pserver:anonymous@cvs.cs.arizona.edu:/cvs/test checkout .
% cvs -d 
   :pserver:anonymous@cvs.cs.arizona.edu:/cvs/test logout

% cvs -d 
   :pserver:anonymous@cvs.cs.arizona.edu:/cvs/sr   login # etc.
% cvs -d 
   :pserver:anonymous@cvs.cs.arizona.edu:/cvs/icon login # etc.

The password for 'anonymous' is any non null character string.

You can use the :ext: method together with ssh to obtain read-write access to your project areas. To do this, you need to set the environment variable 'CVS_RSH' to 'ssh'.

For example, on a Linux machine, where 'username' is your user name, and 'project-name' is your project name, you can do at a shell prompt:

% setenv CVS_RSH ssh      # in csh or tcsh.

or

% CVS_RSH=ssh             # in sh or bash.
% export CVS_RSH          

% cvs -d \
   :ext:username@cvs.cs.arizona.edu:/cvs/cvs/project-name checkout .

The :ext: method requires that you have an account on the cvs server. If you have an account on lectura, you will have an account on the cvs server.

There are a number of project areas currently on the cvs server. These can be accessed on the unix machines in the department via the path /cs/cvs/project-name.

Note that files checked into cvs via the ext method are subject to the current umask. If you want to make your checked in files readable and writable by your group, set your umask to 2, before checking files in.  You may also need to set the setgid bit on directories within your project area (chmod g+s directory) so that files created within that directory inherit the group.

If an account needs to be set up on the cvs server for read/write access, or if an additional project area under cvs needs to be set up, see the link at the top of this page.


Complete documentation on CVS can be found at:

CVS Homepage http://www.cvshome.org


Recovering files from snapshots

The fileserver automatically creates a .zfs/snapshot subdirectory for every filesystem.

For each /cs/cvs/ directory, there is a link .snapshot that points to the .zfs/snapshot subdirectory for that cvs directory.

To access these snapshots from lectura:

  $ cd /cs/cvs/.snapshot

  $ ls
  06-15-00:10  07-06-00:10  07-11-00:10  07-13-12:10  07-14-00:10  07-14-12:10  07-15-00:10
  06-22-00:10  07-09-00:10  07-12-00:10  07-13-16:10  07-14-04:10  07-14-16:10  07-15-04:10
  06-29-00:10  07-10-00:10  07-13-00:10  07-13-20:10  07-14-08:10  07-14-20:10  07-15-08:10

Note these are directories with names that correspond to the date and time the snapshot was created.

To access the most recent snapshot (per this example):

  $ cd 07-15-08:10/cvsroot


To find a particular file in a snapshot, you would then use standard Unix commands to navigate through a snapshot directory (the file structure is the same as your /cs/cvs directory). Once you have located the version of the file you are interested in, you can copy it to another location (e.g., your cvs directory) which will, in effect, restore it.



Example:


  $ cd /cs/cvs/.snapshot/

  $ ls
  06-15-00:10  07-06-00:10  07-11-00:10  07-13-12:10  07-14-00:10  07-14-12:10  07-15-00:10
  06-22-00:10  07-09-00:10  07-12-00:10  07-13-16:10  07-14-04:10  07-14-16:10  07-15-04:10
  06-29-00:10  07-10-00:10  07-13-00:10  07-13-20:10  07-14-08:10  07-14-20:10  07-15-08:10

  $ cd 07-15-08:10/cvsroot/
  $ cd 'your-cvs-directory'


Note that snapshots are read-only. You cannot edit files within the snapshot area -- you must copy them elsewhere and then edit from that location. Also, you cannot delete directories or files within the snapshot area.

Be aware of file permissions -- especially on sensitive files. If you set a file to be world-readable and it is captured in a snapshot, you won't be able to remove the world-read permission on the snapshot file.

Files under cvs directories might be owned by different members of the group. If you want to restore files that are not owned by you, and retain their ownership, please contact lab.

Last updated April 30, 2012, by Phil Kaslo
Send questions about this page to