home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


  Previous section   Next section

A.4 Windows Clients

There are two graphical CVS clients available specifically for Windows. One is WinCVS, which is described in Section A.1 of this chapter. The other is TortoiseCVS, which modifies the way Windows Explorer presents files.

Following are some issues you might encounter when using CVS from Windows. These issues apply equally to WinCVS and TortoiseCVS.

Line endings differ between Windows and Unix

CVS automatically attempts to convert the line endings of text files to Unix format. This is helpful in text files, but it causes problems in binary files that are committed accidentally as text files. When a binary file is corrupted because CVS tried to "fix" the line endings, often you can recover with the following procedure:

  1. Back up the current sandbox copy of the file.

  2. Update the file with cvs update to bring the repository version into the sandbox and reconvert the line endings.

  3. Check the file to ensure that it is no longer corrupt. If it is still corrupt, roll back to the most recent uncorrupted version (hopefully, the backup).

  4. Use cvs admin -kb filename to convert the default keyword-expansion mode of the file to binary.

  5. Recommit the file to the repository with cvs commit -f.

SSH may attempt to convert line endings

Because CVS performs its own line-ending conversion, you cannot use an SSH client that converts line endings as the client for CVS.

Filename capitalization matters under Unix

In Unix operating systems, file capitalization matters. NoSuchFile and nosuchfile are completely different files. If your repository contains two files whose names differ only in case and you are running an operating system that ignores case, the second file to download may overwrite the first when you check out or update a sandbox.

Directory separators are different under Unix and Windows

CVS uses the forward-slash character (/) as the directory separator. In most cases, internal CVS files use a forward slash wherever Windows uses the backslash character (\). This should not cause problems, but it may cause confusion.

Universal time

CVS stores times in UTC (Coordinated Universal Time). This may also cause confusion, but it should not cause any problems if the time on the client is configured correctly.

File permissions problems

If you are running the repository on a networked filesystem accessed through a Samba server, you may have permissions problems if you are using CVS from a Windows system with the local access method. These problems can usually be fixed by enabling WRITE=YES in the Samba configuration.

A.4.1 TortoiseCVS

TortoiseCVS is a simple CVS client for Windows that allows you to manage CVS files from within Windows Explorer (not Internet Explorer). The standard right-click menu for files is expanded to include the CVS commands that apply to a given file. TortoiseCVS is available from http://www.tortoisecvs.org/.

For files, the menu is changed only in an active sandbox. The right-click menu for folders that are not sandboxes is changed to include a Checkout option and a CVS submenu. You can import a new project with the Make New Module option in the submenu.

TortoiseCVS also works within the standard Windows File Open dialog.

Figure A-12 shows the menu items that TortoiseCVS adds when you right-click on a folder representing a sandbox directory, in this case the man folder.

Figure A-12. TortoiseCVS right-click menu
figs/ecvs_aa12.gif

  Previous section   Next section
Top