If your development team is not familiar with CVS, you may want to ensure that everyone is using the same CVS client. This helps minimize support problems; if someone has a problem, his fellow developers are familiar with the tools he's using and can offer helpful advice.
The clients described in this section look and operate the same across several different environments. The first three represent a set of clients that are designed for all three major operating systems—Unix/Linux, Macintosh, and Windows—and work from the same base code. The other two GUI clients are Java clients that work on any operating system twith a Java Runtime Environment.
Three GUI clients—gCVS, MacCVS, and WinCVS—represent a set of clients available from the same development team that work identically across Unix/Linux, Macintosh, and Windows operating systems. The clients are detailed and implement most of the functions available from the CVS command line. Using these clients, you can create a new repository, tag files, create watches, and report on the differences between files. These clients are available from http://www.wincvs.org and http://cvsgui.sourceforge.net/.
gCVS is for Linux and Unix, WinCVS is for Windows, and MacCVS is for Macintosh. Because their interfaces are so similar, these are good clients for groups that develop software across different operating systems.
These clients are laid out with three main windows, as shown in Figure A-1 (gCVS) and Figure A-2 (WinCVS). The leftmost window contains a directory tree, the base directory of which is configurable. The upper-right window shows the contents of the current directory, and the lower-right window shows the output of the CVS commands that you execute using the GUI.
Using these GUI clients, you execute CVS commands by choosing a menu option and then filling out some fields in a dialog. The output of most commands is displayed in the lower-right window. This can be irritating if the output from a given command is particularly large or complex to read. Fortunately, you can resize the output window to accomodate large and complex output. If you need to use options that are not available in the menus and dialogs, you can run command-line commands in these clients using the Command Line option in the Admin menu.
Figure A-3 shows the Cvs Files menu in MacCVS, with the output window in the background.
In Chapter 2, I recommended gCVS, WinCVS, and MacCVS as CVS clients for a development team because they are popular and have a common interface. Installation is similar for all CVS clients on the same operating system, so I've chosen these three to give an example for each operating system.
gCVS is a Linux and Unix client available from http://www.wincvs.org/ and http://cvsgui.sourceforge.net/. You can install it from source, or you can use a package manager. To use a package manager, follow the procedures givin in Chapter 2.
To install CVS from source, read the detailed instructions in Chapter 2. The procedure for installing gCVS is similar to the procedure for installing CVS, though some of the commands differ slightly.
Decompress and expand the .tar.gz file using tar - zxf filename.
Read the INSTALL file in the top directory of the source tree. If the instructions in the INSTALL file differ from the instructions here, use the instructions in the INSTALL file.
Check whether the gtk development libraries are available. gCVS needs to link to these libraries when it compiles. They are available from http://www.gtk.org/.
Change directories into the top directory of the source tree.
Run ./make-configure --prefix=directory, where directory is the location you want to install gCVS.
Change user to root, then run make install.
Add the installation directory to the path for your gCVS users.
Run gCVS with the gcvs command.
Whether you install gCVS as a package or from source, you may also need to install or configure SSH or Kerberos. If you intend to use SSH and have not used it before, you need to generate keys. If you are currently using SSH, you should already have keys. As an SSH client is often installed by default in Unix and Linux systems, you may only need to configure it.
WinCVS requires Python. If you intend to connect with SSH, it requires you to install SSH as well. These instructions assume that you will run WinCVS with SSH. Older versions of WinCVS used Cygwin instead of Python.
Install Python 2.1 or later from http://www.python.org/.
Install an SSH client such as Putty. Putty is available at http://www.chiark.greenend.org.uk/~sgtatham/putty/.
Use the key-generation program for your SSH client. Store both private and public keys in files. If the key generator gives you a public key to cut and paste, use Notepad or another text editor to store the key in a file. Generate an ssh1 or ssh2 key, depending on your server's SSH protocol.
Put a copy of the public key on the server, in your ~/.ssh/authorizedkeys file or whichever file your server's SSH program expects public keys to be in.
If your SSH client runs a key agent, use it. Putty runs Pageant, which has an icon in the system tray. Add your private key to the key agent; to do this in Pageant, right-click on the icon and select View Keys, then Add Key.
Download WinCVS from http://www.wincvs.org/.
Extract WinCVS using the extractor provided; it's distributed in a self-extracting archive.
Set ssh as the connection method. Use the following procedure:
Select Preferences from the Admin menu.
Open the General tab. Set the authentication option to ssh.
Open the Settings button, and fill in the path to your SSH client. For Putty, the executable is plink.exe. Also set any options necessary for your SSH client. If you are using Putty, set the -ssh option.
MacCVS is distributed as an archive and needs to be opened with StuffIt, which is available for both OS X and pre-OS X systems. Most Macintosh systems have StuffIt installed; if yours doesn't, you can get Stuffit Expander (the free version) from http://www.stuffit.com/downloads.html. Once you've downloaded the compressed archive, just double-click it to open and install the program. That's it! You're done with the installation. To run MacCVS, open the MacCVS icon from the directory in which you installed it.
MacCVS and clients written for Macintosh systems older than OS X do not support SSH through the usual access method, where the repository path is :ext:hostname:/path and the CVS_RSH environment variable is used. To work around this, install an SSH client that supports port tunneling and use an SSH tunnel to connect to the CVS repository securely. Choose an alternate access method such as pserver or kserver and configure MacCVS to connect to the localhost on the port at the local end of the tunnel.
If you have OS X and want SSH support, try using an OS X-specific client, or use a Unix or Linux client. At the time of this writing, the MacCVS OS X client is in beta testing and has built-in SSH support.
jCVS is a Java-based CVS client (available from http://www.jcvs.org/) that is useful for development teams that need to work over a variety of operating systems. The tabs in the main window (shown in Figure A-4) control project administration, and the menus in the project window control the commands for the files.
The project window displays the files' hierarchy and the status of each file currently in the sandbox. Output from log, diff, and other commands is shown in a separate window.
SmartCVS is a Java-based client that runs on any operating system with a Java Runtime Environment. SmartCVS is available from http://www.smartcvs.com/.
There are two versions of SmartCVS: a free version and a professional version. Both implement the basic CVS commands and a few extra features, such as automatic detection of binary files. The professional version supports the annotate command and has more extensive support for tags than the basic version.
The main window has three parts: the folder hierarchy to the left, the files in the current sandbox in the right window, and CVS command output in the bottom window. SmartCVS provides side-by-side, color-coded displays of the differences between revisions, and a log display that includes graphical representation of branches.
Figure A-5 shows the SmartCVS main window in the background and the graphical log display in the foreground. The log display shows a branched file.