update [ AdflPpQqR] [ d] [ r tag| D date] files...

Requires: repository, working directory

Changes: working directory

After you've run checkout to create your private copy of source from the common repository, other developers will continue changing the central source. From time to time, when it is convenient in your development process, you can use the update command from within your working directory to reconcile your work with any revisions applied to the source repository since your last checkout or update.

update keeps you informed of its progress by printing a line for each file, prefaced with one of the characters 'U A R M C ?' to indicate the status of the file:

U file The file was brought up to date with respect to the repository. This is done for any file that exists in the repository but not in your source, and for files that you haven't changed but are not the most recent versions available in the repository.

A file The file has been added to your private copy of the sources, and will be added to the RCS source repository when you run 'cvs commit' on the file. This is a reminder to you that the file needs to be committed.

R file The file has been removed from your private copy of the sources, and will be removed from the RCS source repository when you run 'cvs commit' on the file. This is a reminder to you that the file needs to be committed.

M file The file is modified in your working directory. 'M' can indicate one of two states for a file you're working on: either there were no modifications to the same file in the repository, so that your file remains as you last saw it; or there were modifications in the repository as well as in your copy, but they were merged successfully, without conflict, in your working directory.

C file A conflict was detected while trying to merge your changes to file with changes from the source repository. file (the copy in your working directory) is now the output of the rcsmerge(1) command on the two versions; an unmodified copy of your file is also in your working directory, with the name '.#file.version', where version is the RCS revision that your modified file started from. (Note that some systems automatically purge files that begin with '.#' if they have not been accessed for a few days. If you intend to keep a copy of your original file, it is a very good idea to rename it.)

? file file is in your working directory, but does not correspond to anything in the source repository, and is not in the list of files for cvs to ignore (see the description of the -I option).

Use the -A option to reset any sticky tags, dates, or k options. (If you get a working copy of a file by using one of the -r, -D, or -k options, cvs remembers the corresponding tag, date, or kflag and continues using it on future updates; use the -A option to make cvs forget these specifications, and retrieve the "head" version of the file).

The -j branch option merges the changes made between the resulting revision and the revision that it is based on (e.g., if the tag refers to a branch, cvs will merge all changes made in that branch into your working file).

With two -j options, cvs will merge in the changes between the two respective revisions. This can be used to "remove" a certain delta from your working file. E.g., if the file foo.c is based on revision 1.6 and I want to remove the changes made between 1.3 and 1.5, I might do:

cvs update -j1.5 -j1.3 foo.c # note the order..

In addition, each -j option can contain on optionaldate specification which, when used with branches, can limit the chosen revision to one within a specific date. An optional date is specified by adding a colon (:) to the tag.

jSymbolic_Tag:Date_Specifier

Use the -d option to create any directories that exist in the repository if they're missing from the working directory. (Normally, update acts only on directories and files that were already enrolled in your working directory.) This is useful for updating directories that were created in the repository since the initial checkout; but it has an unfortunate side effect. If you deliberately avoided certain directories in the repository when you created your working directory (either through use of a module name or by listing explicitly the files and directories you wanted on the command line), then updating with -d will create those directories, which may not be what you want.

Use -IÊname to ignore files whose names match name (in your working directory) during the update. You can specify -I more than once on the command line to specify several files to ignore. By default, update ignores files whose names match any of the following:

RCSLOG RCS SCCS

CVS* cvslog.*

tags TAGS

*~ #* .#* ,*

*.old *.bak *.orig *.rej .del *

*.a *.o *.Z *.elc *.ln core

Use ' I !' to avoid ignoring any files at all.

The standard cvs command options -f, -k, -l, -P, -p, Q, -q, and -r are also available with update.