Essential CVS/Reference/Command Reference
From WikiContent
(Initial conversion from Docbook) |
(Initial conversion from Docbook) |
||
(3 intermediate revisions not shown.) | |||
Line 84: | Line 84: | ||
<dl> | <dl> | ||
<dt>''-z #'' | <dt>''-z #'' | ||
- | <dd>Compress all network traffic by using the specfied ''gzip'' compression level | + | <dd>Compress all network traffic by using the specfied ''gzip'' compression level(the ''#'' symbol represents a ''gzip'' level number). The compression levels range from ''0'' (no compression) to ''9'' (maximum compression). This option overrides settings in the''.cvsrc'' file. |
This option is available only if the client supports it. It is supported if it is listed in ''cvs --help-options''. You can compile the command-line client to support it by using the ''--enable-client'' option to the ''configure'' script. | This option is available only if the client supports it. It is supported if it is listed in ''cvs --help-options''. You can compile the command-line client to support it by using the ''--enable-client'' option to the ''configure'' script. | ||
Line 96: | Line 96: | ||
Most commands have a shortened nickname that you can type instead of the longer command name. These are called ''command synonyms'' in CVS jargon. | Most commands have a shortened nickname that you can type instead of the longer command name. These are called ''command synonyms'' in CVS jargon. | ||
- | === | + | ===''add''=== |
- | '''' | + | Synonyms: ''ad'', ''new'' |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] add [-k ''mode''] [-m ''message''] ''files'' | cvs [''cvs-options''] add [-k ''mode''] [-m ''message''] ''files'' | ||
Line 117: | Line 107: | ||
Adds 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. Remember, you must commit any added files in order for the addition to fully take effect. | Adds 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. Remember, you must commit any added files in order for the addition to fully take effect. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Line 147: | Line 119: | ||
: Use the specified''message'' as the description of the newly added file. The description is shown in ''cvs log'' output. | : Use the specified''message'' as the description of the newly added file. The description is shown in ''cvs log'' output. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$ '''cvs add Design.rtf ''' | bash-2.05a$ '''cvs add Design.rtf ''' | ||
Line 157: | Line 125: | ||
cvs server: use 'cvs commit' to add this file permanently | cvs server: use 'cvs commit' to add this file permanently | ||
- | === | + | ===''admin''=== |
- | + | ||
- | + | ||
- | + | Synonyms: ''adm'', ''rcs'' | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] admin [-iILqU] [-a''usernames''] [-A''filename''] [-b[''revision''<nowiki>]] | cvs [''cvs-options''] admin [-iILqU] [-a''usernames''] [-A''filename''] [-b[''revision''<nowiki>]] | ||
Line 178: | Line 138: | ||
Use RCS commands on the repository copy of project files. | Use RCS commands on the repository copy of project files. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Line 603: | Line 279: | ||
: Specify the ''suffix'' for the RCS file. This option is not used or available in CVS (all CVS files use '',v'' as the suffix). | : Specify the ''suffix'' for the RCS file. This option is not used or available in CVS (all CVS files use '',v'' as the suffix). | ||
- | + | ====Description==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
The ''cvs admin'' command 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. This command and the useful options are explained in [[Essential CVS/CVS Administration/Remote Repositories|Chapter 8]]. | The ''cvs admin'' command 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. This command and the useful options are explained in [[Essential CVS/CVS Administration/Remote Repositories|Chapter 8]]. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$ '''cvs admin -kb AcceptanceTest.doc ''' | bash-2.05a$ '''cvs admin -kb AcceptanceTest.doc ''' | ||
Line 625: | Line 289: | ||
done | done | ||
- | === | + | ===''annotate''=== |
- | '' | + | Synonym: ''ann'' |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] annotate [-fFlR] [-D ''date''] [-r ''revision''] [''files''...] | cvs [''cvs-options''] annotate [-fFlR] [-D ''date''] [-r ''revision''] [''files''...] | ||
Line 649: | Line 301: | ||
See also ''rannotate''. | See also ''rannotate''. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
;''-D date'' | ;''-D date'' | ||
Line 710: | Line 316: | ||
: Run ''annotate'' on the files in the local directory and all subdirectories and recurse down the subdirectories. This option is the default. | : Run ''annotate'' on the files in the local directory and all subdirectories and recurse down the subdirectories. This option is the default. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$ '''cvs annotate Makefile''' | bash-2.05a$ '''cvs annotate Makefile''' | ||
Line 732: | Line 326: | ||
1.2 (jenn 01-Sep-02): # Created by J Vesperman, 1 September 2002 | 1.2 (jenn 01-Sep-02): # Created by J Vesperman, 1 September 2002 | ||
- | === | + | ===''checkout''=== |
- | + | ||
- | + | ||
- | + | Synonyms: ''co'', ''get'' | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] checkout [-AcflnNpPrs] [-d ''directory-name''] [-D ''date''] | cvs [''cvs-options''] checkout [-AcflnNpPrs] [-d ''directory-name''] [-D ''date''] | ||
Line 751: | Line 339: | ||
See also ''export'' and ''update''. | See also ''export'' and ''update''. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
;''-A'' | ;''-A'' | ||
Line 933: | Line 353: | ||
'''Tip''' | '''Tip''' | ||
- | ''checkout -c'' | + | ''checkout -c''listsonly those projects that have entries in the ''modules'' file. |
</div> | </div> | ||
</dl> | </dl> | ||
Line 996: | Line 416: | ||
- | + | ====Description==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
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. | 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. | ||
Line 1,024: | Line 424: | ||
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. | 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. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$''' cvs -d cvs:/var/lib/cvs checkout wizzard''' | bash-2.05a$''' cvs -d cvs:/var/lib/cvs checkout wizzard''' | ||
Line 1,040: | Line 432: | ||
U wizzard/Makefile | U wizzard/Makefile | ||
- | === | + | ===''commit''=== |
- | '''' | + | Synonyms: ''ci'', ''com'' |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
cvs [''cvs-options''] commit [-flnR] [-m ''message'' | -F ''logfile''] [-r ''revision''] [''files''...] | cvs [''cvs-options''] commit [-flnR] [-m ''message'' | -F ''logfile''] [-r ''revision''] [''files''...] | ||
Line 1,052: | Line 442: | ||
Commits changes in a sandbox to the repository. | Commits changes in a sandbox to the repository. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
;''-f'' | ;''-f'' | ||
Line 1,135: | Line 475: | ||
- | + | ====Description==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
The ''cvs commit'' command uploads 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. | The ''cvs commit'' command uploads 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. | ||
Line 1,169: | Line 483: | ||
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. See [[Essential CVS/Using CVS/Basic Use of CVS|Chapter 3]] for an explanation of file conflicts. | 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. See [[Essential CVS/Using CVS/Basic Use of CVS|Chapter 3]] for an explanation of file conflicts. | ||
- | Example | + | ====Example==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
/home/jenn/cvs/wizzard$ '''cvs commit''' | /home/jenn/cvs/wizzard$ '''cvs commit''' | ||
Line 1,209: | Line 499: | ||
done | done | ||
- | === | + | ===''diff''=== |
- | + | ||
- | + | ||
- | + | Synonyms: ''di'', ''dif'' | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] diff [''format-options''] [-lR] [-D ''date''] [-D ''date2''] [-f ''file''] | cvs [''cvs-options''] diff [''format-options''] [-lR] [-D ''date''] [-D ''date2''] [-f ''file''] | ||
Line 1,236: | Line 512: | ||
See also ''rdiff''. | See also ''rdiff''. | ||
- | Standard | + | ====Standard options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Options described in this section determine which files and revisions are compared by ''cvs diff''. These options are the same as the standard options for most CVS commands. The ''-k'' option may be used to slightly modify the data sent to ''diff''. | Options described in this section determine which files and revisions are compared by ''cvs diff''. These options are the same as the standard options for most CVS commands. The ''-k'' option may be used to slightly modify the data sent to ''diff''. | ||
Line 1,327: | Line 553: | ||
- | + | ====Format options==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
These options determine how ''cvs diff'' displays any differences it finds. They represent the ''format-options'' portion of the syntax and operate in the same way as the options to the GNU ''diff'' program. | These options determine how ''cvs diff'' displays any differences it finds. They represent the ''format-options'' portion of the syntax and operate in the same way as the options to the GNU ''diff'' program. | ||
Line 1,550: | Line 594: | ||
: Where the lines are the same, display only the line in the left column. | : Where the lines are the same, display only the line in the left column. | ||
;''-n''or''--rcs'' | ;''-n''or''--rcs'' | ||
- | : Produce a ''diff'' in RCS format rather than | + | : Produce a ''diff'' in RCS format rather than GNUformat. |
;''-N''or''--new-file'' | ;''-N''or''--new-file'' | ||
: If directories are being compared and a file is not found in one directory, treat the file as if it were there but empty. | : If directories are being compared and a file is not found in one directory, treat the file as if it were there but empty. | ||
Line 1,572: | Line 616: | ||
: Use side-by-side output format. | : Use side-by-side output format. | ||
- | + | ====Line and group format options==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | 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. | 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. | ||
Line 1,862: | Line 644: | ||
: Display the text defined by the format string for all lines. | : Display the text defined by the format string for all lines. | ||
- | The ''format-string'' for both group and line formats uses the percent | + | The ''format-string'' for both group and line formats uses the percent(<tt>%</tt> ) character as a special token, denoting a string to be evaluated by ''cvs diff''. The string <tt>%%</tt> 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'': | These are the special characters for a line ''format-string'': | ||
Line 1,914: | Line 696: | ||
: The character represented by the octal string ''O''. | : The character represented by the octal string ''O''. | ||
- | + | ====Example 1==== | |
- | + | ||
- | + | ||
- | + | ||
- | = | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | = | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
This is a simple example to show how CVS displays the difference between the current and repository revisions of the ''Makefile''. | This is a simple example to show how CVS displays the difference between the current and repository revisions of the ''Makefile''. | ||
Line 1,945: | Line 709: | ||
> rm -f lib/*.o | > rm -f lib/*.o | ||
- | + | ====Example 2==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | = | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
This example is more complicated. It shows how to use ''cvs diff''with group format strings. No revisions are specified, so CVS compares the repository and current sandbox revisions of the ''cvs_admin.html''file. The ''--old-group-format''option and the format string specified with it cause sets of lines from the older revision that are changed in the new revision to be surrounded by ''#ifdef OLD'' and ''#else''. The ''--new-group-format'' option and its format string put ''#endif'' after sets of lines from the new revision. The quotes around the format strings prevent my shell from interpreting the strings. | This example is more complicated. It shows how to use ''cvs diff''with group format strings. No revisions are specified, so CVS compares the repository and current sandbox revisions of the ''cvs_admin.html''file. The ''--old-group-format''option and the format string specified with it cause sets of lines from the older revision that are changed in the new revision to be surrounded by ''#ifdef OLD'' and ''#else''. The ''--new-group-format'' option and its format string put ''#endif'' after sets of lines from the new revision. The quotes around the format strings prevent my shell from interpreting the strings. | ||
Line 2,120: | Line 764: | ||
.</nowiki> | .</nowiki> | ||
- | === | + | ===''edit''=== |
- | + | ||
- | + | ||
- | + | Synonyms: none | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] edit [-lR] [-a ''action''...] [''files''...] | cvs [''cvs-options''] edit [-lR] [-a ''action''...] [''files''...] | ||
Line 2,138: | Line 776: | ||
See also ''editors'', ''unedit'', ''watch'', and ''watchers.'' | See also ''editors'', ''unedit'', ''watch'', and ''watchers.'' | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Line 2,232: | Line 812: | ||
- | + | ====Description==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
The ''cvs edit'' 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. | The ''cvs edit'' 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. | ||
Line 2,268: | Line 826: | ||
CVS uses any script in the ''notify'' file in the repository's ''CVSROOT'' directory to notify the user of changes. | CVS uses any script in the ''notify'' file in the repository's ''CVSROOT'' directory to notify the user of changes. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
bash-2.05a$ '''cvs edit Makefile''' | bash-2.05a$ '''cvs edit Makefile''' | ||
bash-2.05a$ | bash-2.05a$ | ||
- | === | + | ===''editors''=== |
- | + | Synonyms: none | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] editors [-lR] [''files''...] | cvs [''cvs-options''] editors [-lR] [''files''...] | ||
Line 2,303: | Line 843: | ||
See also ''edit'', ''unedit'', ''watch'', and ''watchers''. | See also ''edit'', ''unedit'', ''watch'', and ''watchers''. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Line 2,335: | Line 861: | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
bash-2.05a$ '''cvs editors Makefile''' | bash-2.05a$ '''cvs editors Makefile''' | ||
Makefile jenn Sat Oct 26 01:51:02 2002 GMT helit /home/jenn/cvs/wizzard | Makefile jenn Sat Oct 26 01:51:02 2002 GMT helit /home/jenn/cvs/wizzard | ||
- | === | + | ===''export''=== |
- | '''' | + | Synonyms: ''exp'', ''ex'' |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] export [-flnNR] [-r ''revision''] [-d ''directory''-''name''] [-D ''date''] | cvs [''cvs-options''] export [-flnNR] [-r ''revision''] [-d ''directory''-''name''] [-D ''date''] | ||
Line 2,366: | Line 880: | ||
See also ''checkout'' and ''update''. | See also ''checkout'' and ''update''. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Line 2,498: | Line 922: | ||
- | + | ====Description==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
The ''cvs export'' command creates the directories and files that belong to a project as of a specific tagged release, revision number, or date. 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. | The ''cvs export'' command creates the directories and files that belong to a project as of a specific tagged release, revision number, or date. 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. | ||
Line 2,538: | Line 936: | ||
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. | 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. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$ '''cvs -d cvs:/var/lib/cvs export -D now wizzard''' | bash-2.05a$ '''cvs -d cvs:/var/lib/cvs export -D now wizzard''' | ||
Line 2,554: | Line 944: | ||
U wizzard/Makefile | U wizzard/Makefile | ||
- | === | + | ===''history''=== |
- | + | ||
- | + | ||
- | + | Synonyms: ''hi'', ''his'' | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] history [-aceloTw] [-b ''string''] [-D ''date''] [-f ''file''] [-m ''module''] | cvs [''cvs-options''] history [-aceloTw] [-b ''string''] [-D ''date''] [-f ''file''] [-m ''module''] | ||
Line 2,600: | Line 962: | ||
</div> | </div> | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
;''-a'' | ;''-a'' | ||
Line 2,841: | Line 1,025: | ||
: 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 [[Essential CVS/Reference/Miscellaneous Topics Reference|Chapter 11]]. | : 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 [[Essential CVS/Reference/Miscellaneous Topics Reference|Chapter 11]]. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$ '''cvs history''' | bash-2.05a$ '''cvs history''' | ||
Line 2,857: | Line 1,033: | ||
O 2002-10-25 08:58 +0000 jenn wizzard =wizzard= <remote>/* | O 2002-10-25 08:58 +0000 jenn wizzard =wizzard= <remote>/* | ||
- | === | + | ===''import''=== |
- | '''' | + | Synonyms: ''im'', ''imp'' |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] import [-b ''branch''] [-d] [-I ''ignore''] [-k ''mode''] [-m ''message''] | cvs [''cvs-options''] import [-b ''branch''] [-d] [-I ''ignore''] [-k ''mode''] [-m ''message''] | ||
Line 2,877: | Line 1,045: | ||
Creates a new project in the repository or manages ''vendor branches''. | Creates a new project in the repository or manages ''vendor branches''. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Line 2,966: | Line 1,070: | ||
: Modify the import based on elements of each filename. Wrappers are explained in [[Essential CVS/Using CVS/Basic Use of CVS|Chapter 3]]. | : Modify the import based on elements of each filename. Wrappers are explained in [[Essential CVS/Using CVS/Basic Use of CVS|Chapter 3]]. | ||
- | + | ====Description==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
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. | 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. | ||
Line 3,026: | Line 1,082: | ||
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. | 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 | + | A vendor branchis 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. See [[Essential CVS/CVS Administration/Project Management|Chapter 7]] for a full explanation of vendor branches. | 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. See [[Essential CVS/CVS Administration/Project Management|Chapter 7]] for a full explanation of vendor branches. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$ '''cvs -d cvs:/var/lib/cvs import wizzard wizproject ver_0-1''' | bash-2.05a$ '''cvs -d cvs:/var/lib/cvs import wizzard wizproject ver_0-1''' | ||
Line 3,049: | Line 1,095: | ||
No conflicts created by this import | No conflicts created by this import | ||
- | === | + | ===''init''=== |
- | + | Synonyms: none | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] init | cvs [''cvs-options''] init | ||
Line 3,069: | Line 1,107: | ||
CVS creates the final directory in the path if it does not already exist. Previous directories in the path must exist. | CVS creates the final directory in the path if it does not already exist. Previous directories in the path must exist. | ||
- | Example | + | ====Example==== |
- | + | ||
- | + | ||
$ '''cvs -d /var/lib/cvsroot init''' | $ '''cvs -d /var/lib/cvsroot init''' | ||
- | === | + | ===''kserver''=== |
- | + | ||
- | + | ||
- | + | Synonyms: none | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] kserver | cvs [''cvs-options''] kserver | ||
Line 3,094: | Line 1,124: | ||
See also ''pserver''. | See also ''pserver''. | ||
- | Example | + | ====Example==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
#inetd.conf | #inetd.conf | ||
Line 3,104: | Line 1,130: | ||
1999 stream tcp nowait root /usr/bin/cvs cvs -f --allow-root=/var/lib/cvsroot kserver | 1999 stream tcp nowait root /usr/bin/cvs cvs -f --allow-root=/var/lib/cvsroot kserver | ||
- | === | + | ===''log''=== |
- | '' | + | Synonym: ''lo'' |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] log [-bhlNRSt] [-d ''dates''] [-r[''revisions''<nowiki>]] [-s </nowiki>''states''] | cvs [''cvs-options''] log [-bhlNRSt] [-d ''dates''] [-r[''revisions''<nowiki>]] [-s </nowiki>''states''] | ||
Line 3,131: | Line 1,143: | ||
With no options, ''cvs log'' displays all the information it has available. See also ''rlog''. | With no options, ''cvs log'' displays all the information it has available. See also ''rlog''. | ||
- | + | ====Command options==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
;''-b'' | ;''-b'' | ||
Line 3,336: | Line 1,204: | ||
: 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. | : 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. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$ '''cvs log''' | bash-2.05a$ '''cvs log''' | ||
Line 3,406: | Line 1,230: | ||
. | . | ||
- | === | + | ===''login''=== |
- | + | Synonyms: none | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] login | cvs [''cvs-options''] login | ||
Line 3,424: | Line 1,242: | ||
See also ''logout'' | See also ''logout'' | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
bash-2.05a$ '''cvs -d :pserver:jenn:password:@cvs.nosuch.net:/var/lib/cvs login''' | bash-2.05a$ '''cvs -d :pserver:jenn:password:@cvs.nosuch.net:/var/lib/cvs login''' | ||
Logging in to :pserver:jenn@cvs:2401/var/lib/cvs | Logging in to :pserver:jenn@cvs:2401/var/lib/cvs | ||
- | === | + | ===''logout''=== |
- | + | ||
- | + | ||
- | + | Synonyms: none | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] logout | cvs [''cvs-options''] logout | ||
Line 3,453: | Line 1,259: | ||
See also ''login''. | See also ''login''. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
bash-2.05a$ '''cvs -d :pserver:jenn@cvs:/var/lib/cvs logout''' | bash-2.05a$ '''cvs -d :pserver:jenn@cvs:/var/lib/cvs logout''' | ||
Logging out of :pserver:jenn@cvs:2401/var/lib/cvs | Logging out of :pserver:jenn@cvs:2401/var/lib/cvs | ||
- | === | + | ===''pserver''=== |
- | + | Synonyms: none | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] pserver | cvs [''cvs-options''] pserver | ||
Line 3,478: | Line 1,276: | ||
See also ''kserver''. | See also ''kserver''. | ||
- | Example | + | ====Example==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
#inetd.conf | #inetd.conf | ||
Line 3,488: | Line 1,282: | ||
2401 stream tcp nowait root /usr/bin/cvs cvs -f --allow-root=/var/lib/cvsroot pserver | 2401 stream tcp nowait root /usr/bin/cvs cvs -f --allow-root=/var/lib/cvsroot pserver | ||
- | === | + | ===''rannotate''=== |
- | + | ||
- | + | ||
- | + | Synonyms: ''ra'', ''rann'' | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] rannotate [-fFlR] [-D ''date''] [-r ''revision''] ''files''... | cvs [''cvs-options''] rannotate [-fFlR] [-D ''date''] [-r ''revision''] ''files''... | ||
Line 3,512: | Line 1,294: | ||
See also ''annotate''. | See also ''annotate''. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
;''-D date'' | ;''-D date'' | ||
Line 3,571: | Line 1,309: | ||
: Run ''rannotate'' on files in the local directory and all subdirectories and recurse down the subdirectories. This option is the default. | : Run ''rannotate'' on files in the local directory and all subdirectories and recurse down the subdirectories. This option is the default. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$''' cvs rannotate wizzard/Makefile''' | bash-2.05a$''' cvs rannotate wizzard/Makefile''' | ||
Line 3,593: | Line 1,319: | ||
1.2 (jenn 01-Sep-02): # Created by J Vesperman, 1 September 2002 | 1.2 (jenn 01-Sep-02): # Created by J Vesperman, 1 September 2002 | ||
- | === | + | ===''rdiff''=== |
- | '''' | + | Synonyms: ''pa'', ''patch'' |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] rdiff [-flR] [-c|-u] [-s|-t] {-r ''revision''|-D ''date''} | cvs [''cvs-options''] rdiff [-flR] [-c|-u] [-s|-t] {-r ''revision''|-D ''date''} | ||
Line 3,646: | Line 1,338: | ||
</div> | </div> | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
;''-c'' | ;''-c'' | ||
Line 3,743: | Line 1,371: | ||
: This option is now obsolete, but it used to allow you to expand keywords according to the rules of the specified RCS ''version''. | : This option is now obsolete, but it used to allow you to expand keywords according to the rules of the specified RCS ''version''. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$ '''cvs rdiff -r 1.5 wizzard/Makefile''' | bash-2.05a$ '''cvs rdiff -r 1.5 wizzard/Makefile''' | ||
Line 3,876: | Line 1,418: | ||
. | . | ||
- | === | + | ===''release''=== |
- | '''' | + | Synonyms: ''re'', ''rel'' |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] release [-d] ''directories''... | cvs [''cvs-options''] release [-d] ''directories''... | ||
Line 3,896: | Line 1,428: | ||
Makes 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. | Makes 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. | ||
- | Command option | + | ====Command option==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
;''-d'' | ;''-d'' | ||
: Delete the sandbox after it has been released. | : Delete the sandbox after it has been released. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$''' cvs -d cvs:/var/lib/cvs release wizzard''' | bash-2.05a$''' cvs -d cvs:/var/lib/cvs release wizzard''' | ||
Line 3,918: | Line 1,440: | ||
- | === | + | ===''remove''=== |
- | + | ||
- | + | ||
- | + | Synonyms: ''rm'', ''delete'' | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] remove [-flR] [''files''...] | cvs [''cvs-options''] remove [-flR] [''files''...] | ||
Line 3,934: | Line 1,450: | ||
The ''remove'' command removes a file or directory from the repository. It can also be used to undo an uncommitted file addition. | The ''remove'' command removes a file or directory from the repository. It can also be used to undo an uncommitted file addition. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
;''-f'' | ;''-f'' | ||
Line 3,972: | Line 1,470: | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$ '''cvs remove server.cc''' | bash-2.05a$ '''cvs remove server.cc''' | ||
Line 3,982: | Line 1,476: | ||
cvs server: use 'cvs commit' to remove this file permanently | cvs server: use 'cvs commit' to remove this file permanently | ||
- | === | + | ===''rlog''=== |
- | + | ||
- | + | ||
- | + | Synonym: ''rl'' | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] rlog [-bhlNRSt] [-d ''dates''] [-r[''revisions''<nowiki>]] [-s </nowiki>''states''] | cvs [''cvs-options''] rlog [-bhlNRSt] [-d ''dates''] [-r[''revisions''<nowiki>]] [-s </nowiki>''states''] | ||
Line 4,005: | Line 1,489: | ||
See also ''log''. | See also ''log''. | ||
- | + | ====Command options==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
;''-b'' | ;''-b'' | ||
Line 4,210: | Line 1,550: | ||
: 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. | : 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. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$ '''cvs -d cvs:/var/lib/cvs rlog wizzard''' | bash-2.05a$ '''cvs -d cvs:/var/lib/cvs rlog wizzard''' | ||
Line 4,265: | Line 1,571: | ||
. | . | ||
- | === | + | ===''rtag''=== |
- | '''' | + | Synonyms: ''rt'', ''rfreeze'' |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] rtag [-abBdfFlnR] {-D ''date''|-r ''revision''} ''tagname'' | cvs [''cvs-options''] rtag [-abBdfFlnR] {-D ''date''|-r ''revision''} ''tagname'' | ||
Line 4,286: | Line 1,584: | ||
See also ''tag''. | See also ''tag''. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
;''-a'' | ;''-a'' | ||
Line 4,402: | Line 1,620: | ||
- | + | ====Description==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | Use ''rtag'' to mark a revision of a single file with a meaningful name or to 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 (''_''), | + | Use ''rtag'' to mark a revision of a single file with a meaningful name or to 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. |
The ''tag'' and ''rtag'' commands are also used to create branches. Branches and tags are explained in [[Essential CVS/Using CVS/Tagging and Branching|Chapter 4]]. | The ''tag'' and ''rtag'' commands are also used to create branches. Branches and tags are explained in [[Essential CVS/Using CVS/Tagging and Branching|Chapter 4]]. | ||
Line 4,434: | Line 1,628: | ||
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. | 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. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$''' cvs -d cvs:/var/lib/cvs rtag -D now alpha_1-6 wizzard''' | bash-2.05a$''' cvs -d cvs:/var/lib/cvs rtag -D now alpha_1-6 wizzard''' | ||
Line 4,459: | Line 1,639: | ||
. | . | ||
- | === | + | ===''server''=== |
- | + | Synonyms: none | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
The ''server'' command is used internally by CVS; the client is invoked by the CVS client when the client connects to the repository computer via the ''ext'' or ''server'' access methods. | The ''server'' command is used internally by CVS; the client is invoked by the CVS client when the client connects to the repository computer via the ''ext'' or ''server'' access methods. | ||
Line 4,487: | Line 1,651: | ||
- | === | + | ===''status''=== |
- | + | ||
- | + | ||
- | + | Synonyms: ''st'', ''stat'' | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] status [-vlR] [''files''...] | cvs [''cvs-options''] status [-vlR] [''files''...] | ||
Line 4,507: | Line 1,661: | ||
Displays 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. | Displays 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. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Line 4,544: | Line 1,680: | ||
: Include information about tags. | : Include information about tags. | ||
- | + | ====Example==== | |
- | = | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$ '''cvs status Makefile''' | bash-2.05a$ '''cvs status Makefile''' | ||
Line 4,572: | Line 1,692: | ||
Sticky Options: (none) | Sticky Options: (none) | ||
- | === | + | ===''tag''=== |
- | + | ||
- | + | ||
- | + | Synonyms: ''ta'', ''freeze'' | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] tag [-bcdfFlR] [-D ''date''|-r ''revision''] ''tagname'' [''files''...] | cvs [''cvs-options''] tag [-bcdfFlR] [-D ''date''|-r ''revision''] ''tagname'' [''files''...] | ||
Line 4,590: | Line 1,704: | ||
See also ''rtag''. | See also ''rtag''. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
;''-b'' | ;''-b'' | ||
Line 4,694: | Line 1,736: | ||
- | + | ====Description==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Use the ''tag'' command to mark a revision of a single file with a meaningful name or to 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. | Use the ''tag'' command to mark a revision of a single file with a meaningful name or to 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. | ||
Line 4,730: | Line 1,744: | ||
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 commited revision). This revision can be seen as the ''working revision'' in the ''cvs status'' command. | 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 commited revision). This revision can be seen as the ''working revision'' in the ''cvs status'' command. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$ '''cvs tag alpha_1-5''' | bash-2.05a$ '''cvs tag alpha_1-5''' | ||
Line 4,761: | Line 1,757: | ||
. | . | ||
- | === | + | ===''unedit''=== |
- | + | ||
- | + | ||
- | + | Synonyms: none | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] unedit [-lR] [''files''...] | cvs [''cvs-options''] unedit [-lR] [''files''...] | ||
Line 4,781: | Line 1,769: | ||
See also ''edit'', ''editors'', ''watch'', and ''watchers''. | See also ''edit'', ''editors'', ''watch'', and ''watchers''. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Line 4,813: | Line 1,787: | ||
- | + | ====Description==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
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 ''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. | 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 ''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. | ||
Line 4,845: | Line 1,795: | ||
The script in the ''notify'' file in the repository's ''CVSROOT'' directory is used to notify the user of changes. | The script in the ''notify'' file in the repository's ''CVSROOT'' directory is used to notify the user of changes. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
bash-2.05a$ '''cvs unedit Makefile''' | bash-2.05a$ '''cvs unedit Makefile''' | ||
bash-2.05a$ | bash-2.05a$ | ||
- | === | + | ===''update''=== |
- | '''' | + | Synonyms: ''up'', ''upd'' |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] update [-ACdflpPR] [-D ''date''] [-I ''ignore''] [-j ''revision'' [:''date''<nowiki>]] | cvs [''cvs-options''] update [-ACdflpPR] [-D ''date''] [-I ''ignore''] [-j ''revision'' [:''date''<nowiki>]] | ||
Line 4,871: | Line 1,813: | ||
See also ''checkout'' and ''export''. | See also ''checkout'' and ''export''. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
;''-A'' | ;''-A'' | ||
Line 5,058: | Line 1,866: | ||
: Modify the ''update'' based on elements of each filename. Wrappers are explained in [[Essential CVS/Using CVS/Basic Use of CVS|Chapter 3]]. | : Modify the ''update'' based on elements of each filename. Wrappers are explained in [[Essential CVS/Using CVS/Basic Use of CVS|Chapter 3]]. | ||
- | + | ====Description==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
The ''cvs update'' command brings changes from the repository to an existing sandbox. While doing this, ''update'' merges changes from the repository into changed files in the sandbox. | The ''cvs update'' command brings changes from the repository to an existing sandbox. While doing this, ''update'' merges changes from the repository into changed files in the sandbox. | ||
Line 5,078: | Line 1,874: | ||
If ''update'' is not given any filenames or directory names as parameters, it acts on the current sandbox. | If ''update'' is not given any filenames or directory names as parameters, it acts on the current sandbox. | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$''' cvs update''' | bash-2.05a$''' cvs update''' | ||
Line 5,094: | Line 1,882: | ||
U wizzard/Makefile | U wizzard/Makefile | ||
- | === | + | ===''version''=== |
- | '''' | + | Synonyms: ''ve'', ''ver'' |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
cvs [''cvs-options''] version | cvs [''cvs-options''] version | ||
Line 5,106: | Line 1,892: | ||
Displays the version information for the current installation of CVS. | Displays the version information for the current installation of CVS. | ||
- | Example | + | ====Example==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
$ '''cvs version''' | $ '''cvs version''' | ||
Line 5,116: | Line 1,898: | ||
Server: Concurrent Versions System (CVS) 1.11.2 (client/server) | Server: Concurrent Versions System (CVS) 1.11.2 (client/server) | ||
- | === | + | ===''watch''=== |
- | + | Synonyms: none | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] watch {on|off|add|remove} [-lR] [-a ''action''] [''files''...] | cvs [''cvs-options''] watch {on|off|add|remove} [-lR] [-a ''action''] [''files''...] | ||
Line 5,148: | Line 1,916: | ||
See also ''edit'', ''editors'', ''unedit'', and ''watchers''. | See also ''edit'', ''editors'', ''unedit'', and ''watchers''. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Line 5,288: | Line 1,968: | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$ '''cvs watch on Makefile''' | bash-2.05a$ '''cvs watch on Makefile''' | ||
Line 5,298: | Line 1,974: | ||
- | === | + | ===''watchers''=== |
- | + | ||
- | + | ||
- | + | Synonyms: none | |
- | + | ====Synopsis==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
cvs [''cvs-options''] watchers [-lR] [''files''...] | cvs [''cvs-options''] watchers [-lR] [''files''...] | ||
Line 5,318: | Line 1,986: | ||
See also ''edit'', ''editors'', ''unedit'', and ''watch''. | See also ''edit'', ''editors'', ''unedit'', and ''watch''. | ||
- | Command options | + | ====Command options==== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Line 5,350: | Line 2,004: | ||
- | + | ====Example==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
bash-2.05a$''' cvs watchers Makefile''' | bash-2.05a$''' cvs watchers Makefile''' | ||
Makefile doppel edit unedit commit | Makefile doppel edit unedit commit | ||
jenn edit unedit commit | jenn edit unedit commit |
Current revision
Essential CVS |
---|
This chapter is a comprehensive reference of all CVS commands, with a brief summary of what each does. It is intended to be useful as a quick reference, not a tutorial.
If you have never used CVS before, I suggest you read Chapter 2 or Chapter 3 before reading this reference. Those chapters explain the basic concepts of CVS and how to use it effectively.
CVS Command-Line Options
CVS supports a number of command-line options that you can use to control various aspects of CVS behavior. Command-specific options are described in Section 10.2, later in this chapter. This section focuses on options that you pass to the cvs executable itself, not to any specific CVS command.
The syntax of any CVS command is as follows:
cvs [cvs-options] [command] [command-options-and-arguments]
The cvs-options modify the behavior of the main CVS code, rather than the code for a specific command. The following options are valid:
- -a
- Authenticate all network traffic. Without this option, the initial connection for the command is authenticated, but later traffic along the same data stream is assumed to be from the same source.
This option is available only with GSS-API connections, but if you use ssh as your rsh replacement in the ext connection mode, ssh authenticates the data stream.
This option is supported if it is listed in cvs --help-options. The command-line client can be compiled to support it by using the --enable-client option to the configure script.
- --allow-root=directory
- Used as part of the inetd command string for server, kserver, and pserver connection methods. The directory is the repository root directory that the server allows connections to. Using --allow-root more than once in a command allows users to connect to any of the specified repositories.
- -b=directory
- Exists for backward compatibility with old versions of CVS and does nothing in current versions. It used to specify the directory for the RCS executables.
- -d repository_path
- Use repository_path as the path to the repository root directory. This option overrides both the CVSROOT environment variable and the contents of the Root file in the sandbox's CVS subdirectory. It also overrides the contents of the.cvsrc file.
The syntax for the repository path is :
[:method:][[[user][:password]@]hostname[:[port]]]/path
Chapter 9 contains a full explanation of each element of the repository path. Chapter 2 and Chapter 3 contain simpler explanations of repository paths.
- -e editor
- Use the specified editor when CVS calls an editor for log information during the commit or import process. This option overrides the EDITOR, CVSEDITOR, and VISUAL environment variables and the contents of the .cvsrc file.
- -f
- Prevent CVS from reading the ~/.cvsrc file and using the options in it.
- --help or -H
- If called as cvs -H or cvs --help, CVS displays a general CVS help message.
If called as cvs -H command or cvs --help command, CVS displays the available options and help information for the specified command.
- --help-commands
- List the available CVS commands with brief descriptions of their purposes.
- --help-options
- List the available cvs-options with brief descriptions of their purposes.
- --help-synonyms
- List the valid synonyms (short names) for the CVS commands.
- -l
- Do not log the current command to the history file in the repository's CVSROOT directory. The command will not show in subsequent cvs history output.
- -n
- Execute only commands that do not change the repository. Using this option with cvs update can provide a status report on the current sandbox.
- -q
- Run in quiet mode. This option causes CVS to display only some of the informational messages.
- -Q
- Run in very quiet mode. This option causes CVS to display only the most critical information.
- -r
- Set files checked out to the sandbox as read-only. This option only sets newly checked-out files. If a file is being watched with cvs watch, read-only is the default. This option overrides settings in the.cvsrc file.
- -s variable=value
- Set a user variable for use with one of the scripting files in CVSROOT. The user variables are explained in Section 11.3 in Chapter 11 and in Chapter 6 and Chapter 7.
- -t
- Display messages that trace the execution of the command. This option can be used with -nto determine precisely what a command does.
- -T directory
- Use the named directory to store temporary files. This option overrides environment variables or settings in the.cvsrc file.
- --version or -v
- Display CVS version and copyright information.
- -w
- Set files checked out to the sandbox as readable and writable. This option only sets the permissions of newly checked-out files and overrides the CVSREAD environment variable. This option overrides settings in the.cvsrc file.
- -x
- Encrypt all data that travels across the network between the client and the server. This option is currently available in GSS-API or Kerberos mode only, but if you use ssh as your rsh replacement in the ext connection mode, ssh encrypts the data stream.
This option is available only if the client supports it. It is supported if it is listed in cvs --help-options. You can compile the command-line client to support it by using the --enable-client and --enable-encryption options to the configure script.
- -z #
- Compress all network traffic by using the specfied gzip compression level(the # symbol represents a gzip level number). The compression levels range from 0 (no compression) to 9 (maximum compression). This option overrides settings in the.cvsrc file.
This option is available only if the client supports it. It is supported if it is listed in cvs --help-options. You can compile the command-line client to support it by using the --enable-client option to the configure script.
CVS Commands
Most of your interaction with CVS is through the various CVS commands. Even if you use a graphical client, most of the functions the client uses call the CVS commands.
Most commands have a shortened nickname that you can type instead of the longer command name. These are called command synonyms in CVS jargon.
add
Synonyms: ad, new
Synopsis
cvs [cvs-options] add [-k mode] [-m message] files
Adds 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. Remember, you must commit any added files in order for the addition to fully take effect.
Command options
- -k mode
- Add a file or files with the designated keyword-expansion mode. This option also sets the default keyword mode for the file. If you forget to set the default keyword mode with cvs add, you can do so later with cvs admin.
The keyword-expansion modes are listed in Section 11.6 of Chapter 11.
- -m message
- Use the specifiedmessage as the description of the newly added file. The description is shown in cvs log output.
Example
bash-2.05a$ cvs add Design.rtf cvs server: scheduling file `Design.rtf' for addition cvs server: use 'cvs commit' to add this file permanently
admin
Synonyms: adm, rcs
Synopsis
cvs [cvs-options] admin [-iILqU] [-ausernames] [-Afilename] [-b[revision]] [-cstring] [-e[usernames]] [-kmode] [-l[revision]] [-mrevision:message] [-ntagname[:[revision]]] [-Ntagname[:[revision]]] [-orange] [-sstate[:revision]] [-t[filename]] [-t-string] [-u[revision]] [-VN] [-xsuffix] [files...]
Use RCS commands on the repository copy of project files.
Command 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; or, 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.
- -kmode
- Set the default keyword-expansion mode for a file.
The keyword-expansion modes are listed in Section 11.6 of Chapter 11.
- -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. Chapter 5 explains 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.
Generally, it is better to use cvs tag and cvs rtag to manipulate tags.
See also -N.
- -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.
Generally, it is better to use cvs tag and cvs rtag to manipulate tags.
See also -n.
- -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.
Warning
There is no way to undo a cvs admin -orangecommand.
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 andStatekeywords. 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 (stdin), 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[filename].
- -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. Chapter 5 explains 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).
Description
The cvs admin command 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. This command and the useful options are explained in Chapter 8.
Example
bash-2.05a$ cvs admin -kb AcceptanceTest.doc RCS file: /var/lib/cvs/wizzard/doc/design/AcceptanceTest.doc,v done
annotate
Synonym: ann
Synopsis
cvs [cvs-options] annotate [-fFlR] [-D date] [-r revision] [files...]
Displays 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.
Command options
- -D date
- Run annotate on the latest revision of a file that is as old as or older than the date or time specified by date.
- -f
- Use the latest (HEAD) revision of a file that is on the current branch or trunk if no revision matches a specified date or revision number. This option applies only if -ror -D is used.
- -F
- Show annotations for binary files.
- -l
- Run annotate on the files in the local directory only. (Do not recurse into subdirectories.)
- -r revision
- Run annotate on the specified revision or tag of a file. If this option refers to a branch, run the command on the latest (HEAD) revision of the branch.
- -R
- Run annotate on the files in the local directory and all subdirectories and recurse down the subdirectories. This option is the default.
Example
bash-2.05a$ cvs annotate Makefile Annotations for Makefile *************** 1.2 (jenn 01-Sep-02): # 1.2 (jenn 01-Sep-02): # Makefile for the Wizzard project 1.2 (jenn 01-Sep-02): # Created by J Vesperman, 1 September 2002
checkout
Synonyms: co, get
Synopsis
cvs [cvs-options] checkout [-AcflnNpPrs] [-d directory-name] [-D date] [-j revision[:date]] [-j revision2[:date2]] [-k mode] [-r revision] projects...
Creates a new sandbox in the current working directory. This command can also be used to update an existing sandbox.
See also export and update.
Command 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 modulesfile 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.
Tip
checkout -clistsonly those projects that have entries in the modules file.
- -d directory-name
- Check a sandbox out into a directory called directory-name instead of using the repository directory name or the name designated in the modules file in the repository's CVSROOT directory. This is particularly useful when creating a second sandbox for a project.
CVS usually creates the same directory structure that the repository uses. However, if the checkout parameter contains only one file or directory and the -d option is used, CVS does not create any intervening directories. Use -N to prevent CVS from shortening the path.
- -D date
- Check out the latest revision of each file in a project that is as old as or older than the date or time specified by date. This option implies the -P option and produces a sticky date on the new sandbox.
- -f
- Use the latest (HEAD) revision on the current branch or trunk if no revision matches the date or revision number. This applies only if -ror -D is used.
- -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.
- -k mode
- Check out a sandbox with the designated keyword-expansion mode. This option also sets a sticky keyword mode for the sandbox, so that later commands operate with the same keyword-expansion mode unless a -k option overrides that mode. The -k option overrides the default mode for each file.
The keyword-expansion modes are listed in Section 11.6 of Chapter 11.
- -l
- Run checkout on the local directory only. (Do not check out subdirectories.)
See also -R.
- -n
- Do not run any program listed in the modules file for this directory.
- -N
- Do not shorten the path. CVS usually creates the same directory structure that the repository uses. However, if the checkout contains only one file and the -d option is used, CVS does not create any intervening directories unless -N is also specified.
- -p
- Check out the listed files to the standard output, rather than to the filesystem.
- -P
- Do not include empty directories in the sandbox.
- -r revision
- Run checkout on the specified revision or tag. If this option refers to a branch, run the command on the latest (HEAD) revision of the branch. This option implies the -P option and produces a sticky tag on the new sandbox.
- -R
- Run checkout on the local directory and all subdirectories and recurse down the subdirectories. This option is the default.
See also -l.
- -s
- Display the contents of the modulesfile in the repository's CVSROOT directory. This option lists the modules in the current repository and their status.
See also -c.
Description
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.
Example
bash-2.05a$ cvs -d cvs:/var/lib/cvs checkout wizzard cvs server: Updating wizzard U wizzard/Changelog U wizzard/INSTALL U wizzard/Makefile
commit
Synonyms: ci, com
Synopsis
cvs [cvs-options] commit [-flnR] [-m message | -F logfile] [-r revision] [files...]
Commits changes in a sandbox to the repository.
Command options
- -f
- Force CVS to commit a file even if there have been no changes to the file. This option implies the-loption.
- -F logfile
- Read a log message from the specified logfile rather than calling an editor.
- -l
- Run commit on the files in the local directory only. (Do not recurse down subdirectories.)
See also -R.
- -m message
- Use the message when committing a file. CVS does not call the editor.
- -n
- Do not run any program listed in the modules file (in the repository's CVSROOT directory) for this directory.
- -r revision
- Commit any changes to the specified revision number. The revision number must be higher than any current revision number for the file or files.
If revision is a branch tag or a revision number on a branch, commit to the head of the branch.
- -R
- Run commit on the files in the local directory and all subdirectories and recurse down the subdirectories. This option is the default.
See also -l.
Description
The cvs commit command uploads 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. See Chapter 3 for an explanation of file conflicts.
Example
/home/jenn/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
Synonyms: di, dif
Synopsis
cvs [cvs-options] diff [format-options] [-lR] [-D date] [-D date2] [-f file] [-k mode] [-r revision] [-r revision2] [files...]
Displays 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.
Standard options
Options described in this section determine which files and revisions are compared by cvs diff. These options are the same as the standard options for most CVS commands. The -k option may be used to slightly modify the data sent to diff.
- -D date
- Display the differences between the current sandbox copy of a file and the latest revision on or before the date or time specified by date.
If two -D options are used, display the differences between the latest revision before the first date and the latest revision before the second date.
- -k mode
- Run diff with the designated keyword-expansion mode. This option overrides the default mode and any sticky modes for each file.
The keyword-expansion modes are listed in Section 11.6 of Chapter 11.
- -l
- Run diff on the files in the local directory only. (Do not recurse down subdirectories.)
See also -R.
- -r revision
- Display the differences between the current sandbox copy and the specified revision.
If two -r options are used, display the differences between the first and second specified revisions.
- -R
- Run diff on the files in the local directory and all subdirectories and recurse down the subdirectories. This option is the default.
See also -l.
Format options
These options determine how cvs diff displays any differences it finds. They represent the format-options portion of the syntax and operate in the same way as the options to the GNU diff program.
- -number
- Show number lines of context. This option is obsolete and should be replaced with either -C numberor -U number. (This option must be used with -cor -u.)
- -a or --text
- Compare files line-by-line, treating the files as text files.
- -bor--ignore-space-change
- Ignore trailing whitespace and consider all sequences of whitespace characters to be equivalent.
- -Bor--ignore-blank-lines
- Ignore changes to blank lines, such as addition or deletion.
- --binary
- Read and write data in binary mode.
- --brief
- Report only whether the files are different, not how they are different.
- -c or -C number or --context[=number]
- Use context-output format, displaying number lines of context around each change. The default is two lines.
- -dor--minimal
- Use an algorithm that is slower but tries to express the differences between the files in the fewest possible steps, sometimes creating a smaller list of changes to be made than the standard algorithm does.
- -eor--ed
- Produce the output in the form of a script that you can run with the ed text editor to convert the first revision to the second.
- -for --forward-ed
- Produce output that is similar to an ed script, but with the changes in the order in which they occur in the file. The resulting output is not a script; it is simply in a format similar to an ed script.
- -F reor--show-function-line=re
- For each set of differences, show the most recent line that matches the regular expression re.
- -Hor--speed-large-files
- Use heuristics that help make diff faster if it is reading large files with many scattered small changes.
- --horizon-lines=number
- If the files have a common header and footer, display the last number lines of the header and the first number lines of the footer.
- -ior--ignore-case
- Do not report on changes of letter case. Consider upper- and lowercase letters as identical.
- -I reor--ignore-matching-lines=re
- Do not report on changes that insert or delete lines that match the regular expression re.
- --ifdef=NAME
- Produce a merged file as output, with C preprocessor #ifdef=NAME structures around the differences.
- -L labelor--label label
- Use label instead of the filename in the diff output headers.
- --left-column
- Where the lines are the same, display only the line in the left column.
- -nor--rcs
- Produce a diff in RCS format rather than GNUformat.
- -Nor--new-file
- If directories are being compared and a file is not found in one directory, treat the file as if it were there but empty.
- -por--show-c-function
- In the output, display the name of the C function each change is in.
- -sor--report-identical-files
- Report files that are identical.
- --suppress-common-lines
- In side-by-side format, do not display lines that are the same.
- -tor--expand-tabs
- Display the output with spaces instead of tabs.
- -Tor--initial-tab
- Prepend a tab to the output to ensure that all subsequent tabs line up properly.
- -uor-U number --unified[=number]
- Use unified-output format, displaying number lines of context around each change. The default is two lines.
- -wor--ignore-all-space
- Ignore all differences in whitespace.
- -W numberor--width=number
- Produce side-by-side output that is no more than number columns wide.
- -yor--side-by-side
- Use side-by-side output format.
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-elsestructures 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 systems 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:
- --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.
- --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.
- --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.
- --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.
Following are the line format options, which affect the lines themselves:
- --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.
- --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.
- --unchanged-line-format=format-string
- Display the text defined by the format string for each line that is the same in both files.
- --line-format=format-string
- Display the text defined by the format string for all lines.
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:
- % 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 the digits specifies the minimum number of digits. The other options are d (for decimal), o (for octal), andx or X (for lower- or uppercase hexadecimal).
- %%
- 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.
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 the symbol. The hyphen (-) signals that the number should be left-justified. The width specifies the minimum field width, and the digits specifies the minimum number of digits. The other options ared (for decimal) o (for octal), and x or X (for lower- or uppercase hexadecimal).
Lowercase symbols denote the first file. Uppercase symbols denote the second file. The symbols are:
- E or e
- The line number of the line just before the group.
- F or f
- The line number of the first line in the group.
- L or l
- The line number of the last line in the group.
- M or m
- The line number of the line just after the group.
- N or 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.
Example 1
This is a simple example to show how CVS displays the difference between the current and repository revisions of the Makefile.
bash-2.05a$ 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
Example 2
This example is more complicated. It shows how to use cvs diffwith group format strings. No revisions are specified, so CVS compares the repository and current sandbox revisions of the cvs_admin.htmlfile. The --old-group-formatoption and the format string specified with it cause sets of lines from the older revision that are changed in the new revision to be surrounded by #ifdef OLD and #else. The --new-group-format option and its format string put #endif after sets of lines from the new revision. The quotes around the format strings prevent my shell from interpreting the strings.
bash-2.05a$ cvs diff \ --old-group-format="#ifdef%c'\040'OLD%c'\012'%<%c'\012'#else%c'\012'" \ --new-group-format="%>%c'\012'#endif%c'\012'" cvs_admin.html Index: cvs_admin.html = = = = = = = = = = = = = = = = = = = = = = = = = = = = = RCS file: /var/lib/cvs/oreilly/articles/cvs/cvs_admin.html,v retrieving revision 1.16 diff --old-group-format=#ifdef%c'\040'OLD%c'\012'%<%c'\012'#else%c'\012' --new-group- format=%>%c'\012'#endif%c'\012' -r1.16 cvs_admin.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>CVS Administration</title> </head> <body> <h1>CVS Administration</h1> <p> #ifdef OLD CVS - or Concurrent Versioning System - is a tool for saving the user's butt by maintaining a history of changes. It allows the retrieval of older versions of files, records who makes each change, and prevents simultaneous changes from overwriting each other. #else CVS - or Concurrent Versioning System - is a tool for protecting the user from their own mistakes, by maintaining a history of changes. It allows you to fetch older versions of files, records which person makes each change, and prevents simultaneous changes from overwriting each other. #endif </p> <p> #ifdef OLD CVS expects the files it maintains to be stored in modules - directories of related files and subdirectories. A module can be as small as a single directory containing a single file, or as large as you have disk space for. #else CVS expects the files it maintains to be stored in projects - directories of related files and subdirectories. A project can be as small as a single directory containing a single file, or as large as you have disk space for. #endif </p> . . .
edit
Synonyms: none
Synopsis
cvs [cvs-options] edit [-lR] [-a action...] [files...]
Marks a file as being edited by the current user.
See also editors, unedit, watch, and watchers.
Command 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:
- edit
- Notify the user if someone else has runcvs editon 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 recreated with cvs update or cvs checkout.
- commit
- Notify the user when someone else commits changes to the file.
- all
- Notify the user of all of the previous actions.
- none
- Notify the user of none of the previous actions.
- -l
- Run edit on files in the local directory only. (Do not recurse down subdirectories.)
See also -R.
- -R
- Run edit on files in the local directory and all subdirectories and recurse down the subdirectories. This option is the default.
See also -l.
Description
The cvs edit 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.
Tip
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 recreating 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.
Example
bash-2.05a$ cvs edit Makefile bash-2.05a$
editors
Synonyms: none
Synopsis
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.
Command options
- -l
- Run editors on files in the local directory only. (Do not recurse down subdirectories.)
See also -R.
- -R
- Run editors on files in the local directory and all subdirectories and recurse down the subdirectories. This option is the default.
See also -l.
Example
bash-2.05a$ cvs editors Makefile Makefile jenn Sat Oct 26 01:51:02 2002 GMT helit /home/jenn/cvs/wizzard
export
Synonyms: exp, ex
Synopsis
cvs [cvs-options] export [-flnNR] [-r revision] [-d directory-name] [-D date] [-k mode] [-r revision] project
Create a directory containing all directories and files belonging to a specified release of a project, with no CVS administrative files.
See also checkout and update.
Command options
- -d directory-name
- Export the project into a directory called directory-name instead of using the repository directory name or the name designated in the modules file in the repository's CVSROOT directory.
CVS usually creates the same directory structure that the repository uses. However, if the export contains only one file and -d is used, CVS does not create any intervening directories. Use -N to prevent CVS from shortening the path.
- -D date
- Export the latest revision of each file in a project that is older than the date or time specified by date. This option implies the -P option.
- -f
- Use the latest (HEAD) revision on the current branch or trunk of a project if no revision matches the date or revision number. This applies only if -ror -D is used.
- -k mode
- Export a release with the designated keyword-expansion mode. This option overrides the default mode for each file.
The keyword-expansion modes are listed in Section 11.6 of Chapter 11.
- -l
- Run export on the files in the local directory only. (Do not recurse into subdirectories.)
See also -R.
- -n
- Do not run any program listed in the relevant line of the modules file in the repository's CVSROOT directory.
- -N
- Do not shorten the path. CVS usually creates the same directory structure that the repository uses. However, if the export contains only one file and -d is used, CVS does not create any intervening directories unless -N is also specified.
- -r revision
- Run export on the specified revision or tag of each file in a project. If this revision or tag refers to a branch, run the command on the latest (HEAD) revision of the branch. This option implies the -P option.
- -R
- Run export on the directory and all subdirectories and recurse down the subdirectories. This option is the default.
See also -l.
Description
The cvs export command creates the directories and files that belong to a project as of a specific tagged release, revision number, or date. It acts like a checkout or update for that specific point, but it does not produce the CVS administrative files. export requires the -ror -Dcommand options.
When exporting, the repository path must be specified by using the -d repository_path CVS option or the CVSROOT environment variable.
Tip
You can imply the repository path by being in a sandbox, but exporting into a sandbox is not recommended.
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.
Example
bash-2.05a$ cvs -d cvs:/var/lib/cvs export -D now wizzard cvs server: Updating wizzard U wizzard/Changelog U wizzard/INSTALL U wizzard/Makefile
history
Synonyms: hi, his
Synopsis
cvs [cvs-options] history [-aceloTw] [-b string] [-D date] [-f file] [-m module] [-n module] [-p directory] [-r revision] [-t tag] [-u username] [-x flag...] [-z timezone] [files...]
Displays 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.
Tip
The -f, -l, -n, and -p options for cvs history act differently than their normal uses in CVS.
Command options
- -a
- Show history data for all users. By default, CVS shows only the data for the calling user.
- -b string
- Show data that is 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).
- -D date
- Report data that is more recent than the given date or time. (See Section 11.4 in Chapter 11 for legal dates.)
- -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 or -n module
- Show data for a particular module. Using -m, 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. Using -n, 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[ACEFGMORTUW]
- 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 Chapter 11.
Example
bash-2.05a$ cvs history O 2002-10-03 08:33 +0000 jenn wizzard/src =wizmain= <remote>/* O 2002-10-03 09:12 +0000 jenn wizzard =wizmake= <remote>/* O 2002-10-03 09:12 +0000 jenn wizzard/src =wiztest= <remote>/* O 2002-10-25 08:58 +0000 jenn wizzard =wizzard= <remote>/*
import
Synonyms: im, imp
Synopsis
cvs [cvs-options] import [-b branch] [-d] [-I ignore] [-k mode] [-m message] [-W wrapper] project-name vendor-tag release-tag
Creates a new project in the repository or manages vendor branches.
Command 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.
I strongly recommend that you read Section 7.1.3 in Chapter 7 before using this option.
- -d
- When setting the timestamp on each imported file, use each file's last modification time rather than the current time.
- -I ignore
- Ignore the named file when updating. -I can be used more than once. Use-I !to clear the list of ig