CVS--Concurrent Versions System v1.12.12.1: Quick reference to CVS commands

This document was originally released under the GNU General Public License (GPL). All changes to it must also be released under the GPL, as well as the GNU Free Documentation License (which all contributions to this Wiki are released under).

| < | | > |   | << | | Up | | >> |         |Top| |Contents| |Index| | ? |

Quick reference to CVS commands

This appendix describes how to invoke CVS, with

references to where each command or feature is described in detail. For other references run the cvs --help command, or see Index.

A CVS command looks like:

 
cvs <var>global_options  <var>command <var>command_options  <var>command_args 

Global options:

--allow-root=rootdir

Specify legal CVSROOT directory (server only) (not

in CVS 1.9 and older). See Setting up the server for password authentication.

-a

Authenticate all communication (client only) (not in CVS

1.9 and older). See Global options.

-b

Specify RCS location (CVS 1.9 and older). See

Global options.

-d root

Specify the CVSROOT. See The Repository.

-e editor

Edit messages with editor. See Committing your changes.

-f

Do not read the `~/.cvsrc' file. See Global options.

-H
--help

Print the help message. See Global options.

-n

Do not change any files. See Global options.

-Q

Be really quiet. See Global options.

-q

Be somewhat quiet. See Global options.

-r

Make new working files read-only. See Global options.

-s variable=value

Set a user variable. See Expansions in administrative files.

-T tempdir

Put temporary files in tempdir. See Global options.

-t

Trace CVS execution. See Global options.

-v
--version

Display version and copyright information for CVS.

-w

Make new working files read-write. See Global options.

-x

Encrypt all communication (client only).

See Global options.

-z gzip-level

Set the compression level (client only).

See Global options.

Keyword expansion modes (see section Substitution modes):

 
-kkv  $<i>Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp $
-kkvl $<i>Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
-kk   $<i>Id$
-kv   file1,v 1.1 1993/12/09 03:21:13 joe Exp
-ko   <i>no expansion
-kb   <i>no expansion, file is binary

Keywords (see section Keyword List):

 
$<i>Author: joe $
$<i>Date: 1993/12/09 03:21:13 $
$<i>CVSHeader: files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
$<i>Header: /home/files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
$<i>Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
$<i>Locker: harry $
$<i>Name: snapshot_1_14 $
$<i>RCSfile: file1,v $
$<i>Revision: 1.1 $
$<i>Source: /home/files/file1,v $
$<i>State: Exp $
$<i>Log: file1,v $
Revision 1.1  1993/12/09 03:30:17  joe
Initial revision

Commands, command options, and command arguments:

add 1 2

Add a new file/directory. See Adding files to a directory.

-k kflag

Set keyword expansion.

-m msg

Set file description.

admin 3 4

Administration of history files in the repository. See

admin--Administration.

-b5

Set default branch. See Reverting to the latest vendor release.

-cstring

Set comment leader.

-ksubst

Set keyword substitution. See Keyword substitution.

-l6

Lock revision rev, or latest revision.

-mrev:msg

Replace the log message of revision rev with

msg.

-orange

Delete revisions from the repository. See

admin options.

-q

Run quietly; do not print diagnostics.

-sstate7

Set the state.

-t

Set file description from standard input.

-tfile

Set file description from file.

-t-string

Set file description to string.

-u8

Unlock revision rev, or latest revision.

annotate 9 10

Show last revision where each line was modified. See

annotate--What revision modified each line of a file?.

-D date

Annotate the most recent revision no later than

date. See Common command options.

-F

Force annotation of binary files. (Without this option,

binary files are skipped with a message.)

-f

Use head revision if tag/date not found. See

Common command options.

-l

Local; run only in current working directory. See section Recursive behavior.

-R

Operate recursively (default). See section Recursive behavior.

-r tag11

Annotate revisions specified by tag or, when date is specified

and tag is a branch tag, the version from the branch tag as it existed on date. See Common command options.

checkout 12 modules

Get a copy of the sources. See checkout--Check out sources for editing.

-A

Reset any sticky tags/date/options. See Sticky tags and Keyword substitution.

-c

Output the module database. See checkout options.

-D date

Check out revisions as of date (is sticky). See

Common command options.

-d dir

Check out into dir. See checkout options.

-f

Use head revision if tag/date not found. See

Common command options.

-j tag13

Merge in the change specified by tag, or when date is specified

and tag is a branch tag, the version from the branch tag as it existed on date. See checkout options.

-k kflag

Use kflag keyword expansion. See

Substitution modes.

-l

Local; run only in current working directory. See section Recursive behavior.

-N

Don't "shorten" module paths if -d specified. See

checkout options.

-n

Do not run module program (if any). See checkout options.

-P

Prune empty directories. See Moving and renaming directories.

-p

Check out files to standard output (avoids

stickiness). See checkout options.

-R

Operate recursively (default). See section Recursive behavior.

-r tag14

Checkout the revision already tagged with tag or, when date is

specified and tag is a branch tag, the version from the branch tag as it existed on date. This . See Common command options.

-s

Like -c, but include module status. See checkout options.

commit 15 16

Check changes into the repository. See commit--Check files into the repository.

-c

Check for valid edits before committing. Requires a CVS client and server

both version 1.12.10 or greater.

-F file

Read log message from file. See commit options.

-f

Force the file to be committed; disables recursion.

See commit options.

-l

Local; run only in current working directory. See Recursive behavior.

-m msg

Use msg as log message. See commit options.

-n

Do not run module program (if any). See commit options.

-R

Operate recursively (default). See section Recursive behavior.

-r rev

Commit to rev. See commit options.

diff 17 18

Show differences between revisions. See diff--Show differences between revisions.

In addition to the options shown below, accepts a wide variety of options to control output style, for example `-c' for context diffs.

