Alphabetical Summary of Commands


Alphabetical Summary of Commands

Most of your interaction with CVS is through the various CVS subcommands. Even if you use a graphical client, most of the functions the client uses call the CVS subcommands.

Most subcommands have a shortened nickname that you can type instead of the longer subcommand name. These are called command synonyms in CVS jargon.

add

 cvs [cvs-options] add [-k mode] [-m message] files

Add a file or directory to the repository. This command can also be used to undo an uncommitted file deletion or to restore a deleted file. You must commit any added files in order for the addition to fully take effect.

Synonyms: ad, new

Standard subcommand options: -k, -m

Examples

     $ cvs add Design.rtf     cvs server: scheduling file `Design.rtf' for addition     cvs server: use 'cvs commit' to add this file permanently

admin

 cvs [cvs-options] admin [options] [files ...]

Use RCS commands on the repository copy of project files. This command is is a frontend for a range of useful (though sometimes useless to CVS) RCS-based commands. Project files are stored in the repository in RCS format, so it is useful to have a way to use some of the RCS commands on the files directly.

Synonyms: adm, rcs

Standard subcommand options: -k

Options


-ausernames

Append the comma-separated list of usernames to the RCS access list in the repository (RCS-format) copy of a file. This change to an RCS file has no effect on CVS. See also -A and -e.


-Afilename

Append the RCS access list in filename to the access list of the files being operated on. This change to an RCS file has no effect on CVS. See also -a and -e.


-b[revision]

Set the default branch of a file to the named branch revision; if no revision is named, set the default branch to the highest branch revision on the trunk. This option should be used very rarely in CVS; it is better to check out a sandbox as a branch sandbox with the -r option to checkout or update.


-cstring

Set the RCS comment leader of a file to the specified string. This option is not used in CVS.


-e[usernames]

Remove the comma-separated list of usernames from the RCS access list in the repository (RCS-format) copy of a file. If no list of usernames is provided, remove all names. This change to an RCS file has no effect on CVS. See also -a and -A.


-i

Create and initialize an RCS file. This option is not used in CVS (use cvs add instead), and it is not available in CVS 1.9.14 and later.


-I

Run interactively. This option does not work in client/server-mode CVS and may be removed from later versions of CVS.


-l[revision]

Lock the specified revision of a file so that another user cannot commit to it. If revision is omitted, CVS locks the latest revision on the current sandbox's branch or the trunk. To work with CVS, the lock requires a script such as the rcslock script in the contrib directory of the source. See Essential CVS (O'Reilly) for how to use this option. See also -u.


-L

Set RCS locking for a file to strict, which means that the owner of the file must lock the file before committing. (This locking is done by the CVS code, and need not be done manually.) File locking must be set to strict for CVS to work properly. See also -U.


-mrevision:message

Replace the log message of the designated revision of a file with the specified message.


-ntagname[:[revision]]

Tag the designated revision or branch of a file with the tagname. If there is no revision and no colon, delete the tag; if there is a colon but no revision, tag the latest revision on the default branch, usually the trunk. If the tagname is already present in the file (and the operation isn't "delete"), this option prints an error and exits. See also -N.

Generally, it is better to use cvs tag and cvs rtag to manipulate tags.


-Ntagname[:[revision]]

Tag the designated revision or branch of a file with the tagname. If there is no revision and no colon, delete the tag; if there is a colon but no revision, tag the latest revision on the default branch, usually the trunk. If the tagname is already present in the file (and the operation isn't "delete"), this option moves the tag to the new revision. See also -n.

Generally, it is better to use cvs tag and cvs rtag to manipulate tags.


-orange

Delete the revisions specified in the range. The revisions given in the range can be revision numbers or tags, but be wary of using tags if multiple tags in a file denote the same revision.

There is no way to undo a cvs admin -o command.


The range can be any of the following:


revision1:revision2

Delete revisions between revision1 and revision2, including revision1 and revision2.


revision1::revision2

Delete revisions between revision1 and revision2, excluding revision1 and revision2.


revision:

Delete revision and all newer revisions on the same branch (or the trunk).


revision::

Delete all revisions newer than revision on the same branch (or the trunk).


:revision

Delete revision and all older revisions on the same branch (or the trunk). This range does not delete the base revision of the branch or revision 1.1.


::revision

Delete all revisions older then revision on the same branch (or the trunk). This range does not delete the base revision of the branch or revision 1.1.


revision

Delete revision.


-q

Run quietly, without printing diagnostics (redundant with cvs -q admin).


-sstate[:revision]

Set the state of the designated revision of a file, or set the last revision on the trunk or the current branch if no revision is listed. The state should be a string and is shown in the output of cvs log and by the Log and State keywords. The dead state is reserved for CVS internal use.


-t[filename]

Write the contents of the file specified by filename to the description of each file listed in the command. The description is an RCS field, shown in cvs log output. This option deletes any existing description. If the filename is omitted, CVS seeks input from standard input, ending with a period (.) on a line by itself. See also -t-string.


-t-string

Write the contents of the string to the description of each file listed in the command. The description is an RCS field, shown in cvs log output. This option deletes any existing description. See also -t.


-u[revision]

Unlock the specified revision of a file so that another user can commit from that revision. If the revision is omitted, this option unlocks the latest revision on the current sandbox's branch or the trunk. This option requires a script, such as the rcslock script in the contrib directory of the source. See Essential CVS (O'Reilly) for how to use this option. See also -l.


-U

Set RCS locking for a file to nonstrict, which means that the owner of the file does not need to lock the file before committing. (This locking is done by the CVS code and need not be done manually.)

File locking must be set to strict for CVS to work properly. This option should never be used on CVS-stored files. See also -L.


-Vn

Write an RCS file compatible with RCS version n. This option is not used in CVS anymore, and it is not available in CVS 1.9.20 and later.


-xsuffix

Specify the suffix for the RCS file. This option is not used or available in CVS (all CVS files use ,v as the suffix).

Examples

 $ cvs admin -kb AcceptanceTest.doc RCS file: /var/lib/cvs/wizzard/doc/design/AcceptanceTest. doc,v done

annotate

 cvs [cvs-options] annotate [options] [files ...]

Display a file or files with annotations showing the last editor and revision that changed each line of the file. If no files are used in the argument, the files in the current sandbox are shown. See also rannotate.

Synonym: ann

Standard subcommand options: -D, -f, -l, -r, -R

Options


-F

Show annotations for binary files.

Examples

 $ cvs annotate Makefile     Annotations for Makefile     ***************     1.2  (arnold     01-Sep-02): #     1.2 (arnold     01-Sep-02): # Makefile for the Wizzard     project     1.2 (arnold     01-Sep-02): # Created by A Robbins, 1     September 2002

checkout

 cvs [cvs-options] checkout [options] projects ...

Create a new sandbox in the current working directory. This command can also be used to update an existing sandbox. See also export and update.

The projects argument to checkout may be one or more paths to directories within the repository, paths to files within the repository, or module names as specified in the modules file in the repository's CVSROOT directory. These paths must be separated by spaces.

When creating a new sandbox, the repository path must be specified by using the -d repository_path CVS option or the CVSROOT environment variable.

If you are creating a new sandbox inside an existing sandbox, the CVS/Root file of the current directory in the existing sandbox can provide a repository path. In most cases, having a sandbox inside a sandbox is needlessly confusing.

Synonyms: co, get

Standard subcommand options: -d, -D, -f, -k, -l, -n, -N, -r, -R

Options


-A

Clear sticky tags, dates, and keyword-expansion modes from a project and replace the current files with the head of the trunk.


-c

Display the contents of the modules file in the repository's CVSROOT directory. This option lists the modules in the current repository and the options applicable to those modules. See also -s.

NOTE

checkout -c lists only those projects that have entries in the modules file.


-j revision[:date]

Determine the changes between the revision the files in the sandbox are based on and the specified revision and merge those changes to the sandbox.

If two -j options are used, determine the changes between the first -j revision and the second -j revision and merge those changes to the sandbox.

The date can be used only if the revision designates a branch. date specifies the latest revision on that date.


-p

Check out the listed files to standard output, rather than to the filesystem.


-P

Do not include empty directories in the sandbox.


-s

Display the contents of the modules file in the repository's CVSROOT directory. This option lists the modules in the current repository and their status. See also -c.

Examples

 $ cvs -d cvs:/var/lib/cvs checkout wizzard cvs server: Updating wizzard     U wizzard/Changelog     U wizzard/INSTALL     U wizzard/Makefile

commit

 cvs [cvs-options] commit [options] [files ...]

Commit changes in a sandbox to the repository. Until a commit is run, changes such as modified, new, or removed files are not reflected in the repository. If no files are listed as arguments, CVS uploads all changes in the current sandbox.

Unless you use either the -m or -F options, commit calls an editor to request a log message.

If there have been changes in the repository version of a file since it was last synchronized with the repository, and the local version has also changed, you have a conflict and the file cannot be committed. You can try to commit the file again once you have updated it using cvs update or cvs checkout. The update will include an attempt to merge the file.

Synonyms: ci, com

Standard subcommand options: -l, -m, -n, -r, -R

Options


-f

Force CVS to commit a file even if there have been no changes to the file. This option implies the -l option.


-F logfile

Read a log message from the specified logfile rather than calling an editor.

Examples

 /home/arnold/cvs/wizzard$ cvs commit     cvs commit: Examining .     cvs commit: Examining doc     cvs commit: Examining lib     ...     RCS file: /var/lib/cvs/wizzard/doc/design/Design.rtf,v     done     Checking in doc/design/Design.rtf;     /var/lib/cvs/wizzard/doc/design/Design.rtf,v <--  Design. rtf     initial revision: 1.1 done

diff

 cvs [cvs-options] diff [format-options] [options] [files ...]

Display the differences between two revisions of a file or files. By default, diff checks the sandbox copy against the revision in the repository that the sandbox copy was last synchronized with. If the files argument is a directory, all files under that directory are compared, and files in subdirectories are also compared recursively. See also rdiff.

Synonyms: di, dif

Standard subcommand options: -D, -k, -l, -r, -R

The format-options determine how cvs diff displays any differences it finds. They operate in the same way as the options to the GNU diff program. See the entry for diff in Chapter 3.

Line and group format options

Line and group formats allow you to modify the way diff displays line changes. The group format options control the markers that surround the change, and the line format options control the marks on the changed lines themselves. Group format options are often used to create if-then-else structures for automated parsers to use.

The format options have a format string as a parameter and display the lines they affect according to the rule provided in the format string. The format string usually contains characters that are interpreted by your operating system's shell, so the string usually needs to be surrounded by your shell's quote character.

Following are the group format options, which affect the markers surrounding changed lines:


--changed-group-format=format-string

Display the text defined by the format string for each group of lines that are different between files, usually a concatenation of the old and new group format strings.


--new-group-format=format-string

Display the text defined by the format string for each group of lines from the second file that are different or missing in the first file.


--old-group-format=format-string

Display the text defined by the format string for each group of lines from the first file that are different or missing in the second file.


--unchanged-group-format=format-string

Display the text defined by the format string for each group of lines that are the same in both files.

Here are the line format options, which affect the lines themselves:


--line-format=format-string

Display the text defined by the format string for all lines.


--new-line-format=format-string

Display the text defined by the format string for each line from the second file that is different or missing in the first file.


--old-line-format=format-string

Display the text defined by the format string for each line from the first file that is different or missing in the second file.


--unchanged-line-format=format-string

Display the text defined by the format string for each line that is the same in both files.

The format-string for both group and line formats uses the percent (%) character as a special token, denoting a string to be evaluated by cvs diff. The string %% represents a single percent character. You also need to know your shell's quoting rules if you wish to include your shell's quote marks in the format string.

These are the special characters for a line format-string:


%c'C'

The character C, which cannot be a quote or a backslash.


%c'\O'

The character represented by the octal string O.


%l

The contents of the line to be formatted, not including the newline character.


%L

The contents of the line to be formatted, including the newline character. If a line does not contain a newline character, this character does not add it.


%[-][width][.[digits]][doxX]n

A printf-style format-string that displays the line number of the current line. The hyphen (-) signals that the number should be left-justified. The width specifies the minimum field width, and digits specifies the minimum number of digits. The other options are d (for decimal), o (for octal), and x or X (for lowercase or uppercase hexadecimal).


%%

The percent character.

These are the special characters for a group format-string:


%<

The lines from the first file.


%>

The lines from the second file.


%=

Lines common to both files.


%[-][width][.[digits]][doxX]symbol

A printf-style format-string that displays the number denoted by symbol. The hyphen (-) signals that the number should be left-justified. The width specifies the minimum field width, and digits specifies the minimum number of digits. The other options are d (for decimal) o (for octal), and x or X (for lowercase or uppercase hexadecimal).

Lowercase symbols denote the first file. Uppercase symbols denote the second file. The symbols are:


E, e

The line number of the line just before the group.


F, f

The line number of the first line in the group.


L, l

The line number of the last line in the group.


M, m

The line number of the line just after the group.


N, n

The number of lines in the group.


%(A=B?C:D)

If A is equal to B, display C; otherwise, display D. A and B must be decimal constants or a single letter that is one of the symbols provided.


%%

The percent character.


%c'C'

The character C, which cannot be a quote or a backslash.


%c'\O'

The character represented by the octal string O.

Examples

This is a simple example to show how CVS displays the difference between the current and repository revisions of the Makefile.

     $ cvs diff Makefile     Index: Makefile     =  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==     RCS file: /var/lib/cvs/wizzard/Makefile,v     retrieving revision 1.6     diff -r1.6 Makefile     25a26     >       rm -f lib/*.o

edit

 cvs [cvs-options] edit [options] [files ...]

Mark a file as being edited by the current user. This command is used as part of the cvs watch family of commands. If a file is being watched, it is checked out to the sandbox with read permissions but not write permissions. The edit command sets the sandbox file as writable, notifies any watchers that the file is being edited, and sets the user as a temporary watcher to be notified if certain actions are performed on the file by other users. See also editors, unedit, watch, and watchers.

NOTE

CVS does not notify you of your own changes.

You can unedit (set read-only and clear the temporary watch) a file with cvs unedit or cvs release, or by removing the file and re-creating it with cvs update or cvs checkout.

CVS uses any script in the notify file in the repository's CVSROOT directory to notify the user of changes.

Synonyms: none

Standard subcommand options: -l, -R

Options


-a action

Notify the user when the specified action occurs to the file. This setting acts as a temporary watch (see watch) on the file and is removed when the file is no longer being edited. Each -a designates one of the possible actions. The -a option can be repeated to designate multiple actions.

The action may be any of the following:


commit

Notify the user when someone else commits changes to the file.


edit

Notify the user if someone else has run cvs edit on the file.


unedit

Notify the user when the file is no longer being edited by someone else. This notification is triggered by the user running cvs unedit or cvs release, or by the file being deleted and re-created with cvs update or cvs checkout.


all

Notify the user of all of the previous actions.


none

Notify the user of none of the previous actions.

editors

 cvs [cvs-options] editors [-lR] [files ...]

Displays the list of people who have a current edit command for the file or files listed as parameters. If no files are listed, this command lists the editors for the files in the current directory and subdirectories. See also edit, unedit, watch, and watchers.

Synonyms: none

Standard subcommand options: -l, -R

Examples

 $ cvs editors Makefile     Makefile arnold Sat Oct 26 01:51:02 2002 GMT helit /home/ arnold/cvs/wizzard

export

 cvs [cvs-options] export [options] project

Create a directory containing all directories and files belonging to a specified release of a project, with no CVS administrative files. It acts like a checkout or update for that specific point, but it does not produce the CVS administrative files. export requires the -r or -D command options. When exporting, the repository path must be specified by using the -d repository_path CVS option or the CVSROOT environment variable. See also checkout and update.

The argument to export can be a directory name or path within the repository, a filename or path within the repository, or a module name as specified in the modules file in the repository's CVSROOT directory.

NOTE

You can imply the repository path by being in a sandbox, but exporting into a sandbox is not recommended.

Synonyms: exp, ex

Standard subcommand options: -d, -D, -f, -k, -l, -n, -N, -r, -R

Examples

 $ cvs -d cvs:/var/lib/cvs export -D now wizzard cvs server: Updating wizzard     U wizzard/Changelog     U wizzard/INSTALL     U wizzard/Makefile

history

 cvs [cvs-options] history [options] [files ...]

Display the information stored in the history file in the repository's CVSROOT directory. If that file does not exist or is not writable, the history command fails with an error. CVS writes to the history file during checkout, export, commit, rtag, update, and release operations.

Synonyms: hi, his

Standard subcommand options: -D, -r

NOTE

The -f, -l, -n, and -p options for cvs history act differently than their normal uses in CVS.

Options


-a

Show history data for all users. By default, CVS shows only the data for the calling user.


-b string

Show data more recent than the newest record that contains the given string in the module name, filename, or repository path.


-c

Report only commits: times when the repository was modified (equivalent to -xAMR).


-e

Report on every record type. This option is equivalent to -x with every type specified.


-f file

Show data for the specified file. This option can be repeated to show data for multiple files.


-l

Show only the most recent commit to the repository.


-m module

Show data for a particular module. CVS checks the modules file in the repository's CVSROOT directory and then searches the history file for files and directories that belong to the module.


-n module

Like -m, but CVS searches only the history file for the specified module name.


-o

Report on records of checkouts (equivalent to -xO).


-p directory

Show records for a particular project directory. This option can be repeated to show records for several projects.


-r revision

Show data as of, or more recent than, the revision or tag. CVS searches the repository's project files to determine the timestamp of the revision.


-t tagname

Show data as of, or more recent than, the latest time a tag record with this tagname was stored in the history file by any user.


-T

Report on records of tags (equivalent to -xT).


-u username

Report on records for the specified username. This option can be repeated to search for multiple users.


-w

Report on records of actions that match the current working directory.


-x flag(s)

Extract records that match the given flag or flags. Any number of flags can be used with the -x option. cvs history extracts all records in the history file that match this option and all other options. The flags may be any of the following:


A

Report on records of files added to the repository.


C

Report on records of files that would have been updated in a sandbox, but where the files needed to be merged and there were conflicts in the merge.


E

Report on records of files exported from the repository.


F

Report on records of files that were released.


G

Report on records of files updated in a sandbox with a successful merge.


M

Report on records of files that were modified (a sandbox revision added to the repository).


O

Report on records of files that were checked out.


R

Report on records of files that were removed from the repository.


T

Report on records of files that were rtagged.


U

Report on records of files updated in a sandbox file with no merge required.


W

Report on records of files deleted from a sandbox during an update because they were no longer active in the repository.


-z timezone

Produce output and convert times to the specified timezone. The time zone can be a recognized abbreviation such as EST, or it can be given as an offset of UTC. Time zones are listed in the earlier section Time Zones."

Examples

 $ cvs history     O 2002-10-03 08:33 +0000 arnold wizzard/src =wizmain=     <remote>/*     O 2002-10-03 09:12 +0000 arnold wizzard     =wizmake=     <remote>/*     O 2002-10-03 09:12 +0000 arnold wizzard/src =wiztest=     <remote>/*     O 2002-10-25 08:58 +0000 arnold wizzard     =wizzard= <remote>/*

import

 cvs [cvs-options] import [options] project-name vendor-tag  release-tag

Create a new project in the repository, or manage vendor branches. To create a new project, lay out the project structure and any initial files. You can do this in a temporary directory, as CVS does not need the initial structure or files once the project has been imported. Change directories into the root directory of the new project; then run cvs import. You need to specify the repository path and provide a project name and two tags: a vendor tag and a release tag.

The project-name will become the project's root directory name. The tags are less critical; if you do not intend to use a vendor branch, a meaningless pair of tags such as a1 b2 is sufficient. The tag names must conform to all the normal requirements for tags: they must start with a letter and can contain only alphanumeric characters, underscores (_), and hyphens (-). The HEAD and BASE tag names are reserved.

A vendor branch is a special branch that CVS provides to track third-party code that contributes to a project. If you use vendor branches, CVS uses the vendor-tag as a branch tag for the vendor branch, and it uses the release-tag to mark the current revisions of the vendor branch files.

Create a vendor branch by using cvs import to create the project. When you want to update to a new release from the vendor, use cvs import on the same project with the same vendor tag and a new release tag.

NOTE

Test that you can cvs checkout the new project before removing the original files.

Synonyms: im, imp

Standard subcommand options: -k, -m

Options


-b branch

Import to the specified vendor branch. If you have more than one external supplier for a project, you may need to use two or more distinct vendor branches to manage the project. If you are using multiple vendor branches, use the -b option to specify which branch you are importing to. branch must be the branch number, not a tag, and CVS does not check that the branch number given with the option and the symbolic tag provided as the vendor-tag argument to the command correspond to the same branch.


-d

When setting the timestamp on each imported file, use each file's last modification time rather than the current time.


-I file

Ignore the named file when updating. -I can be used more than once. Use -I ! to clear the list of ignored files.


-W wrapper

Modify the import based on elements of each filename.

Examples

 $ cvs -d cvs:/var/lib/cvs import wizzard wizproject ver_0- 1     ...     No conflicts created by this import

init

 cvs [cvs-options] init

Convert an existing directory into a CVS repository, and create and populate the CVSROOT directory that contains the administrative files for a CVS repository.

CVS creates the final directory in the path if it does not already exist. Previous directories in the path must exist.

Synonyms: none

Examples

 $ cvs -d /var/lib/cvsroot init

kserver

 cvs [cvs-options] kserver

Run the repository-server end of a Kerberos 4 connection. The cvs kserver command must be called from inetd or an equivalent server daemon. See also pserver.

Synonyms: none

log

 cvs [cvs-options] log [options] [files ...]

Display information about the files in the current sandbox or the files specified as parameters. The information this command provides is part of the header section of the files in the repository. This command also provides information from the log messages created when files are imported or changes are committed.

With no options, cvs log displays all the information it has available. See also rlog.

Synonym: lo

Standard subcommand options: -l

Options


-b

Display information about only the revisions on the default branch, normally the trunk.


-d dates

Display information only on revisions checked in on or between the dates or times provided. Date and time formats are listed in the earlier section "Dates." More than one date range can be given; ranges must be separated by semicolons. Date ranges can be specified according to the following list:


date1>date2, date2<date1

Select all revisions between the two dates.


date1>=date2, date2<=date1

Select all revisions on or between the two dates.


date>, <date

Select all revisions earlier than date.


date>=, <=date

Select all revisions on or earlier than date.


date<, >date

Select all revisions later than date.


date<=, >=date

Select all revisions on or later than date.


date

Select all revisions on date.


-h

Print only the header information for a file, not the description, the log messages, or revision information.


-N

Do not list the tags (the symbolic names).


-r[revisions]

Provide information only on revisions in the ranges provided. More than one range can be given; ranges must be separated by commas. There must be no space between the -r and its argument. If no range is provided, the latest revision on the default branch, normally the trunk, is used.

Ranges can be specified according to the following list:


revision1:revision2, revision1::revision2

Select all revisions between revision1 and revision2. The revisions must be on the same branch. With the double colon, CVS excludes revision1.


:revision, ::revision

Select revisions from the start of the branch or trunk the revision is on, up to and including the revision.


revision:, revision::

Select revisions from revision to the end of the branch or trunk the revision is on. With the double colon, CVS excludes the revision.


branch

Select all revisions on branch.


branch1:branch2, branch1::branch2

Select all revisions on both branches and any branches that split off from the two branches.


branch.

Select the latest revision on branch. Note the trailing period.


-R

Display the name of the repository copy of a file only.


-s states

Display only revisions with states that match one of the states in the comma-separated list.


-S

Do not display header information if there are no revisions to display.


-t

Print only the header information and description, not the log messages or revision information.


-w[usernames]

Display only revisions committed by the specified list of users. Provide the list of users as a comma-separated list. If no usernames are listed, the revisions committed by the current user are displayed. There can be no space between -w and its argument.

Examples

 $ cvs log     cvs server: Logging . RCS file: /var/lib/cvs/wizzard/Changelog,v     Working file: Changelog head: 1.1     branch:     locks: strict     access list:     symbolic names:     beta_0-1_branch: 1.1.0.2     beta_0-1_branch_root: 1.1 pre_beta_0-1: 1.1     keyword substitution: kv     total revisions: 1; selected revisions: 1     description:     ---------------------------- revision 1.1    da te: 2002/08/31 13:37:56;   author: arnold;  state: Exp;     Creating a structure. ...

login

 cvs [cvs-options] login

Log into a CVS pserver session. This command is needed only with the pserver connection mode. See also logout.

Synonyms: none

Examples

 $ cvs -d :pserver:arnold:password:@cvs.nosuch.net:/var/  lib/cvs login    Logging in to :pserver:arnold@cvs:2401/var/lib/cvs

logout

 cvs [cvs-options] logout

Log out of a CVS pserver session. This command is needed only with the pserver connection mode. See also login.

Synonyms: none

Examples

 $ cvs -d :pserver:arnold@cvs:/var/lib/cvs logout     Logging out of :pserver:arnold@cvs:2401/var/lib/cvs

pserver

 cvs [cvs-options] pserver

Run the repository-server end of a password server or Kerberos 5 (via the GSS-API) connection. This command must be called from inetd or an equivalent server daemon. See also kserver.

Synonyms: none

rannotate

 cvs [cvs-options] rannotate [options] files ...

Display files with annotations showing the last editor and revision that changed each line of each specified file. You can run rannotate without a sandbox, but you must have a repository specified if you do so. rannotate requires at least one filename, directory name, or module name from within the repository as an argument. See also annotate.

Synonyms: ra, rann

Standard subcommand options: -D, -f, -l, -r, -R

Options


-F

Show annotations for binary files.

Examples

 $ cvs rannotate wizzard/Makefile     Annotations for wizzard/Makefile     ***************     1.2  (arnold 01-Sep-02): #     1.2  (arnold     01-Sep-02): # Makefile for the Wizzard     project     1.2  (arnold     01-Sep-02): # Created by A Robbins, 1     September 2002

rdiff

    cvs [cvs-options] rdiff [options] projects ...

Create output that can be redirected into a file and used with the GNU (or equivalent) patch program. The output goes to the standard output. rdiff operates directly from the repository and does not need to be used from a sandbox. It does, however, require a filename, directory name, or module name as an argument, and you must specify one or two revisions or dates. If you specify one revision or date, rdiff calculates the differences between that date and the current (HEAD) revision. If two dates are specified, rdiff calculates the differences between the two. See also diff.

Synonyms: pa, patch

NOTE

Most people use rdiff to make a file to use with patch. If you're using a patch file that was created over more than one directory, you may need to use the -p option to patch, so that it can find all the appropriate directories.

Standard subcommand options: -D, -f, -l, -r, -R

Options


-c

Use context output format, with three lines of context around each change. This is the default format.


-s

Create a summary change report rather than a patch, showing which files have changed with one line per file.


-t

Produce a report on the two most recent revisions in a file. Do not use -r or -D with the -t option.


-u

Use unidiff format instead of context format.


-V version

This option is now obsolete, but it used to allow you to expand keywords according to the rules of the specified RCS version.

Examples

 $ cvs rdiff -r 1.5 wizzard/Makefile     Index: wizzard/Makefile     diff -c wizzard/Makefile:1.5 wizzard/Makefile:1.6 *** wizzard/Makefile:1.5     Thu Oct 17 08:50:14 2002     --- wizzard/Makefile         Thu Oct 17 10:01:12 2002     *************** *** 2,17 ****       # Makefile for the Wizzard project       # First created by A Robbins, 1 September 2002       #     ! # Current revision $Revision: 1.4 $       # On branch $Name:  $ (not expanded if this is the trunk)     ! # Latest change by $Author: sanders $ on $Date: 2005/05/     03 19:07:12 $       #       ##       # Initial declarations       #       CC=gcc     ! SUBDIRS = man doc src lib       # Declaring phony targets     --- 2,17 ----       # Makefile for the Wizzard project       # First created by A Robbins, 1 September 2002       #    ! # Current revision $Revision: 1.4 $       # On branch $Name:  $ (not expanded if this is the trunk)     ! # Latest change by $Author: sanders $ on $Date: 2005/05/     03 19:07:12 $       #       ##       # Initial declarations       #       CC=gcc     ! SUBDIRS = man doc src lib test       # Declaring phony targets     ***************     ...

release

 cvs [cvs-options] release [-d] directories ...

Make a sandbox inactive. This command checks for uncommitted changes, removing any existing edit flags, and writes to the CVSROOT/history file that the sandbox has been released. You can use release on an entire sandbox or on one or more subdirectories.

Synonyms: re, rel

Option


-d

Delete the sandbox after it has been released.

Examples

 $ cvs -d cvs:/var/lib/cvs release wizzard You have [0] altered files in this repository.     Are you sure you want to release directory `wizzard': y

