-->

Previous | Table of Contents | Next

Page 97

own copies of the sources); update them to include new changes applied by others to the source repository; or commit your work as a permanent change to the RCS repository.

Note that checkout is used to create directories. The top-level directory created is always added to the directory where checkout is invoked, and usually has the same name as the specified module. In the case of a module alias, the created subdirectory may have a different name, but you can be sure that it will be a subdirectory, and that checkout will show the relative path leading to each file as it is extracted into your private work area (unless you specify the _Q global option).

Running cvs checkout on a directory that was already built by a prior checkout is also permitted, and has the same effect as specifying the _d option to the update command described later.

The options permitted with cvs checkout include the standard command options _P, _f, _k kflag, _l, _n, _p, -r tag, and _D date. In addition to those, you can use several special command options with checkout, as detailed in the following paragraphs.

Use the _A option to reset any sticky tags, dates, or _k options. (If you get a working file 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 (for example, 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.

In addition, each -j option can contain on optional date 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. An example might be what cvs import tells you to do when you have just imported sources that have conflicts with local changes:


example% cvs checkout -jTAG:yesterday -jTAG module

Use the _N option with _d dir to avoid shortening module paths in your working directory. (Normally, cvs shortens paths as much as possible when you specify an explicit target directory.)

Use the _c option to copy the module file, sorted, to the standard output, instead of creating or modifying any files or directories in your working directory.

Use the _d dir option to create a directory called dir for the working files, instead of using the module name. Unless you also use _N, the paths created under dir will be as short as possible.

Use the _s option to display per-module status information stored with the _s option within the modules file.


commit [_lnR][_m `log_message' | _f file][-r

revision][files...]

Requires: Working directory, repository
Changes: Repository
Synonym: ci

Use cvs commit when you want to incorporate changes from your working source files into the general source repository.

If you don't specify particular files to commit, all of the files in your working current directory are examined. commit is careful to change in the repository only those files that you have really changed. By default (or if you explicitly specify the -r option), files in subdirectories are also examined and committed if they have changed; you can use the _l option to limit commit to the current directory only. Sometimes you may want to force a file to be committed even though it is unchanged; this is achieved with the _f flag, which also has the effect of disabling recursion (you can turn it back on with _R, of course).

commit verifies that the selected files are up-to-date with the current revisions in the source repository; it will notify you, and exit without committing, if any of the specified files must be made current first with cvs update. commit does not call the update command for you, but rather leaves that for you to do when the time is right.

When all is well, an editor is invoked to allow you to enter a log message that will be written to one or more logging programs and placed in the RCS source repository file. You can instead specify the log message on the command line with

Previous | Table of Contents | Next