-D date1

Diff revision for date against working file. See

diff options.

-D date2

Diff rev1/date1 against date2. See

diff options.

-l

Local; run only in current working directory. See Recursive behavior.

-N

Include diffs for added and removed files. See

diff options.

-R

Operate recursively (default). See section Recursive behavior.

-r tag119

Diff the revisions specified by tag1 or, when date1 is specified

and tag1 is a branch tag, the version from the branch tag1 as it existed on date1, against the working file. See diff options and Common command options.

-r tag220

Diff the revisions specified by tag2 or, when date2 is specified

and tag2 is a branch tag, the version from the branch tag2 as it existed on date2, against rev1/date1. See diff options and Common command options.

edit 21 22

Get ready to edit a watched file. See How to edit a file which is being watched.

-a actions

Specify actions for temporary watch, where

actions is edit, unedit, commit, all, or none. See How to edit a file which is being watched.

-c

Check edits: Edit fails if someone else is already editting the file.

Requires a CVS client and server both of version 1.12.10 or greater.

-f

Force edit; ignore other edits. Added in CVS 1.12.10.

-l

Local; run only in current working directory. See Recursive behavior.

-R

Operate recursively (default). See section Recursive behavior.

editors 23 24

See who is editing a watched file. See Information about who is watching and editing.

-l

Local; run only in current working directory. See Recursive behavior.

-R

Operate recursively (default). See section Recursive behavior.

export 25 modules

Export files from CVS. See export--Export sources from CVS, similar to checkout.

-D date

Check out revisions as of date. See

Common command options.

-d dir

Check out into dir. See export options.

-f

Use head revision if tag/date not found. See

Common command options.

-k kflag

Use kflag keyword expansion. See

Substitution modes.

-l

Local; run only in current working directory. See section Recursive behavior.

-N

Don't "shorten" module paths if -d specified. See

export options.

-n

Do not run module program (if any). See export options.

-R

Operate recursively (default). See section Recursive behavior.

-r tag26

Export the revisions specified by tag or, when date is specified

and tag is a branch tag, the version from the branch tag as it existed on date. See Common command options.

history 27 28

Show repository access history. See history--Show status of files and users.

-a

All users (default is self). See history options.

-b str

Back to record with str in module/file/repos

field. See history options.

-c

Report on committed (modified) files. See history options.

-D date

Since date. See history options.

-e

Report on all record types. See history options.

-l

Last modified (committed or modified report). See history options.

-m module

Report on module (repeatable). See history options.

-n module

In module. See history options.

-o

Report on checked out modules. See history options.

-p repository

In repository. See history options.

-r rev

Since revision rev. See history options.

