386BSD 0.1 development
[unix-history] / usr / othersrc / public / cvs-1.3 / man / cvs.1
CommitLineData
0107afa2
WJ
1.de Id
2.ds Rv \\$3
3.ds Dt \\$4
4..
5.Id cvs.1,v 1.12 1992/04/10 03:05:16 berliner Exp
6.TH CVS 1 "\*(Dt"
7.\" Full space in nroff; half space in troff
8.de SP
9.if n .sp
10.if t .sp .5
11..
12.\" quoted command
13.de `
14.RB ` "\|\\$1\|" '\\$2
15..
16.SH "NAME"
17cvs \- Concurrent Versions System
18.SH "SYNOPSIS"
19.TP
20\fBcvs\fP [ \fIcvs_options\fP ]
21.I cvs_command
22[
23.I command_options
24] [
25.I command_args
26]
27.SH "DESCRIPTION"
28.IX "revision control system" "\fLcvs\fR"
29.IX cvs "" "\fLcvs\fP \- concurrent versions system"
30.IX "concurrent versions system \- \fLcvs\fP"
31.IX "release control system" "cvs command" "" "\fLcvs\fP \- concurrent versions system"
32.IX "source control system" "cvs command" "" "\fLcvs\fP \- concurrent versions system"
33.IX revisions "cvs command" "" "\fLcvs\fP \- source control"
34.B cvs
35is a front end to the
36.BR rcs ( 1 )
37revision control system which extends
38the notion of revision control from a collection of files in a single
39directory to a hierarchical collection of directories consisting of
40revision controlled files.
41These directories and files can be combined together to form a software
42release.
43.B cvs
44provides the functions necessary to manage these software releases and to
45control the concurrent editing of source files among multiple software
46developers.
47.SP
48.B cvs
49keeps a single copy of the master sources.
50This copy is called the source ``repository''; it contains all the
51information to permit extracting previous software releases at any
52time based on either a symbolic revision tag, or a date in the past.
53.SH "ESSENTIAL COMMANDS"
54.B cvs
55provides a rich variety of commands (\fIcvs_command\fP in the
56Synopsis), each of which often has a wealth of options, to satisfy the
57many needs of source management in distributed environments. However,
58you don't have to master every detail to do useful work with
59.BR cvs ;
60in fact, five commands are sufficient to use (and contribute to)
61the source repository.
62.TP
63\fBcvs checkout\fP \fImodules\fP\|.\|.\|.
64A necessary preliminary for most \fBcvs\fP work: creates your private
65copy of the source for \fImodules\fP (named collections of source; you
66can also use a path relative to the source repository here). You can
67work with this copy without interfering with others' work. At least
68one subdirectory level is always created.
69.TP
70.B cvs update
71Execute this command from \fIwithin\fP your private source
72directory when you wish to update your copies of source files from
73changes that other developers have made to the source in the
74repository.
75.TP
76\fBcvs add\fP \fIfile\fP\|.\|.\|.
77Use this command to enroll new files in \fBcvs\fP records of your
78working directory. The files will be added to the repository the next
79time you run
80.` "cvs commit".
81Note:
82You should use the
83.` "cvs import"
84command to bootstrap new sources into the source repository.
85.` "cvs add"
86is only used for new files to an already checked-out module.
87.TP
88\fBcvs remove\fP \fIfile\fP\|.\|.\|.
89Use this command (after erasing any files listed) to declare that you
90wish to eliminate files from the repository. The removal does not
91affect others until you run
92.` "cvs commit".
93.TP
94\fBcvs commit\fP \fIfile\fP\|.\|.\|.
95Use this command when you wish to ``publish'' your changes to other
96developers, by incorporating them in the source repository.
97.SH "OPTIONS"
98The
99.B cvs
100command line can include
101.IR cvs_options ,
102which apply to the overall
103.B cvs
104program; a
105.IR cvs_command ,
106which specifies a particular action on the source repository; and
107.I command_options
108and
109.I command_arguments
110to fully specify what the
111.I cvs_command
112will do.
113.SP
114.I Warning:
115you must be careful of precisely where you place options relative to the
116.IR cvs_command .
117The same option can mean different things depending on whether it
118is in the
119.I cvs_options
120position (to the left of a
121.B cvs
122command) or in the
123.I command_options
124position (to the right of a
125.B cvs
126command).
127.SP
128There are only two situations where you may omit
129.IR cvs_command :
130.` "cvs \-H"
131elicits a list of available commands, and
132.` "cvs \-v "
133displays version information on \fBcvs\fP itself.
134.SP
135.SH "CVS OPTIONS"
136Use these options to control the overall
137.B cvs
138program:
139.TP
140.B \-H
141Display usage information about the specified
142.I cvs_command
143(but do not actually execute the command). If you don't specify a
144command name,
145.` "cvs \-H"
146displays a summary of all the commands available.
147.TP
148.B \-Q
149Causes the command to be
150.I really
151quiet; the command will generate output only for serious problems.
152.TP
153.B \-q
154Causes the command to be somewhat quiet; informational messages, such
155as reports of recursion through subdirectories, are suppressed.
156.TP
157\fB\-b\fP \fIbindir\fP
158Use
159.I bindir
160as the directory where
161.SM RCS
162programs are located.
163Overrides the setting of the
164.SM RCSBIN
165environment variable.
166This value should be specified as an absolute pathname.
167.TP
168\fB\-d\fP \fICVS_root_directory\fP
169Use
170.I CVS_root_directory
171as the root directory pathname of the master
172.SM RCS
173source repository.
174Overrides the setting of the
175.SM CVSROOT
176environment variable.
177This value should be specified as an absolute pathname.
178.TP
179\fB\-e\fP \fIeditor\fP
180Use
181.I editor
182to enter revision log information.
183Overrides the setting of the
184.SM EDITOR
185environment variable.
186.TP
187.B \-l
188Do not log the
189.I cvs_command
190in the command history (but execute it anyway). See the description
191of the
192.B history
193command for information on command history.
194.TP
195.B \-n
196Do not change any files. Attempt to execute the
197.IR cvs_command ,
198but only to issue reports; do not remove, update, or merge any
199existing files, or create any new files.
200.TP
201.B \-t
202Trace program execution; display messages showing the steps of
203.B cvs
204activity. Particularly useful with
205.B \-n
206to explore the potential impact of an unfamiliar command.
207.TP
208.B \-r
209Makes new working files files read-only.
210Same effect as if the
211.SM CVSREAD
212environment variable is set.
213.TP
214.B \-v
215Displays version and copyright information for
216.BR cvs .
217.TP
218.B \-w
219Makes new working files read-write (default).
220Overrides the setting of the
221.SM CVSREAD
222environment variable.
223.SH "USAGE"
224Except when requesting general help with
225.` "cvs \-H",
226you must specify a
227.I cvs_command
228to
229.B cvs
230to select a specific release control function to perform.
231Each
232.B cvs
233command accepts its own collection of options and arguments.
234However, many options are available across several commands.
235You can display a usage summary for each command by specifying the
236.B \-H
237option with the command.
238.SH "CVS COMMAND SUMMARY"
239Here are brief descriptions of all the
240.B cvs
241commands:
242.TP
243.B add
244Add a new file or directory to the repository, pending a
245.` "cvs commit"
246on the same file.
247Can only be done from within sources created by a previous
248.` "cvs checkout"
249invocation.
250Use
251.` "cvs import"
252to place whole new hierarchies of sources under
253.B cvs
254control.
255(Does not directly affect repository; changes
256working directory.)
257.TP
258.B admin
259Execute
260.SM RCS
261control functions on the source repository. (Changes
262repository directly; uses working directory without changing it.)
263.TP
264.B checkout
265Make a working directory of source files for editing. (Creates or changes
266working directory.)
267.TP
268.B commit
269Apply to the source repository changes, additions, and deletions from your
270working directory. (Changes repository.)
271.TP
272.B diff
273Show differences between files in working directory and source
274repository, or between two revisions in source repository.
275(Does not change either repository or working directory.)
276.TP
277.B export
278Prepare copies of a set of source files for shipment off site.
279Differs from
280.` "cvs checkout"
281in that no
282.B cvs
283administrative directories are created (and therefore
284.` "cvs commit"
285cannot be executed from a directory prepared with
286.` "cvs export"),
287and a symbolic tag must be specified.
288(Does not change repository; creates directory similar to working
289directories).
290.TP
291.B history
292Show reports on
293.B cvs
294commands that you or others have executed on a particular file or
295directory in the source repository. (Does not change repository or
296working directory.) History logs are kept only if enabled by creation
297of the
298.` "$CVSROOT/CVSROOT/history"
299file; see
300.BR cvs ( 5 ).
301.TP
302.B import
303Incorporate a set of updates from off-site into the source repository,
304as a ``vendor branch''. (Changes repository.)
305.TP
306.B log
307Display
308.SM RCS
309log information.
310(Does not change repository or working directory.)
311.TP
312.B rdiff
313Prepare a collection of diffs as a patch file between two releases in
314the repository. (Does not change repository or working directory.)
315.TP
316.B release
317Cancel a
318.` "cvs checkout",
319abandoning any changes.
320(Can delete working directory; no effect on repository.)
321.TP
322.B remove
323Remove files from the source repository, pending a
324.` "cvs commit"
325on the same files. (Does not directly affect repository;
326changes working directory.)
327.TP
328.B rtag
329Explicitly specify a symbolic tag for particular revisions of files in the
330source repository. See also
331.` "cvs tag".
332(Changes repository directly; does not require or affect
333working directory.)
334.TP
335.B status
336Show current status of files: latest version, version in working
337directory, whether working version has been edited and, optionally,
338symbolic tags in the
339.SM RCS
340file. (Does not change
341repository or working directory.)
342.TP
343.B tag
344Specify a symbolic tag for files in the repository. Tags the revisions
345that were last synchronized with your working directory. (Changes
346repository directly; uses working directory without changing it.)
347.TP
348.B update
349Bring your working directory up to date with changes from the
350repository. Merges are performed automatically when possible; a
351warning is issued if manual resolution is required for conflicting
352changes. (Changes working directory; does not change repository.)
353.SH "COMMON COMMAND OPTIONS"
354This section describes the
355.I command_options
356that are available across several
357.B cvs
358commands. Not all commands support all of these options; each option
359is only supported for commands where it makes sense. However, when
360a command has one of these options you can count on the same meaning
361for the option as in other commands. (Other command
362options, which are listed with the individual commands, may have
363different meanings from one
364.B cvs
365command to another.)
366.I "Warning:"
367the
368.B history
369command is an exception;
370it supports many options that conflict
371even with these standard options.
372.TP
373\fB\-D\fP \fIdate_spec\fP
374Use the most recent revision no later than \fIdate_spec\fP (a single
375argument, date description specifying a date in the
376past). A wide variety of date formats are supported by the underlying
377.SM RCS
378facilities, similar to those described in
379.BR co ( 1 ),
380but not exactly the same.
381The \fIdate_spec\fP is interpreted as being in the local timezone, unless a
382specific timezone is specified.
383The specification is ``sticky'' when you use it to make a
384private copy of a source file; that is, when you get a working file
385using \fB\-D\fP, \fBcvs\fP records the date you
386specified, so that further updates in the same directory will use the
387same date (unless you explicitly override it; see the description of
388the \fBupdate\fP command).
389.B \-D
390is available with the
391.BR checkout ", " diff, ", " history ", " export ", "
392.BR rdiff ", " rtag ", and "
393.B update
394commands.
395Examples of valid date specifications include:
396.in +1i
397.ft B
398.nf
3991 month ago
4002 hours ago
401400000 seconds ago
402last year
403last Monday
404yesterday
405a fortnight ago
4063/31/92 10:00:07 PST
407January 23, 1987 10:05pm
40822:00 GMT
409.fi
410.ft P
411.in -1i
412.TP
413.B \-f
414When you specify a particular date or tag to \fBcvs\fP commands, they
415normally ignore files that do not contain the tag (or did not exist on
416the date) that you specified. Use the \fB\-f\fP option if you want
417files retrieved even when there is no match for the tag or date. (The
418most recent version is used in this situation.)
419.B \-f
420is available with these commands:
421.BR checkout ", " export ", "
422.BR rdiff ", " rtag ", and " update .
423.TP
424.B \-H
425Help; describe the options available for this command. This is the
426only option supported for
427.I all
428.B cvs
429commands.
430.TP
431\fB\-k\fP \fIkflag\fP
432Alter the default
433.SM RCS
434processing of keywords; all the
435.B \-k
436options described in
437.BR rcs ( 1 )
438are available. The \fB\-k\fP option is available with the
439.BR add ", " checkout ", " diff ", "
440.RB rdiff ", and " update
441commands. Your \fIkflag\fP specification is ``sticky'' when you use
442it to create a private copy of a source file; that is, when you use
443this option with the \fBcheckout\fP or \fBupdate\fP commands,
444\fBcvs\fP associates your selected \fIkflag\fP with the file, and
445continues to use it with future \fBupdate\fP commands on the same file
446until you specify otherwise.
447.TP
448.B \-l
449Local; run only in current working directory, rather than recurring through
450subdirectories. Available with the following commands:
451.BR checkout ", " commit ", " diff ", "
452.BR export ", " remove ", " rdiff ", " rtag ", "
453.BR status ", " tag ", and " update .
454.I Warning:
455this is not the same
456as the overall
457.` "cvs \-l"
458option, which you can specify to the
459.I left
460of a
461.B cvs
462command!
463.TP
464.B \-n
465Do
466.I not
467run any
468.BR checkout / commit / tag / update
469program. (A program can be specified to run on each of these
470activities, in the modules database; this option bypasses it.)
471Available with the
472.BR checkout ", " commit ", " export ", and "
473.B rtag
474commands.
475.I Warning:
476this is not the same
477as the overall
478.` "cvs \-n"
479option, which you can specify to the
480.I left
481of a
482.B cvs
483command!
484.TP
485.B \-P
486Prune (remove) directories that are empty after being updated, on
487.BR checkout ", or " update .
488Normally, an empty directory (one that is void of revision-controlled
489files) is left alone.
490Specifying
491.B \-P
492will cause these directories to be silently removed from your checked-out
493sources.
494This does not remove the directory from the repository, only from your
495checked out copy.
496Note that this option is implied by the
497.B \-r
498or
499.B \-D
500options of
501.BR checkout " and " export .
502.TP
503.B \-p
504Pipe the files retrieved from the repository to standard output,
505rather than writing them in the current directory. Available with the
506.BR checkout " and " update
507commands.
508.TP
509.B \-Q
510Causes the command to be
511.I really
512quiet; the command will generate output only for serious problems.
513Available with the following commands:
514.BR checkout ", " import ", " export ", "
515.BR rdiff ", " rtag ", "
516.BR tag ", and " update .
517.TP
518.B \-q
519Causes the command to be somewhat quiet; informational messages, such
520as reports of recursion through subdirectories, are suppressed.
521Available with the following commands:
522.BR checkout ", " import ", " export ", "
523.BR rtag ", "
524.BR tag ", and " update .
525.TP
526\fB\-r\fP \fItag\fP
527Use the revision specified by the
528.I tag
529argument instead of the default ``head'' revision. As well as
530arbitrary tags defined with the \fBtag\fP or \fBrtag\fP command, two
531special tags are always available:
532.` "HEAD"
533refers to the most
534recent version available in the repository, and
535.` "BASE"
536refers to the revision you last checked out into the current working
537directory.
538.SP
539The \fItag\fP specification is ``sticky'' when you use
540this option with
541.` "cvs checkout"
542or
543.` "cvs update"
544to
545make your own copy of a file: \fBcvs\fP remembers the \fItag\fP and
546continues to use it on future \fBupdate\fP commands, until you specify
547otherwise.
548.I tag
549can be either a symbolic or numeric tag, in
550.SM RCS
551fashion.
552Specifying the
553.B \-q
554option along with the
555.B \-r
556option is often useful, to suppress the warning messages when the
557.SM RCS
558file does not contain the specified tag.
559.B \-r
560is available with the
561.BR checkout ", " commit ", " diff ", "
562.BR history ", " export ", "
563.BR rdiff ", " rtag ", and " update
564commands.
565.I Warning:
566this is not the same
567as the overall
568.` "cvs \-r"
569option, which you can specify to the
570.I left
571of a
572.B cvs
573command!
574.SH "CVS COMMANDS"
575Here (finally) are details on all the
576.B cvs
577commands and the options each accepts. The summary lines at the top
578of each command's description highlight three kinds of things:
579.TP 1i
580\ \ \ \ Command Options and Arguments
581Special options are described in detail below; common command options
582may appear only in the summary line.
583.TP 1i
584\ \ \ \ Working Directory, or Repository?
585Some \fBcvs\fP commands require a working directory to operate; some
586require a repository. Also, some commands \fIchange\fP the
587repository, some change the working directory, and some change
588nothing.
589.TP 1i
590\ \ \ \ Synonyms
591Many commands have synonyms, which you may find easier to
592remember (or type) than the principal name.
593.PP
594.TP
595\fBadd\fP [\fB\-k\fP \fIkflag\fP] [\fB\-m '\fP\fImessage\fP\fB'\fP] \fIfiles.\|.\|.\fP
596.I Requires:
597repository, working directory.
598.br
599.I Changes:
600working directory.
601.br
602.I Synonym:
603.B new
604.br
605Use the
606.B add
607command to create a new file or directory in the
608.SM RCS
609source repository.
610The files or directories specified with
611.B add
612must already exist in the current directory (which must have been created
613with the
614.B checkout
615command).
616To add a whole new directory hierarchy to the source repository
617(for example, files received from a third-party vendor), use the
618.` "cvs import"
619command instead.
620.SP
621If the argument to
622.` "cvs add"
623refers to an immediate sub-directory, the directory is
624created at the correct place in the
625.SM RCS
626source repository, and the necessary
627.B cvs
628administration files are created in your working directory.
629If the directory already exists in the source repository,
630.` "cvs add"
631still creates the administration files in your version of the directory.
632This allows you to use
633.` "cvs add"
634to add a particular directory to your private sources even if
635someone else created that directory after your
636.B checkout
637of the sources. You can do the following:
638.SP
639.in +1i
640.ft B
641.nf
642example% mkdir new_directory
643example% cvs add new_directory
644example% cvs update new_directory
645.fi
646.ft P
647.in -1i
648.SP
649An alternate approach using
650.` "cvs update"
651might be:
652.SP
653.in +1i
654.ft B
655.nf
656example% cvs update -d new_directory
657.fi
658.ft P
659.in -1i
660.SP
661(To add \fIany available\fP new directories to your working directory, it's
662probably simpler to use
663.` "cvs checkout"
664or
665.` "cvs update -d".)
666.SP
667The added files are not placed in the
668.SM RCS
669source repository until you use
670.` "cvs commit"
671to make the change permanent.
672Doing a
673.` "cvs add"
674on a file that was removed with the
675.` "cvs remove"
676command will resurrect the file, if no
677.` "cvs commit"
678command intervened.
679.SP
680You will have the opportunity to specify a logging message, as usual,
681when you use
682.` "cvs commit"
683to make the new file permanent. If you'd like to have another
684logging message associated with just
685.I creation
686of the file (for example, to describe the file's purpose), you can
687specify it with the
688.` "\-m \fImessage\fP"
689option to the
690.B add
691command.
692.SP
693The
694.` "-k kflag"
695option specifies the default way that this
696file will be checked out.
697The
698.` "kflag"
699argument is stored in the
700.SM RCS
701file and can be changed with
702.` "cvs admin".
703Specifying
704.` "-ko"
705is useful for checking in binaries that
706shouldn't have the
707.SM RCS
708id strings expanded.
709.TP
710\fBadmin\fP [\fIrcs-options\fP] \fIfiles.\|.\|.\fP
711.I Requires:
712repository, working directory.
713.br
714.I Changes:
715repository.
716.br
717.I Synonym:
718.B rcs
719.br
720This is the
721.B cvs
722interface to assorted administrative
723.SM RCS
724facilities, documented in
725.BR rcs ( 1 ).
726.` "cvs admin"
727simply passes all its options and arguments to the
728.B rcs
729command; it does no filtering or other processing.
730This command does work recursively, however, so extreme care should be
731used.
732.TP
733\fBcheckout\fP [\fBoptions\fP] \fImodules\fP.\|.\|.
734.I Requires:
735repository.
736.br
737.I Changes:
738working directory.
739.br
740.I Synonyms:
741.BR co ", " get
742.br
743Make a working directory containing copies of the source files specified by
744.IR modules .
745You must execute
746.` "cvs checkout"
747before using most of the other
748.B cvs
749commands, since most of them operate on your working directory.
750.SP
751\fImodules\fP are either symbolic names (themselves defined as the
752module
753.` "modules"
754in the source repository; see
755.BR cvs ( 5 ))
756for some collection of source directories and files, or paths to
757directories or files in the repository.
758.SP
759Depending on the
760.I modules
761you specify,
762.B checkout
763may recursively create directories and populate them with the appropriate
764source files.
765You can then edit these source files at any time (regardless of whether
766other software developers are editing their own copies of the sources);
767update them to include new changes applied by others to the source
768repository; or commit your work as a permanent change to the
769.SM RCS
770repository.
771.SP
772Note that
773.B checkout
774is used to create directories.
775The top-level directory created is always added to the directory
776where
777.B checkout
778is invoked, and usually has the same name as the specified
779.IR module .
780In the case of a
781.I module
782alias, the created sub-directory may have a different name, but you can be
783sure that it will be a sub-directory, and that
784.B checkout
785will show the relative path leading to each file as it is extracted into
786your private work area (unless you specify the
787.B \-Q
788option).
789.SP
790Running
791.` "cvs checkout"
792on a directory that was already built by a prior
793.B checkout
794is also permitted, and
795has the same effect as specifying the
796.B \-d
797option to the
798.B update
799command described below.
800.SP
801The
802.I options
803permitted with
804.` "cvs checkout"
805include the standard command options
806.BR \-P ", " \-Q ", " \-f ", "
807.BI \-k " kflag"
808\&,
809.BR \-l ", " \-n ", " \-p ", "
810.BR \-q ", " \-r
811.IR tag ", and"
812.BI \-D " date"\c
813\&.
814.SP
815In addition to those, you can use these special command options
816with
817.BR checkout :
818.SP
819Use the
820.B \-A
821option to reset any sticky tags, dates, or
822.B \-k
823options. (If you get a working file using one of the
824\fB\-r\fP, \fB\-D\fP, or \fB\-k\fP options, \fBcvs\fP remembers the
825corresponding tag, date, or \fIkflag\fP and continues using it on
826future updates; use the \fB\-A\fP option to make \fBcvs\fP forget these
827specifications, and retrieve the ``head'' version of the file).
828.SP
829The
830.BI \-j " branch"
831option merges the changes made between the
832resulting revision and the revision that it is based on (e.g., if
833the tag refers to a branch,
834.B cvs
835will merge all changes made in that branch into your working file).
836.SP
837With two \fB-j\fP options,
838.B cvs
839will merge in the changes between the two respective revisions.
840This can be used to ``remove'' a certain delta from your working file.
841.SP
842In addition, each \fB-j\fP option can contain on optional date
843specification which, when used with branches, can limit the chosen
844revision to one within a specific date.
845An optional date is specified by adding a colon (:) to the tag.
846An example might be what
847.` "cvs import"
848tells you to do when you have
849just imported sources that have conflicts with local changes:
850.SP
851.in +1i
852.ft B
853.nf
854example% cvs checkout -jTAG:yesterday -jTAG module
855.fi
856.ft P
857.in -1i
858.SP
859Use the
860.B \-N
861option with
862.` "\-d \fIdir\fP"
863to avoid shortening module paths in your working directory. (Normally, \fBcvs\fP shortens paths as much as possible when you specify an explicit target directory.)
864.SP
865Use the
866.B \-c
867option to copy the module file, sorted, to the standard output,
868instead of creating or modifying any files or directories in your
869working directory.
870.SP
871Use the
872.BI \-d " dir"
873option to create a directory called
874.I dir
875for the working files, instead of using the module name. Unless you
876also use \fB\-N\fP, the paths created under \fIdir\fP will be as short
877as possible.
878.SP
879Use the
880.B \-s
881option to display per-module status information stored with
882the
883.B \-s
884option within the modules file.
885.TP
886\fBcommit\fP [\fB\-lnR\fP] [\fB\-m\fP '\fIlog_message\fP' | \fB\-f\fP \fIfile\fP] [\fB\-r\fP \fIrevision\fP] [\fIfiles.\|.\|.\fP]
887.I Requires:
888working directory, repository.
889.br
890.I Changes:
891repository.
892.br
893.I Synonym:
894.B ci
895.br
896Use
897.` "cvs commit"
898when you want to incorporate changes from your working source
899files into the general source repository.
900.SP
901If you don't specify particular \fIfiles\fP to commit, all
902of the files in your working current directory are examined.
903.B commit
904is careful to change in the repository only those files that you have
905really changed. By default (or if you explicitly specify the
906.B \-R
907option), files
908in subdirectories are also examined and committed if they have
909changed; you can use the
910.B \-l
911option to limit
912.B commit
913to the current directory only.
914.SP
915.B commit
916verifies that the selected files are up to date with the current revisions
917in the source repository; it will notify you, and exit without
918committing, if any of the specified files must be made current first
919with
920.` "cvs update".
921.B commit
922does not call the
923.B update
924command for you, but rather leaves that for you to do when
925the time is right.
926.SP
927When all is well, an editor is invoked to allow you to enter a log
928message that will be written to one or more logging programs and placed in the
929.SM RCS
930source repository file.
931You can instead specify the log message on the command line with the
932.B \-m
933option, thus suppressing the editor invocation, or use the
934.B \-f
935option to specify that the argument \fIfile\fP contains the log message.
936.SP
937The
938.B \-r
939option can be used to commit to a particular symbolic or numeric revision
940within the
941.SM RCS
942file.
943For example, to bring all your files up to the
944.SM RCS
945revision ``3.0'' (including those that haven't changed), you might do:
946.SP
947.in +1i
948.ft B
949.nf
950example% cvs commit -r3.0
951.fi
952.ft P
953.in -1i
954.SP
955.B cvs
956will only allow you to commit to a revision that is on the main trunk (a
957revision with a single dot).
958However, you can also commit to a branch revision (one that has an even
959number of dots) with the
960.B \-r
961option.
962To create a branch revision, one typically use the
963.B \-b option of the
964.BR rtag " or " tag
965commands.
966Then, either
967.BR checkout " or " update
968can be used to base your sources on the newly created branch.
969From that point on, all
970.B commit
971changes made within these working sources will be automatically added
972to a branch revision, thereby not perturbing main-line development in any
973way.
974For example, if you had to create a patch to the 1.2 version of the
975product, even though the 2.0 version is already under development, you
976might do:
977.SP
978.in +1i
979.ft B
980.nf
981example% cvs rtag -b -rFCS1_2 FCS1_2_Patch product_module
982example% cvs checkout -rFCS1_2_Patch product_module
983example% cd product_module
984[[ hack away ]]
985example% cvs commit
986.fi
987.ft P
988.in -1i
989.SP
990Say you have been working on some extremely experimental software, based on
991whatever revision you happened to checkout last week.
992If others in your group would like to work on this software with you, but
993without disturbing main-line development, you could commit your change to a
994new branch.
995Others can then checkout your experimental stuff and utilize the full
996benefit of
997.B cvs
998conflict resolution.
999The scenario might look like:
1000.SP
1001.in +1i
1002.ft B
1003.nf
1004example% cvs tag -b EXPR1
1005example% cvs update -rEXPR1
1006[[ hack away ]]
1007example% cvs commit
1008.fi
1009.ft P
1010.in -1i
1011.SP
1012Others would simply do
1013.` "cvs checkout -rEXPR1 whatever_module"
1014to work with you on the experimental change.
1015.TP
1016\fBdiff\fP [\fB\-kl\fP] [\fIrcsdiff_options\fP] [[\fB\-r\fP \fIrev1\fP | \fB\-D\fP \fIdate1\fP] [\fB\-r\fP \fIrev2\fP | \fB\-D\fP \fIdate2\fP]] [\fIfiles.\|.\|.\fP]
1017.I Requires:
1018working directory, repository.
1019.br
1020.I Changes:
1021nothing.
1022.br
1023You can compare your working files with revisions in the source
1024repository, with the
1025.` "cvs diff"
1026command. If you don't specify a particular revision, your files
1027are compared with the revisions they were based on. You can also use
1028the standard
1029.B cvs
1030command option
1031.B \-r
1032to specify a particular revision to compare your files with. Finally,
1033if you use
1034.B \-r
1035twice, you can see differences between two revisions in the
1036repository.
1037You can also specify
1038.B \-D
1039options to diff against a revision in the past.
1040The
1041.B \-r
1042and
1043.B \-D
1044options can be mixed together with at most two options ever specified.
1045.SP
1046See
1047.BR rcsdiff ( 1 )
1048for a list of other accepted options.
1049.SP
1050If you don't specify any files,
1051.B diff
1052will display differences for all those files in the current directory
1053(and its subdirectories, unless you use the standard option
1054.BR \-l )
1055that
1056differ from the corresponding revision in the source repository
1057(i.e. files that
1058.I you
1059have changed), or that differ from the revision specified.
1060.TP
1061\fBexport\fP [\-\fBf\|lNnQq\fP] \fB\-r\fP \fIrev\fP\||\|\fB\-D\fP \fIdate\fP [\fB\-d\fP \fIdir\fP] \fImodule\fP.\|.\|.
1062.I Requires:
1063repository.
1064.br
1065.I Changes:
1066current directory.
1067.br
1068This command is a variant of
1069.` "cvs checkout";
1070use it when you want a copy of the source for \fImodule\fP
1071without the \fBcvs\fP administrative directories. For example, you
1072might use
1073.` "cvs export"
1074to prepare source for shipment
1075off-site. This command \fIrequires\fP that you specify a date or tag
1076(with \fB\-D\fP or \fB\-r\fP), so that you can count on reproducing
1077the source you ship to others.
1078.SP
1079The only non-standard options are
1080.` "\-d \fIdir\fP"
1081(write the
1082source into directory \fIdir\fP) and
1083.` "\-N"
1084(don't shorten
1085module paths).
1086These have the same meanings as the same options in
1087.` "cvs checkout".
1088.SP
1089The
1090.B \-kv
1091option is always set when
1092.B export
1093is used.
1094This causes any
1095.SM RCS
1096keywords to be expanded such that an
1097.B import
1098done at some other site will not lose the keyword revision information.
1099There is no way to override this.
1100.TP
1101\fBhistory\fP [\fB\-\fP\fIreport\fP] [\fB\-\fP\fIflags\fP] [\fB\-\fP\fIoptions args\fP] [\fIfiles\fP.\|.\|.]
1102.I Requires:
1103the file
1104.` "$CVSROOT/CVSROOT/history"
1105.br
1106.I Changes:
1107nothing.
1108.br
1109\fBcvs\fP keeps a history file that tracks each use of the
1110\fBcheckout\fP, \fBcommit\fP, \fBrtag\fP, \fBupdate\fP, and \fBrelease\fP
1111commands. You can use
1112.` "cvs history"
1113to display this
1114information in various formats.
1115.SP
1116.I Warning:
1117.` "cvs history"
1118uses
1119.` "\-f",
1120.` "\-l",
1121.` "\-n",
1122and
1123.` "\-p"
1124in ways that conflict with the
1125descriptions in
1126.SM
1127COMMON COMMAND OPTIONS\c
1128\&.
1129.SP
1130Several options (shown above as \fB\-\fP\fIreport\fP) control what
1131kind of report is generated:
1132.TP 1i
1133.B \ \ \ \ \ \ \-c
1134Report on each time \fBcommit\fP was used (i.e., each time the
1135repository was modified).
1136.TP 1i
1137\fB\ \ \ \ \ \ \-m\fP \fImodule\fP
1138Report on a particular \fImodule\fP. (You can meaningfully use
1139\fB\-m\fP more than once on the command line.)
1140.TP 1i
1141.B \ \ \ \ \ \ \-o
1142Report on checked-out modules.
1143.TP 1i
1144.B \ \ \ \ \ \ \-T
1145Report on all tags.
1146.TP 1i
1147\fB\ \ \ \ \ \ \-x\fP \fItyp\fP
1148Extract a particular set of record types \fIX\fP from the \fBcvs\fP
1149history. The types are indicated by single letters, which you may
1150specify in combination.
1151Certain commands have a single record type: \fBcheckout\fP (type `O'),
1152\fBrelease\fP (type `F'), and \fBrtag\fP (type `T'). One of four
1153record types may result from an \fBupdate\fP: `W', when the working copy
1154of a file is deleted during update (because it was gone from the
1155repository); `U', when a working file was copied from the
1156repository; `G', when a merge was necessary and it succeeded; and 'C',
1157when a merge was necessary but collisions were detected (requiring
1158manual merging). Finally, one of three record types results from
1159\fBcommit\fP: `M', when a file was modified; `A', when a file is first
1160added; and `R', when a file is removed.
1161.TP 1i
1162.B \ \ \ \ \ \ \-e
1163Everything (all record types); equivalent to specifying
1164.` "\-xMACFROGWUT".
1165.PP
1166.RS .5i
1167The options shown as \fB\-\fP\fIflags\fP constrain the report without
1168requiring option arguments:
1169.RE
1170.TP 1i
1171.B \ \ \ \ \ \ \-a
1172Show data for all users (the default is to show data only for the user
1173executing
1174.` "cvs history").
1175.TP 1i
1176.B \ \ \ \ \ \ \-l
1177Show last modification only.
1178.TP 1i
1179.B \ \ \ \ \ \ \-w
1180Show only the records for modifications done from the same working
1181directory where
1182.` "cvs history"
1183is executing.
1184.PP
1185.RS .5i
1186The options shown as \fB\-\fP\fIoptions args\fP constrain the report
1187based on an argument:
1188.RE
1189.TP 1i
1190\fB\ \ \ \ \ \ \-b\fP \fIstr\fP
1191Show data back to a record containing the string \fIstr\fP in either
1192the module name, the file name, or the repository path.
1193.TP 1i
1194\fB\ \ \ \ \ \ \-D\fP \fIdate\fP
1195Show data since \fIdate\fP.
1196.TP 1i
1197\fB\ \ \ \ \ \ \-p\fP \fIrepository\fP
1198Show data for a particular source repository (you can specify several
1199\fB\-p\fP options on the same command line).
1200.TP 1i
1201\fB\ \ \ \ \ \ \-r\fP \fIrev\fP
1202Show records referring to revisions since the revision or tag
1203named \fIrev\fP appears in individual RCS files.
1204Each
1205.SM RCS
1206file is searched for the revision or tag.
1207.TP 1i
1208\fB\ \ \ \ \ \ \-t\fP \fItag\fP
1209Show records since tag \fItag\fP was last added to the the history file.
1210This differs from the \fB-r\fP flag above in that it reads
1211only the history file, not the
1212.SM RCS
1213files, and is much faster.
1214.TP 1i
1215\fB\ \ \ \ \ \ \-u\fP \fIname\fP
1216Show records for user \fIname\fP.
1217.PP
1218.TP
1219\fBimport\fP [\fB\-\fP\fIoptions\fP] \fIrepository vendortag releasetag\fP.\|.\|.
1220.I Requires:
1221Repository, source distribution directory.
1222.br
1223.I Changes:
1224repository.
1225.br
1226Use
1227.` "cvs import"
1228to incorporate an entire source
1229distribution from an outside source (e.g., a source vendor) into your
1230source repository directory. You can use this command both for
1231initial creation of a repository, and for wholesale updates to the
1232module form the outside source.
1233.SP
1234The \fIrepository\fP argument gives a directory name (or a path to a
1235directory) under the CVS root directory for repositories; if the
1236directory did not exist, \fBimport\fP creates it.
1237.SP
1238When you use \fBimport\fP for updates to source that has been modified in your
1239source repository (since a prior \fBimport\fP), it
1240will notify you of any files that conflict in the two branches of
1241development; use
1242.` "cvs checkout -j"
1243to reconcile the differences, as \fBimport\fP instructs you to do.
1244.SP
1245By default, certain file names are ignored during
1246.` "cvs import":
1247names associated with
1248.SM CVS
1249administration, or with other common source control systems; common
1250names for patch files, object files, archive files, and editor backup
1251files; and other names that are usually artifacts of assorted utilities.
1252Currently, the default list of ignored files includes files matching
1253these names:
1254.SP
1255.in +1i
1256.ft B
1257.nf
1258RCSLOG RCS SCCS
1259CVS* cvslog.*
1260tags TAGS
1261\&.make.state .nse_depinfo
1262*~ #* .#* ,*
1263*.old *.bak *.orig *.rej .del\-*
1264*.a *.o *.Z *.elc *.ln core
1265.fi
1266.ft P
1267.in -1i
1268.SP
1269The outside source is saved in a first-level
1270.SM RCS
1271branch, by default
1272.` "1.1.1".
1273Updates are leaves of this
1274branch; for example, files from the first imported collection of
1275source will be revision
1276.` "1.1.1.1",
1277then files from the first
1278imported update will be revision
1279.` "1.1.1.2",
1280and so on.
1281.SP
1282At least three arguments are required. \fIrepository\fP is needed to
1283identify the collection of source. \fIvendortag\fP is a tag for the
1284entire branch (e.g., for
1285.` "1.1.1").
1286You must also specify at
1287least one \fIreleasetag\fP to identify the files at the leaves created
1288each time you execute
1289.` "cvs import".
1290.SP
1291Three of the standard
1292.B cvs
1293command options are available: \fB\-Q\fP, \fB\-q\fP, and \fB\-m\fP
1294\fImessage\fP. If you do not specify a logging message with
1295\fB\-m\fP, your editor is invoked (as with \fBcommit\fP) to allow you
1296to enter one.
1297.SP
1298There are two additional special options.
1299.SP
1300Use
1301.` "\-b \fIbranch\fP"
1302to specify a first-level branch other
1303than
1304.` "1.1.1".
1305.SP
1306Use
1307.` "\-I \fIname\fP"
1308to specify file names that should be
1309ignored during \fBimport\fP. You can use this option repeatedly.
1310To avoid ignoring any files at all (even those ignored by default),
1311specify
1312.` "\-I !".
1313.TP
1314\fBlog\fP [\fB\-l\fP] \fIrlog-options [files\fP\|.\|.\|.]
1315.I Requires:
1316repository, working directory.
1317.br
1318.I Changes:
1319nothing.
1320.br
1321.I Synonym:
1322.B rlog
1323.br
1324Display log information for \fIfiles\fP.
1325.` "cvs log"
1326calls
1327the
1328.SM RCS
1329utility \fBrlog\fP; all the options described in
1330.BR rlog ( 1 )
1331are available. Among the more useful \fBrlog\fP options are \fB\-h\fP
1332to display only the header (including tag definitions, but omitting
1333most of the full log); \fB\-r\fP to select logs on particular
1334revisions or ranges of revisions; and \fB\-d\fP to select particular
1335dates or date ranges. See
1336.BR rlog ( 1 )
1337for full explanations.
1338This command is recursive by default, unless the
1339.B \-l
1340option is specified.
1341.TP
1342\fBrdiff\fP [\fB\-\fP\fIflags\fP] [\fB\-V\fP \fIvn\fP] [\fB\-r\fP \fIt\fP|\fB\-D\fP \fId\fP [\fB\-r\fP \fIt2\fP|\fB\-D\fP \fId2\fP]] \fImodules\|.\|.\|.\fP
1343.I Requires:
1344repository.
1345.br
1346.I Changes:
1347nothing.
1348.br
1349.I Synonym:
1350.B patch
1351.br
1352Builds a Larry Wall format
1353.BR patch ( 1 )
1354file between two releases, that can be fed directly into the
1355.B patch
1356program to bring an old release up-to-date with the new release.
1357(This is one of the few \fBcvs\fP commands that operates directly from
1358the repository, and doesn't require a prior
1359.BR checkout .)
1360The diff output is sent to the standard output device.
1361You can specify (using the standard \fB\-r\fP and \fB\-D\fP options)
1362any combination of one or two revisions or dates.
1363If only one revision or date is specified, the
1364patch file reflects differences between that revision or date and the
1365current ``head'' revisions in the
1366.SM RCS
1367file.
1368.SP
1369Note that if the software release affected
1370is contained in more than one directory, then it may be necessary to
1371specify the
1372.B \-p
1373option to the
1374.B patch
1375command when patching the old sources, so that
1376.B patch
1377is able to find the files that are located in other directories.
1378.SP
1379If you use the option \fB\-V\fP \fIvn\fP,
1380.SM RCS
1381keywords are expanded according to the rules current in
1382.SM RCS
1383version \fIvn\fP (the expansion format changed with
1384.SM RCS
1385version 5).
1386.SP
1387The standard option \fIflags\fP \fB\-f\fP, \fB\-l\fP, \fB\-Q\fP, and
1388\fB\-q\fP are available with this command. There are also several
1389special options flags:
1390.SP
1391If you use the
1392.B \-s
1393option, no patch output is produced.
1394Instead, a summary of the changed or added files between the two
1395releases is sent to the standard output device.
1396This is useful for finding out, for example, which files have changed
1397between two dates or revisions.
1398.SP
1399If you use the
1400.B \-t
1401option, a diff of the top two revisions is sent to the standard output device.
1402This is most useful for seeing what the last change to a file was.
1403.SP
1404If you use the
1405.B \-u
1406option, the patch output uses the newer ``unidiff'' format for context
1407diffs.
1408.SP
1409You can use
1410.B \-c
1411to explicitly specify the
1412.` "diff \-c"
1413form of context diffs
1414(which is the default), if you like.
1415.TP
1416\fBrelease\fP [\fB\-dQq\fP] \fImodules\fP\|.\|.\|.
1417.I Requires:
1418Working directory.
1419.br
1420.I Changes:
1421Working directory, history log.
1422.br
1423This command is meant to safely cancel the effect of
1424.` "cvs checkout'.
1425Since
1426.B cvs
1427doesn't lock files, it isn't strictly necessary to use this command.
1428You can always simply delete your working directory, if you
1429like; but you risk losing changes you may have forgotten, and you
1430leave no trace in the
1431.B cvs
1432history file that you've abandoned your checkout.
1433.SP
1434Use
1435.` "cvs release"
1436to avoid these problems. This command
1437checks that no un-committed changes are present; that you are
1438executing it from immediately above, or inside, a \fBcvs\fP working
1439directory; and that the repository recorded for your files is the same
1440as the repository defined in the module database.
1441.SP
1442If all these conditions are true,
1443.` "cvs release"
1444leaves a
1445record of its execution (attesting to your intentionally abandoning
1446your checkout) in the
1447.B cvs
1448history log.
1449.SP
1450You can use the \fB\-d\fP flag to request that your working copies of
1451the source files be deleted if the \fBrelease\fP succeeds.
1452.TP
1453\fBremove\fP [\fB\-lR\fP] [\fIfiles\|.\|.\|.\fP]
1454.I Requires:
1455Working directory.
1456.br
1457.I Changes:
1458Working directory.
1459.br
1460.I Synonyms:
1461.BR rm ", " delete
1462.br
1463Use this command to declare that you wish to remove \fIfiles\fP from
1464the source repository. Like most
1465.B cvs
1466commands,
1467.` "cvs remove"
1468works on files in your working
1469directory, not directly on the repository. As a safeguard, it also
1470requires that you first erase the specified files from your working
1471directory.
1472.SP
1473The files are not actually removed until you apply your changes to the
1474repository with
1475.BR commit ;
1476at that point, the corresponding
1477.SM RCS
1478files in the source repository are
1479.I moved
1480into the
1481.` "Attic"
1482directory (also within the source repository).
1483.SP
1484This command is recursive by default, scheduing all physically removed
1485files that it finds for removal by the next
1486.BR commit .
1487Use the
1488.B \-l
1489option to avoid this recursion, or just specify that actual files that you
1490wish remove to consider.
1491.TP
1492\fBrtag\fP [\fB\-f\|alnRQq\fP] [\fB\-b\fP] [\fB\-d\fP] [\fB\-r\fP \fItag\fP | \fB\-D\fP \fIdate\fP] \fIsymbolic_tag\fP \fImodules\|.\|.\|.\fP
1493.I Requires:
1494repository.
1495.br
1496.I Changes:
1497repository.
1498.br
1499.I Synonym:
1500.B rfreeze
1501.br
1502You can use this command to assign symbolic tags to particular,
1503explicitly specified source versions in the repository.
1504.` "cvs rtag"
1505works directly on the repository contents (and requires no
1506prior
1507.BR checkout ).
1508Use
1509.` "cvs tag"
1510instead, to base the selection of
1511versions to tag on the contents of your working directory.
1512.SP
1513In general, tags (often the symbolic names of software distributions)
1514should not be removed, but the
1515.B \-d
1516option is available as a means to remove completely obsolete symbolic names
1517if necessary (as might be the case for an Alpha release, say).
1518.SP
1519The \fB-b\fP option makes the tag a ``branch'' tag, allowing
1520concurrent, isolated development.
1521This is most useful for creating a patch to a previously released software
1522distribution.
1523.SP
1524You can use the standard \fB\-r\fP and \fB\-D\fP options to tag only those
1525files that already contain a certain tag. This method would be used
1526to rename a tag: tag only the files identified by the old tag, then delete the
1527old tag, leaving the new tag on exactly the same files as the old tag.
1528.SP
1529.B rtag
1530executes recursively by default, tagging all subdirectories of
1531\fImodules\fP you specify in the argument. You can restrict its
1532operation to top-level directories with the standard \fB\-l\fP option;
1533or you can explicitly request recursion with \fB\-R\fP.
1534.SP
1535The modules database can specify a program to execute whenever a tag
1536is specified; a typical use is to send electronic mail to a group of
1537interested parties. If you want to bypass that program, use the
1538standard \fB\-n\fP option.
1539.SP
1540The standard options \fB\-Q\fP and \fB\-q\fP are also available with
1541this command.
1542.SP
1543Use the
1544.B \-a
1545option to have
1546.B rtag
1547look in the
1548.` "Attic"
1549for removed files that contin the specified tag.
1550The tag is removed from these files, which makes it convenient to re-use a
1551symbolic tag as development continues (and files get removed from the
1552up-coming distribution).
1553.TP
1554\fBstatus\fP [\fB\-lR\fP] [\fB\-v\fP] [\fIfiles\fP\|.\|.\|.]
1555.I Requires:
1556working directory, repository.
1557.br
1558.I Changes:
1559nothing.
1560.br
1561Display a brief report on the current status of \fIfiles\fP with
1562respect to the source repository, including any ``sticky'' tags,
1563dates, or \fB\-k\fP options. (``Sticky'' options will restrict how
1564.` "cvs update"
1565operates until you reset them; see the
1566description of
1567.` "cvs update \-A\|.\|.\|.".)
1568.SP
1569You can also use this command to anticipate the potential impact of a
1570.` "cvs update"
1571on your working source directory. If you do
1572not specify any \fIfiles\fP explicitly, reports are shown for all
1573files that \fBcvs\fP has placed in your working directory. You can
1574limit the scope of this search to the current directory itself (not
1575its subdirectories) with the standard \fB\-l\fP option flag; or you
1576can explicitly request recursive status reports with the \fB\-R\fP
1577option.
1578.SP
1579The
1580.B \-v
1581option causes the symbolic tags for the
1582.SM RCS
1583file to be displayed as well.
1584.TP
1585\fBtag\fP [\fB\-lQqR\fP] [\fB\-b\fP] [\fB\-d\fP] \fIsymbolic_tag\fP [\fIfiles\fP\|.\|.\|.\|]
1586.I Requires:
1587working directory, repository.
1588.br
1589.I Changes:
1590repository.
1591.br
1592.I Synonym:
1593.B freeze
1594.br
1595Use this command to assign symbolic tags to the nearest repository
1596versions to your working sources. The tags are applied immediately to
1597the repository, as with \fBrtag\fP, but the versions are supplied
1598implicitly by the \fBcvs\fP records of your working files' history
1599rather than applied explicitly.
1600.SP
1601One use for tags is to record a ``snapshot'' of the current sources
1602when the software freeze date of a project arrives. As bugs are fixed
1603after the freeze date, only those changed sources that are to be part
1604of the release need be re-tagged.
1605.SP
1606The symbolic tags are meant to permanently record which revisions of which
1607files were used in creating a software distribution.
1608The
1609.B checkout
1610and
1611.B update
1612commands allow you to extract an exact copy of a tagged release at any time in
1613the future, regardless of whether files have been changed, added, or removed
1614since the release was tagged.
1615.SP
1616If you use
1617.` "cvs tag \-d \fIsymbolic_tag\fP\|.\|.\|.",
1618the
1619symbolic tag you specify is
1620.I deleted
1621instead of being added. \fIWarning\fP: Be very certain of your ground
1622before you delete a tag; doing this effectively discards some
1623historical information, which may later turn out to have been valuable.
1624.SP
1625The \fB-b\fP option makes the tag a ``branch'' tag, allowing
1626concurrent, isolated development.
1627This is most useful for creating a patch to a previously released software
1628distribution.
1629.SP
1630Normally,
1631.B tag
1632executes recursively through subdirectories; you can prevent this by
1633using the standard \fB\-l\fP option, or specify the recursion
1634explicitly by using \fB\-R\fP.
1635.TP
1636\fBupdate\fP [\fB\-Adf\|lPpQqR\fP] [\fB\-d\fP] [\fB\-r\fP \fItag\fP|\fB\-D\fP \fIdate\fP] \fIfiles\|.\|.\|.\fP
1637.I Requires:
1638repository, working directory.
1639.br
1640.I Changes:
1641working directory.
1642.br
1643After you've run
1644.B checkout
1645to create your private copy of source from the common repository,
1646other developers will continue changing the central source. From time
1647to time, when it is convenient in your development process, you can
1648use the
1649.B update
1650command
1651from within your working directory to reconcile your work with any
1652revisions applied to the source repository since your last
1653.B checkout
1654or
1655.BR update .
1656.SP
1657.B update
1658keeps you informed of its progress by printing a line for each file,
1659prefaced with one of the characters
1660.` "U A R M C ?"
1661to indicate the status of the file:
1662.TP 1i
1663\fBU\fP \fIfile\fP
1664The file was brought \fIup to date\fP with respect to the repository.
1665This is done for any file that exists in the repository but not in
1666your source, and for files that you haven't changed but are not the most
1667recent versions available in the repository.
1668.TP 1i
1669\fBA\fP \fIfile\fP
1670The file has been \fIadded\fP to your private copy of the sources, and
1671will be added to the
1672.SM RCS
1673source repository when you run
1674.` "cvs commit"
1675on the file.
1676This is a reminder to you that the file needs to be committed.
1677.TP 1i
1678\fBR\fP \fIfile\fP
1679The file has been \fIremoved\fP from your private copy of the sources, and
1680will be removed from the
1681.SM RCS
1682source repository when you run
1683.` "cvs commit"
1684on the file.
1685This is a reminder to you that the file needs to be committed.
1686.TP 1i
1687\fBM\fP \fIfile\fP
1688The file is \fImodified\fP in your working directory.
1689.` "M"
1690can indicate one of two states for a file you're working on: either
1691there were no modifications to the same file in the repository, so
1692that your file remains as you last saw it; or there were modifications
1693in the repository as well as in your copy, but they were
1694\fImerged\fP successfully, without conflict, in your working
1695directory.
1696.TP 1i
1697\fBC\fP \fIfile\fP
1698A \fIconflict\fP was detected while trying to merge your changes to
1699\fIfile\fP with changes from the source repository. \fIfile\fP (the
1700copy in your working directory) is now the output of the
1701.BR rcsmerge ( 1 )
1702command on the two versions; an unmodified copy of your file is also
1703in your working directory, with the name `\fB.#\fP\fIfile\fP\fB.\fP\fIversion\fP',
1704where
1705.I version
1706is the
1707.SM RCS
1708revision that your modified file started from.
1709(Note that some systems automatically purge files that begin with
1710\&
1711.` ".#"
1712if they have not been accessed for a few days.
1713If you intend to keep a copy of your original file, it is a very good
1714idea to rename it.)
1715.TP 1i
1716\fB?\fP \fIfile\fP
1717\fIfile\fP is in your working directory, but does not correspond to
1718anything in the source repository, and is not in the list of files
1719for \fBcvs\fP to ignore (see the description of the \fB\-I\fP option).
1720.PP
1721.RS .5i
1722.SP
1723Use the
1724.B \-A
1725option to reset any sticky tags, dates, or
1726.B \-k
1727options. (If you get a working copy of a file by using one of the
1728\fB\-r\fP, \fB\-D\fP, or \fB\-k\fP options, \fBcvs\fP remembers the
1729corresponding tag, date, or \fIkflag\fP and continues using it on
1730future updates; use the \fB\-A\fP option to make \fBcvs\fP forget these
1731specifications, and retrieve the ``head'' version of the file).
1732.SP
1733The \fB\-j\fP\fIbranch\fP option
1734merges the changes made between the
1735resulting revision and the revision that it is based on (e.g., if
1736the tag refers to a branch,
1737.B cvs
1738will merge all changes made in
1739that branch into your working file).
1740.SP
1741With two \fB-j\fP options,
1742.B cvs
1743will merge in the changes between the two respective revisions.
1744This can be used to ``remove'' a certain delta from your working file.
1745E.g., If the file foo.c is based on
1746revision 1.6 and I want to remove the changes made between 1.3 and
17471.5, I might do:
1748.SP
1749.in +1i
1750.ft B
1751.nf
1752example% cvs update -j1.5 -j1.3 foo.c # note the order...
1753.fi
1754.ft P
1755.in -1i
1756.SP
1757In addition, each \fB-j\fP option can contain on optional date
1758specification which, when used with branches, can limit the chosen
1759revision to one within a specific date.
1760An optional date is specified by adding a colon (:) to the tag.
1761.SP
1762.in +1i
1763.ft B
1764.nf
1765-jSymbolic_Tag:Date_Specifier
1766.fi
1767.ft P
1768.in -1i
1769.SP
1770Use the
1771.B \-d
1772option to create any directories that exist in the repository if they're
1773missing from the working directory. (Normally, update acts only on
1774directories and files that were already enrolled in your
1775working directory.) This is useful for updating directories
1776that were created in the repository since the initial
1777\fBcheckout\fP; but it has an unfortunate side effect. If you
1778deliberately avoided certain directories in the repository when you
1779created your working directory (either through use of a module name or by
1780listing explicitly the files and directories you wanted on the
1781command line), then updating with
1782.B \-d
1783will create those directories, which may not be what you want.
1784.SP
1785Use \fB\-I\fP \fIname\fP to ignore files whose names match \fIname\fP
1786(in your working directory) during the update. You can specify
1787\fB\-I\fP more than once on the command line to specify several files
1788to ignore. By default,
1789\fBupdate\fP ignores files whose names match any of the following:
1790.SP
1791.in +1i
1792.ft B
1793.nf
1794RCSLOG RCS SCCS
1795CVS* cvslog.*
1796tags TAGS
1797\&.make.state .nse_depinfo
1798*~ #* .#* ,*
1799*.old *.bak *.orig *.rej .del\-*
1800*.a *.o *.Z *.elc *.ln core
1801.fi
1802.ft P
1803.in -1i
1804.SP
1805Use
1806.` "\-I !"
1807to avoid ignoring any files at all.
1808.SP
1809The standard \fBcvs\fP command options \fB\-f\fP, \fB\-k\fP,
1810\fB\-l\fP, \fB\-P\fP, \fB\-p\fP, \fB\-Q\fP, \fB\-q\fP, and \fB\-r\fP
1811are also available with \fBupdate\fP.
1812.RE
1813.SH "FILES"
1814For more detailed information on
1815.B cvs
1816supporting files, see
1817.BR cvs ( 5 ).
1818.LP
1819.I
1820Files in working directories:
1821.TP
1822CVS
1823A directory of \fBcvs\fP administrative files.
1824.I
1825Do not delete.
1826.TP
1827CVS/Entries
1828List and status of files in your working directory.
1829.TP
1830CVS/Entries.Backup
1831A backup of
1832.` "CVS/Entries".
1833.TP
1834CVS/Entries.Static
1835Flag: do not add more entries on
1836.` "cvs update".
1837.TP
1838CVS/Repository
1839Pathname to the corresponding directory in the source repository.
1840.TP
1841CVS/Tag
1842Contains the per-directory ``sticky'' tag or date information.
1843This file is created/updated when you specify
1844.B \-r
1845or
1846.B \-D
1847to the
1848.B checkout
1849or
1850.B update
1851commands, and no files are specified.
1852.TP
1853CVS/Checkin.prog
1854Name of program to run on
1855.` "cvs commit".
1856.TP
1857CVS/Update.prog
1858Name of program to run on
1859.` "cvs update".
1860.LP
1861.I
1862Files in source repositories:
1863.TP
1864$CVSROOT/CVSROOT
1865Directory of global administrative files for repository.
1866.TP
1867CVSROOT/commitinfo,v
1868Records programs for filtering
1869.` "cvs commit"
1870requests.
1871.TP
1872CVSROOT/history
1873Log file of \fBcvs\fP transactions.
1874.TP
1875CVSROOT/modules,v
1876Definitions for modules in this repository.
1877.TP
1878CVSROOT/loginfo,v
1879Records programs for piping
1880.` "cvs commit"
1881log entries.
1882.TP
1883CVSROOT/rcsinfo,v
1884Records pathnames to templates used dueing a
1885.` "cvs commit"
1886operation.
1887.TP
1888CVSROOT/editinfo,v
1889Records programs for editing/validating
1890.` "cvs commit"
1891log entries.
1892.TP
1893Attic
1894Directory for removed source files.
1895.TP
1896#cvs.lock
1897A lock directory created by
1898.B cvs
1899when doing sensitive changes to the
1900.SM RCS
1901source repository.
1902.TP
1903#cvs.tfl.\fIpid\fP
1904Temporary lock file for repository.
1905.TP
1906#cvs.rfl.\fIpid\fP
1907A read lock.
1908.TP
1909#cvs.wfl.\fIpid\fP
1910A write lock.
1911.SH "ENVIRONMENT VARIABLES"
1912.TP
1913.SM CVSROOT
1914Should contain the full pathname to the root of the
1915.B cvs
1916source repository (where the
1917.SM RCS
1918files are kept). This information must be available to \fBcvs\fP for
1919most commands to execute; if
1920.SM CVSROOT
1921is not set, or if you wish to override it for one invocation, you can
1922supply it on the command line:
1923.` "cvs \-d \fIcvsroot cvs_command\fP\|.\|.\|."
1924You may not need to set
1925.SM CVSROOT
1926if your \fBcvs\fP binary has the right path compiled in; use
1927.` "cvs \-v"
1928to display all compiled-in paths.
1929.TP
1930.SM CVSREAD
1931If this is set,
1932.B checkout
1933and
1934.B update
1935will try hard to make the files in your working directory read-only.
1936When this is not set, the default behavior is to permit modification
1937of your working files.
1938.TP
1939.SM RCSBIN
1940Specifies the full pathname where to find
1941.SM RCS
1942programs, such as
1943.BR co ( 1 )
1944and
1945.BR ci ( 1 ).
1946If not set, a compiled-in value is used; see the display from
1947.` "cvs \-v".
1948.TP
1949.SM EDITOR
1950Specifies the program to use for recording log messages during
1951.BR commit .
1952If not set, the default is
1953.BR /usr/ucb/vi .
1954.SH "AUTHORS"
1955.TP
1956Dick Grune
1957Original author of the
1958.B cvs
1959shell script version posted to
1960.B comp.sources.unix
1961in the volume6 release of December, 1986.
1962Credited with much of the
1963.B cvs
1964conflict resolution algorithms.
1965.TP
1966Brian Berliner
1967Coder and designer of the
1968.B cvs
1969program itself in April, 1989, based on the original work done by Dick.
1970.TP
1971Jeff Polk
1972Helped Brian with the design of the
1973.B cvs
1974module and vendor branch support and author of the
1975.BR checkin ( 1 )
1976shell script (the ancestor of
1977.` "cvs import").
1978.SH "SEE ALSO"
1979.BR ci ( 1 ),
1980.BR co ( 1 ),
1981.BR cvs ( 5 ),
1982.BR diff ( 1 ),
1983.BR grep ( 1 ),
1984.BR mkmodules ( 1 ),
1985.BR patch ( 1 ),
1986.BR rcs ( 1 ),
1987.BR rcsdiff ( 1 ),
1988.BR rcsmerge ( 1 ),
1989.BR rlog ( 1 ),
1990.BR rm ( 1 ),
1991.BR sort ( 1 ).