remove

 cvs [cvs-options] remove [-flR] [files ...]

The remove command removes a file or directory from the repository. It can also be used to undo an uncommitted file addition.

Synonyms: rm, delete.

Standard subcommand options: -l, -R.

Options


-f

Delete the files from the sandbox before removing them from the repository.

Examples

 $ cvs remove server.cc     cvs server: scheduling `server.cc' for removal     cvs server: use 'cvs commit' to remove this file permanently

rlog

 cvs [cvs-options] rlog [options] files ...

The rlog command is a remote version of the log command. rlog works without a sandbox and requires a file, directory, or module name from the repository. See also log.

Synonym: rl.

Standard subcommand options: -l.

Options


-b

Provide information about only the revisions or a file on the default branch, normally the highest branch on the trunk.


-d dates

Provide information on only revisions of a file that were checked in on or between the dates or times provided. Date formats are listed in the earlier section Dates." More than one date range can be given; ranges must be separated by semicolons. Date ranges are the same as for the log command (see log).


-h

Print only the header information, not the description, log messages, or revision information.


-N

Do not list the tags (the symbolic names).


-r[revisions]

Provide information on only revisions in the ranges provided. More than one revision range can be given; ranges must be separated by commas. There must be no space between the -r and its argument. If no range is provided, the latest revision on the default branch, normally the trunk, is used. The possible values for revisions are the same as for log (see log).


-R

Display the name of the repository copy of the file only.


-s states

Display only revisions with states that match one of the states in the comma-separated list.


-S

Do not display header information of a file if there are no revisions to display.


-t

Print only the header information of a file and its description, not the log messages or revision information.


-w[usernames]

Display only revisions committed by the usernames in the comma-separated list. If there are no usernames listed, the revisions committed by the current user are displayed. There can be no space between -w and its argument.

rtag

 cvs [cvs-options] rtag [options] tagname files ...

Mark a revision of a single file with a meaningful name, or mark a set of revisions of multiple files so that they can all be retrieved easily as a group. Tagnames must begin with a letter and may contain only alphanumeric characters, underscores (_), and hyphens (-). There are two tags reserved for CVS: the BASE and HEAD tags. See also tag.

The tag and rtag commands are also used to create branches.

The rtag command does not need to run from a sandbox, but it does need to have a revision or date specified. It also requires a filename, directory name, or module name given as a parameter.

Synonyms: rt, rfreeze

Standard subcommand options: -D, -f, -l, -n, -r, -R

Options


-a

Clear a tag from files that have been removed from active development. Normally, removed files are not searched when tags are removed. This option works with the -d and -F options.


-b

Create a branch off the designated revision (provided with -r), using the designated tagname as the branch name.


-B

Allow -F and -d to act on branch tags. Back up the repository before you use this option, and be extremely careful. See Chapter 4 in Essential CVS (O'Reilly) before using this option.


-d

Delete the specified tag.


-F

Move the tag from the revision it currently refers to, to the revision specified in the rtag command.

Examples

 $ cvs -d cvs:/var/lib/cvs rtag -D now alpha_1-6 wizzard     cvs rtag: Tagging wizzard     cvs rtag: Tagging wizzard/doc     cvs rtag: Tagging wizzard/doc/design     cvs rtag: Tagging wizzard/doc/plan ...

server

 cvs server

Runs the repository end of the CVS server using an internal version of the rsh program. The CVS client must also be able to use this internal version. This is used for the server access method. See also kserver and pserver.

Synonyms: none

status

 cvs [cvs-options] status [-vlR] [files ...]

Display information about files, such as the current working or base revision, the current revision in the repository, and whether the files are currently synchronized with the repository. With the -v option, status also shows the files' tags.

Synonyms: st, stat

Standard subcommand options: -l, -R

Options


-v

Include information about tags.

Examples

 $ cvs status Makefile     =  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==     File: Makefile                              Status: Locally Modified     Working revision:    1.6 Repository revision: 1.6     /var/lib/cvs/wizzard/Makefile,v     Sticky Tag:          (none)     Sticky Date:         (none)     Sticky Options:      (none)

tag

 cvs [cvs-options] tag [options]\ tagname [files ...]

Mark a revision of a single file with a meaningful name, or mark a set of revisions of multiple files so that they can all be retrieved easily as a group. Tagnames must begin with a letter and may contain only alphanumeric characters, underscores (_), and hyphens (-). There are two tags reserved for CVS: the BASE and HEAD tags. See also rtag.

The tag and rtag commands are also used to create branches.

If no revision number or date is given to the tag command, this command tags based on the most recent revision in the repository that was synchronized with the current sandbox directory (i.e., the most recently updated, checked-out, or committed revision). This revision can be seen as the working revision in the cvs status command.

Synonyms: ta, freeze

Standard subcommand options: -D, -f, -l, -r, -R

Options


-b

Create a branch off the specified revision, using the specified tagname as the branch name.


-c

Check whether the sandbox copies of the specified files have been modified since they were last synchronized with the repository. If they have been modified, do not tag them and display an error. If they are unmodified, tag them with the specified tagname. This option is useful when tagging the current sandbox revisions.


-d

Delete the specified tagname from a file.


-F

Move the tagname from the revision it currently refers to, to the revision specified in the tag command.

Examples

 $ cvs tag alpha_1-5     cvs server: Tagging . T Changelog     T INSTALL     T Makefile     T README     T TODO ...

unedit

 cvs [cvs-options] unedit [-lR] [files ...]

Unmark a file as being edited by the current user. The cvs unedit command is used as part of the cvs watch family of commands. If a file is being watched, CVS writes it (when it is checked out) to the sandbox with read permissions but not write permissions. The unedit command notifies watchers that the file is no longer being edited, clears the temporary watch, sets the file as read-only, and restores the file to the repository revision that the sandbox copy was based on. See also edit, editors, watch, and watchers.

The script in the notify file in the repository's CVSROOT directory is used to notify the user of changes.

Synonyms: none

Standard subcommand options: -l, -R

update

 cvs [cvs-options] update [options] [files ...]

Download changes from the repository to an existing sandbox. While doing this, update merges changes from the repository into changed files in the sandbox. See also checkout and export.

If update cannot merge repository changes with sandbox changes without losing data, it reports a conflict.

If update is not given any filenames or directory names as parameters, it acts on the current sandbox.

Synonyms: up, upd

Standard subcommand options: -D, -f, -k, -l, -r, -R

Options


-A

Clear sticky tags, dates, and keyword-expansion modes and replace the current files in the sandbox with the head of the trunk.


-C

Replace any file that has been changed locally with the revision from the repository that the local file was based on. The modified local file is saved as .#file.revision in its local sandbox directory.


-d

Create any directories that are in the repository but not in the sandbox. By default, update works only on the directories that are currently in the sandbox and ignores any new directories.


-I file

Ignore the named file when updating. -I can be used more than once. Use -I ! to clear the list of ignored files.


-j revision[:date]

Determine the changes between the revision the files in the sandbox are based on and the specified revision, and merge the changes to the sandbox.

If two -j options are used, determine the changes between the first -j revision and the second -j revision, and merge those changes to the sandbox.

The date can be used only if the revision designates a branch. If date is used, it specifies the latest revision on (not before) that date.


-p

Update the listed files, but write them to standard output rather than to the filesystem. Do not change the sandbox.


-P

Do not include empty directories in the sandbox.


-W wrapper

Modify the update based on elements of each filename.

Examples

 $ cvs update     cvs server: Updating .     U wizzard/Changelog     U wizzard/INSTALL     U wizzard/Makefile

version

 cvs [cvs-options] version

Display the version information for the current installation of CVS.

Synonyms: ve, ver

Examples

 $ cvs version     Concurrent Versions System (CVS) 1.11.15 (client/server)

watch

 cvs [cvs-options] watch command [options] [files ...]

Set files to be watched, or add users to the file-watch list. Users who are watching a file are notified via the script in the notify file in the repository's CVSROOT directory when other users perform specific actions. Essential CVS (O'Reilly) explains uses of the cvs watch family of commands. See also edit, editors, unedit, and watchers.

NOTE

CVS does not notify you of your own changes.

Synonyms: none

Standard subcommand options: -l, -R

Commands


on and off

The on and off subcommands control whether the file or files are marked as being watched. If a file is marked as being watched, CVS sets it as read-only when it is checked out of the repository. Without this read-only setting, developers might forget to use cvs edit when editing a file.

If the argument is a directory, all current files in the directory and all new files added to that directory in the future are set as being watched.

The on and off subcommands set whether a file is watchable, but they do not set who is watching it; the add and remove subcommands set whether or not you are watching a file.


add and remove

Use the add and remove subcommands to set or remove files you want to watch. Use the -a option to specify which actions you want to be notified of.

Options


-a action

Notify the user when the designated actions occur to the file. Each -a designates one possible action. The -a option can be repeated to designate multiple actions. The -a option is usable only with the add and remove subcommands.

These are the possible actions:


commit

Notify the user when someone else commits changes to the file.


edit

Notify the user if someone else has run cvs edit on the file.


unedit

Notify the user when the file is no longer being edited by someone else. Notification occurs when cvs unedit or cvs release runs, or when the file is deleted and re-created with cvs update or cvs checkout.


all

Notify the user in all of the previous cases.


none

Notify the user in none of the previous cases.

Example

 $ cvs watch on Makefile         Enable watching     $ cvs watch add Makefile        Add me to list of watchers

watchers

    cvs [cvs-options] watchers [-lR] [files ...]

Display the list of users who are watching the files listed as parameters. If no files are listed, this command lists the watchers for the files in the current directory and its subdirectories. See also edit, editors, unedit, and watch.

Standard subcommand options: -l, -R

Examples

 $ cvs watchers Makefile     Makefile doppel edit unedit commit     arnold edit unedit commit



Linux in a Nutshell
Linux in a Nutshell
ISBN: 0596154488
EAN: 2147483647
Year: 2004
Pages: 147

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net