Section 10.1. CVS Command-Line Options

10.1. CVS Command-Line Options

CVS supports a number of command-line options that you can use to control various aspects of CVS behavior. Command-specific options are described in "CVS Commands," later in this chapter. This section focuses on options that you pass to the cvs executable itself, not to any specific CVS command.

The syntax of any CVS command is as follows:

 cvs [cvs-options] [command] [command-options-and-arguments] 

The specific cvs-options modify the behavior of the main CVS code, rather than the code for a specific command. The following options are valid:


Authenticate all network traffic. Without this option, the initial connection for the command is authenticated, but later traffic along the same data stream is assumed to be from the same source.

This option is available only with GSS-API connections. (If you use ssh as your rsh replacement in the ext connection mode, ssh authenticates the data stream, and you don't need extra authentication.)

Support (in the client) for this option is generated when CVS is compiled. You can test whether your installation supports -a by checking whether it is listed in cvs --help-options. The command-line client can be compiled to support it by using the --enable-client option to the configure script.

The server always supports -a. See also -x.


Used as part of the inetd command string for server, kserver, and pserver connection methods. The directory is the repository root directory that the server allows connections to. Using --allow-root more than once in a command allows users to connect to any of the specified repositories.

This option is only relevant when configuring the CVS server, so if you're not a server administrator, you can safely ignore it. (If you are a server administrator, see Chapter 8 for more information.)

-b directory

Exists for backward compatibility with old versions of CVS (before 1.9.18) and does nothing in current versions. It used to specify the directory for the RCS executables.

-d repository_path

Use repository_path as the path to the repository root directory. This option overrides both the CVSROOT environment variable and the contents of the Root file in the sandbox's CVS subdirectory. It also overrides the contents of the .cvsrc file.

The syntax for the repository path is:


Chapter 8 contains a full explanation of each element of the repository path.

Chapters 2 and 3 contain simpler explanations of repository paths.

-e editor

Use the specified editor when CVS calls an editor for log information during the commit or import process. This option overrides the EDITOR, CVSEDITOR, and VISUAL environment variables and the contents of the .cvsrc file.

Prevent CVS from reading the ~/.cvsrc file and from using the options in it.

--help or -H

If called as cvs -H or cvs --help, CVS displays a general CVS help message.

If called as cvs -H command or cvs --help command, CVS displays the available options and help information for the specified command. (Contrast with --help-commands.)


List the available CVS commands with brief descriptions of their purposes.


List the available cvs-options with brief descriptions of their purposes.


List the valid synonyms (short names) for the CVS commands.

Dropped into an Unfamiliar Editor?

Unix and Linux systems traditionally use editors that don't have menus or "what you see is what you get" interfaces. If you don't set an editor, and use command-line CVS rather than a graphical client, CVS will probably open an old-style (but very good) editor, usually emacs, vi, or a more recent variation on vi called vim.

If you find yourself in an unknown editor with no visible help or menus, try this command sequence: try pressing Ctrl-H then t. If this brings up a tutorial, you're in emacs. If it doesn't, try pressing Escape, then type :h, then press Return. If this sequence brings up a help screen, you're in vi.

To exit vi (without saving changes), type :q!. To exit emacs without saving, press Ctrl-X Ctrl-C.

I have noticed that some modern distributions use an editor (such as pico or nano) with menus along the top or bottom, instead of vi, as their default editor. I think this is a good change: those of us who prefer vi or emacs can set it as our defaults; those who don't aren't left trapped in an editor with obscure commands. For more information on these editors, see Learning the vi Editor, by Linda Lamb and Arnold Robbins (O'Reilly), and Learning GNU Emacs, by Debra Cameron et al. (O'Reilly).


Do not log the current command to the history file in the repository's CVSROOT directory. The command will not show in subsequent cvs history output. This option is removed in CVS 1.11.7.


Execute only commands that do not change the repository or sandbox. Using this option with cvs update can provide a status report on the current sandbox.

The displayed screen messages may be different if you run a command with and without the -n option. If you use this option, you won't get output that would normally be part of the process of modifying the repository copies of files.


Run in quiet mode. This option causes CVS to display only some of the usual informational messages.


Run in very quiet mode. This option causes CVS to display only the most critical information.


Set files that are checked out to the sandbox as read only. This option affects only newly checked-out files.

Normally, files are checked out as read-write, but if a file is being watched with cvs watch, read-only is the default. This option overrides settings in the .cvsrc file, and has the same effect as the CVSREAD environment variable. See also -w.


Enables CVS to work (in a limited fashion) with read-only repositories, such as a repository on a CD-ROM. (This option is present in CVS 1.12.1 and later.)

-s variable=value

Set a user variable for use with one of the scripting files in CVSROOT. The user variables are explained in Chapters 6, 7, and 11.


Display messages that trace the execution of the command. This option can be used with -n to determine precisely what a command does without actually changing a file (within the limits of the -n command).

-T directory

Use the named directory to store temporary files. This option overrides the TMPDIR environment variable, and if run on the server, also overrides the setting in the CVSROOT/config file in the repository. This option has a local effect: if given in the client, it affects the client but not the server. If given in the server, it affects the server but not the client.

--version or -v

Display CVS version and copyright information.


Set files checked out to the sandbox as readable and writable. This option only sets the permissions of newly checked-out files and overrides the CVSREAD environment variable. This option overrides settings in the .cvsrc file. See also -r.


Encrypt all data that travels across the network between the client and the server. This option is currently available in GSS-API or Kerberos mode only. (If you use ssh as your rsh replacement in the ext connection mode, ssh encrypts the data stream by default.)

This option is available only if the client is compiled to support it. You can check by seeing if it is listed in cvs --help-options. You can compile the command-line client to support it by using the --enable-client and --enable-encryption options to the configure script.

The server always supports -x. See also -a.

-z #

Compress all network traffic by using the specified gzip compression level (the # symbol here represents a gzip level number). The compression levels range from 0 (no compression) to 9 (maximum compression). This option overrides settings in the .cvsrc file.

Essential CVS
Essential CVS (Essentials)
ISBN: 0596527039
EAN: 2147483647
Year: 2006
Pages: 148

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: