Sei sulla pagina 1di 2

CVS QUICK REFERENCE CARD CVS command summary Checkout

This list summarizes all possible cmd available. Only cvs co [-ANPRcflnps] [-rrev |-Ddate] [-ddir ] [-jrev1
Overview cmd ticked with . are detailed here. [-jrev2 ]] [-kopt] module...
CVS is a version control system aimed at keeping an his- . add . . . . . . . . . . . . . . . . . . . . . . . . add new files or directories Obtain a new sandbox by getting files from module into
tory and managing multiple people working at the same admin . . . . . . . . . . . . . control/administrate the repository the directory CVS creates. cvs co in an already checked
time on a same source hierarchy. CVS keeps a single . checkout . . . . . . get a new sandbox from the repository out module is identical to cvs upd -d.
copy of the master sources, called the repository. Each . commit . . . . . . . . . . . . . apply changes, additions, deletions -A. . . . . . . . . . . . . . . .reset any sticky (◦) tags, flags, dates
person works on one’s own copy of the repository, called . diff . . . show differences between sandbox & repository -jv . . . . . . . . . . . . . . . . . merge changes from the revision v
the sandbox . CVS allows one to control the changes export . . . . . . . . . . . . prepare copies for off-site shipment -jv1 -jv2 . . . . . . . . . . . . . . . merge changes from v1 & v2
between its sandbox and the global repository. . history . . . . . . . . . . show report on commands executed -N . . . . . . . . . . . . . . . . . . . . avoid shortening modules paths
. import . . . . . . . . . . . . incorporate a set of off-site updates -c. . . . . . . . .only list all module files to standard output
Synopsis init . . . . . . . . . . . . . . . . . . . . . . . . initialize a new repository -ddir . . . . . . use dir for new directory instead of module
cvs [cvsopt] cmd [cmdopt] files... . log . . . . . . . . . . . . . . . . . . . . . . . show stored log information -s . . . . . . . . . display status information for each module
cvsopt . . . . options controlling the overall CVS program rdiff . . . . . . . . . prepare a collection of diffs as patch file
cmd . . . . . particular action to perform on the repository release . . . . . . cancel a checkout, abandoning changes Commit
cmdopt. . . . . . .options controlling the specific command . remove . . . . . . . . . . . . . . . remove files from the source tree cvs ci [-nRlf] [-m’msg’|-Ffile] [-rrev ] files...
files . . . . . . . files to act on, or specific arguments to cmd rtag . . . . . . . . . . . . . . specify a symbolic tag for a revision Incorporate changes made locally in the sandbox back
If you do not specify any files, CVS will normally recurse . status . . . . . . . . . . . . . . . . . . . . show current status of files into the repository.
into subdirectories and apply the command to each CVS . tag . . . . . . . . . . . . . specify a symbolic tag from a sandbox -R . . . . . . . . . . . . . . force recursion when scanning for files
files encountered. Warning: the same option can mean . update . . . . . . . . . . . . get the changes from the repository -l . . . . . . . . . . . . . . . . . disable recursion in sub-directories
different things depending on whether it is in the cvsopt
-f . . . . . . force commit even if no change has been made
or cvscmd group.
-Ffile . . . . . . . . . . . . . . . . use content of file as log message
Overall CVS options -mmsg . . . . . . . . . . . . . . . . . . . . . specify msg as log message
This list describes all possible cvsopt available. -rrev . . . . . . . . . . . . . . . . . . commit to specific revision rev
-b bindir . . . . . . . . . . . use bindir as location of RCS files
same as the RCSBIN environment variable Common command options Update
-d cvsdir . . . . . . . . . . use cvsdir as location of repository This list describes all possible cmdopt available, com- cvs upd [-APdflRp] [-rtag|-D date] [-jrev ] [-Iign]
same as the CVSROOT environment variable mon for all cmd , except history. Not all commands [-kopt] [-Wspec] files...
-e editor . . . . . . . . . . . use editor to enter log information support all options, only when it makes sense. The ◦ Update the sandbox with external changes made to the
same as the CVSEDITOR or EDITOR variable symbol specifies a sticky option (CVS remembers the repository.
-f . . . . . . . . . . . . . . . do not read the /.cvsrc startup file option on subsequent commands). -A. . . . . . . . . . . . . . . .reset any sticky (◦) tags, flags, dates
-H . . . . . . . display a summary of all commands available ◦ -Ddate . . . . . the most recent revision no later than date -jrev . . . . . . . . . . . . . merge changes from the revision rev
-H cmd . . . . . . . . . . display usage information about cmd 1 month ago, 6/29/97 08:20:00 PST, -d . . . . . . create any new directories from the repository
-l . . . . . . . . . . . . . . . . . do not log the command in history yesterday, last Friday, 18:30 GMT... -If . . . . . . . . . . . . . . . . . . . ignore file whose names match f
-q . . . . . . . . . . be quiet, suppress informational messages -f . . . . . . . . use file even if it does not match tag or date -I! . . . . . . . . . . . . . . . . . . . . . . . avoid ignoring any file at all
-Q . . . . . . . be really quiet, output only serious problems ◦ -kb . . . . set the file as binary (do not expand keywords) -C . . . . overwrite locally modified files with clean copies
-n . . . . . . . . . . . . . . do not change any files, only simulate ◦ -kv. . . . . . . . . . . . . . . . . . . . . . . .retain keyword information The cvs upd prints a status flag for each file:
-r . . . . . . . . . . . . . . . . . . . . make new working file read-only -l . . . . . . . . . . . . . . . . . disable recursion in sub-directories U . . . . . . . . . . . . . . brought up to date with the repository
same as if CVSREAD variable is set -n . . . . . . . . . . . do not run program associated with cmd A . . . . . . . . . . . . . . . . . added locally but not yet commited
-t . . trace program execution, useful with -n to explore -P . . . remove empty directories after checkout/update R . . . . . . . . . . . . . . . removed locally but not yet commited
-v. . . . . . . . . . .display version and copyright information -p . . . pipe files from the repository to standard output M . . . . . . . modified locally or merged with the repository
-w . . . . . . . . . . make new working file read-write (default) ◦ -r tag. . . . . . . . . . . . .use the revision tag instead of head C . . . . . . . conflicting merge that needs manual resolution
-x . . . . . encrypt communication between client & server use HEAD for the latest version available a backup copy is made under .#file.version
-z n . . . use n as compression level for transferring files or BASE for the file you last checked out ? . . ignored local file which does not exist in repository
Remove History Keywords
cvs remove [-flR] files... cvs hist [-Tcoealw] [-mmodule] [opts] files... Embedded strings $keyword :...$ in text files are up-
Remove files or directories from repository. Show a report on CVS commands that you or others dated with the current keyword value from CVS when-
-f. . . . . . . . . . . . . . . . . . . .delete the file before removing it have executed on a particular file or directory in the ever you obtain a new revision.
source repository. Warning: uses options in ways con- $Author$ . . . login name of the user who last checked in
Add flicting with common meaning. $Date$ . . . . . . . . . . UTC date & time of the last check in
cvs add [-kkflag] [-m’msg’] files... -T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . report on all tags $Header$. . . . .RCS file, rev., date, author, state, locker
-c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . report on each commit $Id$ . . . . . . . . . . . . . . . . . . same as $Header$ without path
Add new files or directories to repository.
-o . . . . . . . . . . . . . . . . . . . . . report on checked-out modules $Name$ . . . . . . . . . . . . tag name used to check out the file
-kkflag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . use kflag for RCS
-e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . report on everything $Locker$ . . . login name of the user who locked the file
-m’msg’ . . . . . . . . . . . . . . . . . . . use msg as the creation log
-a . . . . . . . . . . . . . . . . . . . . . . . . . . . . report data for all users $Log$ . . . . . log message preceded by a header (append)
-l . . . . . . . . . . . . . . . . . . . . report on last modification only $RCSfile$ . . . . . . . . . . . . . . . . . . . . RCS file without a path
Differences $Revision$. . . . . . . . . . . . . . . . . . .current revision number
cvs diff [-lNR] [-rr1 [-rr2 ] | -Dd2 [-Dd1 ]] files... -w . . . . . . . . . . . . . . . . report on the current directory only
$Source$ . . . . . . . . . . . . . . . . . . . . . . RCS file full pathname
Show differences between sandbox and repository. -mmod . . . . . . . . . . . . . . . . . . . . . . . . . report on module mod
$State$ . . . . . . . . . . . . . . . . . state assigned to the revision
-Dd1 . . . . . . . . . . . . . . . . . . diff working file against date d1 -xtype . . . . . extract record type, a list of several letters:
-Dd1 -Dd2 . . . . . . . . . . . . . . . diff date d1 against date d2 O checked-out A first added Administrative files
-rr1 . . . . . . . . . . . . . . . diff working file against revision r1 W deleted during an updated T rtagged Here is a list of administrative files that CVS keeps in
-rr1 -rr2 . . . . . . . . . . diff revision r1 against revision r2 U copied from repository M modified your working directory under CVS/. Do not delete them.
G merged with success F released Entries . . . . . . . . . . . . . . . . list and status of working files
-N . . . . . . . . . . . . . . . . . . . . . . . . include added/removed files
C merged with conflict R removed Entries.Static . . . . do not add more files on cvs upd
-bstr . . . . . . . . . . . . up to module/file/path matching str Root . . . . . . . . . pathname used if CVSROOT is not defined
Log
-Ddate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . report since date Repository. . . . . .pathname to the repository directory
cvs log [-lRhtNb] [-rr1 [;r2 ]] [-dd1 [d2 ]] [-sstates]
-prep . . . . . . . . . . . . . . . . . . . . . . . . report for repository rep Tag. . . . . . . . . . . . . . . . . . . .sticky date or tag per directory
[-wlogins] files...
-uuser . . . . . . . . . . . . . . . . . . . . . . . . . . . . report for user user Checkin.prog . . . . . . . . . . . . . . program to run on cvs ci
Show log information stored for some files.
Update.prog . . . . . . . . . . . . . . program to run on cvs upd
-R . . . . . . . . . . . . . . . . . . . . . . . . print name of RCS file only Status
-h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .print header only cvs status [-lRqQ] [-v] files... Environment variables
-t . . . . . . . . . . . . . . . . . . . print header and description only Display a brief report on the current status of files: lat- Here is a list of environment variables that CVS uses.
-N . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . do not list tags est version, version in working directory, whether the CVSROOT . . . . . . . . . . . . . . pathname to the repository root
-b . . . . . . . . . . . . . . . . . . . list default branch revisions only working version has been edited and, optionally, sym- CVSREAD . . . . if set, co and upd will make files read-only
-rrevs . . . . . . . . . . . . . . . . . . . specify set of revisions to list bolic tags in the RCS file. CVSEDITOR. . . . .program to use for commit log message
-ddates . . . . . . . . . . . . . . . . . . . . . specify set of dates to list -v . . . . . . . . . . . . . . . . . display also RCS file symbolic tags EDITOR . . . . . . . . . . . . . . . . . . . used if CVSEDITOR is not set
-sstates . . . . . . . . . . . . . . . . . . . . specify set of states to list
-wlogins . . .list only revisions checked in by users logins Tags
cvs tag [-lRqQ] [-Fbd] [[-rtag | -Ddate] [-f]] tag files...
Import Specify a symbolic tag for files in the repository. By de-
cvs import [-d] [-bbranch] [-Ifile...] rep vendor release fault tag the revision that were last synchronized with
Incorporate a new hierarchy of sources under CVS. your working directory. Applied immediately to the
rep . . . . . . . . . . . . . . . .directory path, eventually creates it repository.
vendor . . . . . . . . . . . . . . . . . . tag used for the entire branch -r -D . . . . . . . . . . used to rename an already-existing tag This card may be freely distributed under the terms of the GNU
release . . . . . . . . . . . . . . . . . tag used for the imported files -f . . . . . . . . . . . . . . . . . . . used with -r & -D, force the tag general public licence — Copyright c  by Laurent Grégoire
-d . . . . use file’s last modification time for check-in time -F . . . . . . . . . . . . . . . . . . . . move the tag if it already exists hlaurent.gregoire@icam.fri — v0.2 — The author assumes no
-bbranch . . . . specify a branch branch other than 1.1.1 -b . . . . . . . . . . . . . . . . . . . . . . apply the tag as a new branch responsability for any errors on this card. The latest version can
-Iname . . . . . . . . . . . . . . . . . . . ignore file name for import -d . . . . . . . . . . . . . . . . . . delete the tag instead of adding it be found at http://tnerual.eriogerg.free.fr/

Potrebbero piacerti anche