-T

Produce report on all TAGs. See history options.

-t tag

Since tag record placed in history file (by anyone).

See history options.

-u user

For user user (repeatable). See history options.

-w

Working directory must match. See history options.

-x types

Report on types, one or more of

TOEFWUPCGMAR. See history options.

-z zone

Output for time zone zone. See history options.

import 29 repository vendor-tag release-tags

Import files into CVS, using vendor branches. See

import--Import sources into CVS, using vendor branches.

-b bra

Import to vendor branch bra. See

Multiple vendor branches.

-d

Use the file's modification time as the time of

import. See import options.

-k kflag

Set default keyword substitution mode. See

import options.

-m msg

Use msg for log message. See

import options.

-I ign

More files to ignore (! to reset). See

import options.

-W spec

More wrappers. See import options.

init

Create a CVS repository if it doesn't exist. See

Creating a repository.

kserver

Kerberos authenticated server.

See Direct connection with Kerberos.

log 30 31

Print out history information for files. See log--Print out log information for files.

-b

Only list revisions on the default branch. See log options.

-d dates

Specify dates (d1<d2 for range, d for

latest before). See log options.

-h

Only print header. See log options.

-l

Local; run only in current working directory. See Recursive behavior.

-N

Do not list tags. See log options.

-R

Only print name of RCS file. See log options.

-rrevs

Only list revisions revs. See log options.

-s states

Only list revisions with specified states. See log options.

-t

Only print header and descriptive text. See log options.

-wlogins

Only list revisions checked in by specified logins. See log options.

login

Prompt for password for authenticating server. See

Using the client with password authentication.

logout

Remove stored password for authenticating server. See

Using the client with password authentication.

pserver

Password authenticated server.

See Setting up the server for password authentication.

rannotate 32 33

Show last revision where each line was modified. See

annotate--What revision modified each line of a file?.

-D date

Annotate the most recent revision no later than

date. See Common command options.

-F

Force annotation of binary files. (Without this option,

binary files are skipped with a message.)

-f

Use head revision if tag/date not found. See

Common command options.

-l

Local; run only in current working directory. See section Recursive behavior.

-R

Operate recursively (default). See section Recursive behavior.

-r tag34

Annotate the revision specified by tag or, when date is specified

and tag is a branch tag, the version from the branch tag as it existed on date. See Common command options.

rdiff 35 modules

Show differences between releases. See rdiff--'patch' format diffs between releases.

-c

Context diff output format (default). See rdiff options.

-D date

Select revisions based on date. See Common command options.

-f

Use head revision if tag/date not found. See

Common command options.

-l

Local; run only in current working directory. See Recursive behavior.

-R

Operate recursively (default). See section Recursive behavior.

-r tag36

Select the revisions specified by tag or, when date is specified

and tag is a branch tag, the version from the branch tag as it existed on date. See diff options and Common command options.

-s

Short patch - one liner per file. See rdiff options.

-t

Top two diffs - last change made to the file. See

diff options.

-u

Unidiff output format. See rdiff options.

-V vers

Use RCS Version vers for keyword expansion (obsolete). See

rdiff options.

release 37 directory

Indicate that a directory is no longer in use. See

release--Indicate that a Module is no longer in use.

-d

Delete the given directory. See release options.

remove 38 39

Remove an entry from the repository. See Removing files.

-f

Delete the file before removing it. See Removing files.

-l

Local; run only in current working directory. See Recursive behavior.

-R

Operate recursively (default). See section Recursive behavior.

rlog 40 41

Print out history information for modules. See log--Print out log information for files.

-b

Only list revisions on the default branch. See log options.

-d dates

Specify dates (d1<d2 for range, d for

latest before). See log options.

-h

Only print header. See log options.

-l

Local; run only in current working directory. See Recursive behavior.

-N

Do not list tags. See log options.

-R

Only print name of RCS file. See log options.

-rrevs

Only list revisions revs. See log options.

-s states

Only list revisions with specified states. See log options.

-t

Only print header and descriptive text. See log options.

-wlogins

Only list revisions checked in by specified logins. See log options.

rtag 42 tag modules

Add a symbolic tag to a module.

See Revisions and Branching and merging.

-a

Clear tag from removed files that would not otherwise

be tagged. See Tagging and adding and removing files.

-b

Create a branch named tag. See Branching and merging.

-B

Used in conjunction with -F or -d, enables movement and deletion of

branch tags. Use with extreme caution.

-D date

Tag revisions as of date. See Specifying what to tag by date or revision.

-d

Delete tag. See Deleting, moving, and renaming tags.

-F

Move tag if it already exists. See Deleting, moving, and renaming tags.

-f

Force a head revision match if tag/date not found.

See Specifying what to tag by date or revision.

-l

Local; run only in current working directory. See Recursive behavior.

-n

No execution of tag program. See Common command options.

-R

Operate recursively (default). See section Recursive behavior.

-r tag43

Tag the revision already tagged with tag or, when date is specified

and tag is a branch tag, the version from the branch tag as it existed on date. See Specifying what to tag by date or revision and Common command options.

server

Rsh server. See Connecting with rsh.

status 44 files

Display status information in a working directory. See

File status.

-l

Local; run only in current working directory. See Recursive behavior.

-R

Operate recursively (default). See section Recursive behavior.

-v

Include tag information for file. See Tags-Symbolic revisions.

tag 45 tag 46

Add a symbolic tag to checked out version of files.

See Revisions and Branching and merging.

-b

Create a branch named tag. See Branching and merging.

-c

Check that working files are unmodified. See

Specifying what to tag from the working directory.

-D date

Tag revisions as of date. See Specifying what to tag by date or revision.

-d

Delete tag. See Deleting, moving, and renaming tags.

-F

Move tag if it already exists. See Deleting, moving, and renaming tags.

-f

Force a head revision match if tag/date not found.

See Specifying what to tag by date or revision.

-l

Local; run only in current working directory. See Recursive behavior.

-R

Operate recursively (default). See section Recursive behavior.

-r tag47

Tag the revision already tagged with tag, or when date is specified

and tag is a branch tag, the version from the branch tag as it existed on date. See Specifying what to tag by date or revision and Common command options.

unedit 48 49

Undo an edit command. See How to edit a file which is being watched.

-l

Local; run only in current working directory. See Recursive behavior.

-R

Operate recursively (default). See section Recursive behavior.

update 50 51

Bring work tree in sync with repository. See

update--Bring work tree in sync with repository.

-A

Reset any sticky tags/date/options. See Sticky tags and Keyword substitution.

-C

Overwrite locally modified files with clean copies from

the repository (the modified file is saved in `.#file.revision', however).

-D date

Check out revisions as of date (is sticky). See

Common command options.

-d

Create directories. See update options.

-f

Use head revision if tag/date not found. See

Common command options.

-I ign

More files to ignore (! to reset). See

import options.

-j tag52

Merge in changes from revisions specified by tag or, when date is

specified and tag is a branch tag, the version from the branch tag as it existed on date. See update options.

-k kflag

Use kflag keyword expansion. See

Substitution modes.

-l

Local; run only in current working directory. See section Recursive behavior.

-P

Prune empty directories. See Moving and renaming directories.

-p

Check out files to standard output (avoids

stickiness). See update options.

-R

Operate recursively (default). See section Recursive behavior.

-r tag53

Checkout the revisions specified by tag or, when date is specified

and tag is a branch tag, the version from the branch tag as it existed on date. See Common command options.

-W spec

More wrappers. See import options.

version

Display the version of CVS being used. If the repository

is remote, display both the client and server versions.

watch 54 55 56

on/off: turn on/off read-only checkouts of files. See

Telling CVS to watch certain files.

add/remove: add or remove notification on actions. See

Telling CVS to notify you.

-a actions

Specify actions for temporary watch, where

actions is edit, unedit, commit, all, or none. See How to edit a file which is being watched.

-l

Local; run only in current working directory. See Recursive behavior.

-R

Operate recursively (default). See section Recursive behavior.

watchers 57 58

See who is watching a file. See Information about who is watching and editing.

-l

Local; run only in current working directory. See Recursive behavior.

-R

Operate recursively (default). See section Recursive behavior.


| << | | >> |           |Top| |Contents| |Index| | ? |

This document was generated by Derek Price on July, 20 2005 using texi2html 1.77.