]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/cvs/doc/cvs.1
merge fix for boot-time hang on centos' xen
[FreeBSD/FreeBSD.git] / contrib / cvs / doc / cvs.1
1 .\" This is the man page for CVS.  It is auto-generated from the
2 .\" cvs.man.header, cvs.texinfo, & cvs.man.footer files.  Please make changes
3 .\" there.  A full copyright & license notice may also be found in cvs.texinfo.
4 .\"
5 .\" Copyright 2004 The Free Software Foundation,
6 .\"                Derek R. Price,
7 .\"                & Ximbiot <http://ximbiot.com>
8 .\"
9 .\" This documentation is free software; you can redistribute it and/or modify
10 .\" it under the terms of the GNU General Public License as published by
11 .\" the Free Software Foundation; either version 2, or (at your option)
12 .\" any later version.
13 .\"
14 .\" This documentation is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public License
20 .\" along with this documentation; if not, write to the Free Software
21 .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 .de Id
23 .ds Rv \\$3
24 .ds Dt \\$4
25 ..
26 .TH CVS 1 "\*(Dt"
27 .\" Full space in nroff; half space in troff
28 .de SP
29 .if n .sp
30 .if t .sp .5
31 ..
32 .\" quoted command
33 .de `
34 .RB ` "\|\\$1\|" '\\$2
35 ..
36 .SH "NAME"
37 cvs \- Concurrent Versions System
38 .SH "SYNOPSIS"
39 .TP
40 \fBcvs\fP [ \fIcvs_options\fP ]
41 .I cvs_command
42 [
43 .I command_options
44 ] [
45 .I command_args
46 ]
47 .SH "NOTE"
48 .IX "revision control system" "\fLcvs\fR"
49 .IX  cvs  ""  "\fLcvs\fP \- concurrent versions system"
50 .IX  "concurrent versions system \- \fLcvs\fP"
51 .IX  "release control system"  "cvs command"  ""  "\fLcvs\fP \- concurrent versions system"
52 .IX  "source control system"  "cvs command"  ""  "\fLcvs\fP \- concurrent versions system"
53 .IX  revisions  "cvs command"  ""  "\fLcvs\fP \- source control"
54 This manpage is a summary of some of the features of
55 \fBcvs\fP.  It is auto-generated from an appendix of the CVS manual.
56 For more in-depth documentation, please consult the
57 Cederqvist manual (via the
58 .B info CVS
59 command or otherwise,
60 as described in the SEE ALSO section of this manpage).  Cross-references
61 in this man page refer to nodes in the same.
62 .SH "CVS commands"
63 .SS "Guide to CVS commands"
64 .SP
65 This appendix describes the overall structure of
66 \fBcvs\fR commands, and describes some commands in
67 detail (others are described elsewhere; for a quick
68 reference to \fBcvs\fR commands, see node `Invoking CVS\(aq in the CVS manual).
69 .SP
70 .SH "Structure"
71 .SS "Overall structure of CVS commands"
72 .IX "Structure"
73 .IX "CVS command structure"
74 .IX "Command structure"
75 .IX "Format of CVS commands"
76 .SP
77 The overall format of all \fBcvs\fR commands is:
78 .SP
79 .PD 0
80 .SP
81 .IP "" 2
82 cvs [ cvs_options ] cvs_command [ command_options ] [ command_args ]
83
84 .PD
85 .IP "" 0
86 .SP
87 .IP "" 0
88 \fBcvs\fR
89 .IP "" 2
90 The name of the \fBcvs\fR program.
91 .SP
92 .IP "" 0
93 \fBcvs_options\fR
94 .IP "" 2
95 Some options that affect all sub-commands of \fBcvs\fR.  These are
96 described below.
97 .SP
98 .IP "" 0
99 \fBcvs_command\fR
100 .IP "" 2
101 One of several different sub-commands.  Some of the commands have
102 aliases that can be used instead; those aliases are noted in the
103 reference manual for that command.  There are only two situations
104 where you may omit \fBcvs_command\fR: \fBcvs -H\fR elicits a
105 list of available commands, and \fBcvs -v\fR displays version
106 information on \fBcvs\fR itself.
107 .SP
108 .IP "" 0
109 \fBcommand_options\fR
110 .IP "" 2
111 Options that are specific for the command.
112 .SP
113 .IP "" 0
114 \fBcommand_args\fR
115 .IP "" 2
116 Arguments to the commands.
117 .SP
118 There is unfortunately some confusion between
119 \fBcvs_options\fR and \fBcommand_options\fR.
120 When given as a \fBcvs_option\fR, some options only
121 affect some of the commands.  When given as a
122 \fBcommand_option\fR it may have a different meaning, and
123 be accepted by more commands.  In other words, do not
124 take the above categorization too seriously.  Look at
125 the documentation instead.
126 .SP
127 .SH "Exit status"
128 .SS "CVS\(aqs exit status"
129 .IX "Exit status, of CVS"
130 .SP
131 \fBcvs\fR can indicate to the calling environment whether it
132 succeeded or failed by setting its \fIexit status\fR.
133 The exact way of testing the exit status will vary from
134 one operating system to another.  For example in a unix
135 shell script the \fB$?\fR variable will be 0 if the
136 last command returned a successful exit status, or
137 greater than 0 if the exit status indicated failure.
138 .SP
139 If \fBcvs\fR is successful, it returns a successful status;
140 if there is an error, it prints an error message and
141 returns a failure status.  The one exception to this is
142 the \fBcvs diff\fR command.  It will return a
143 successful status if it found no differences, or a
144 failure status if there were differences or if there
145 was an error.  Because this behavior provides no good
146 way to detect errors, in the future it is possible that
147 \fBcvs diff\fR will be changed to behave like the
148 other \fBcvs\fR commands.
149 .SP
150 .SH "~/.cvsrc"
151 .SS "Default options and the ~/.cvsrc file"
152 .IX "\&.cvsrc file"
153 .IX "Option defaults"
154 .SP
155 There are some \fBcommand_options\fR that are used so
156 often that you might have set up an alias or some other
157 means to make sure you always specify that option.  One
158 example (the one that drove the implementation of the
159 \fB.cvsrc\fR support, actually) is that many people find the
160 default output of the \fBdiff\fR command to be very
161 hard to read, and that either context diffs or unidiffs
162 are much easier to understand.
163 .SP
164 The \fB~/.cvsrc\fR file is a way that you can add
165 default options to \fBcvs_commands\fR within cvs,
166 instead of relying on aliases or other shell scripts.
167 .SP
168 The format of the \fB~/.cvsrc\fR file is simple.  The
169 file is searched for a line that begins with the same
170 name as the \fBcvs_command\fR being executed.  If a
171 match is found, then the remainder of the line is split
172 up (at whitespace characters) into separate options and
173 added to the command arguments \fIbefore\fR any
174 options from the command line.
175 .SP
176 If a command has two names (e.g., \fBcheckout\fR and
177 \fBco\fR), the official name, not necessarily the one
178 used on the command line, will be used to match against
179 the file.  So if this is the contents of the user\(aqs
180 \fB~/.cvsrc\fR file:
181 .SP
182 .PD 0
183 .SP
184 .IP "" 2
185 log -N
186 .IP "" 2
187 diff -uN
188 .IP "" 2
189 rdiff -u
190 .IP "" 2
191 update -Pd
192 .IP "" 2
193 checkout -P
194 .IP "" 2
195 release -d
196
197 .PD
198 .IP "" 0
199 .SP
200 the command \fBcvs checkout foo\fR would have the
201 \fB-P\fR option added to the arguments, as well as
202 \fBcvs co foo\fR.
203 .SP
204 With the example file above, the output from \fBcvs
205 diff foobar\fR will be in unidiff format.  \fBcvs diff
206 -c foobar\fR will provide context diffs, as usual.
207 Getting "old" format diffs would be slightly more
208 complicated, because \fBdiff\fR doesn\(aqt have an option
209 to specify use of the "old" format, so you would need
210 \fBcvs -f diff foobar\fR.
211 .SP
212 In place of the command name you can use \fBcvs\fR to
213 specify global options (see node `Global options\(aq in the CVS manual).  For
214 example the following line in \fB.cvsrc\fR
215 .SP
216 .PD 0
217 .SP
218 .IP "" 2
219 cvs -z6
220
221 .PD
222 .IP "" 0
223 .SP
224 causes \fBcvs\fR to use compression level 6.
225 .SP
226 .SH "Global options"
227 .IX "Options, global"
228 .IX "Global options"
229 .IX "Left-hand options"
230 .SP
231 The available \fBcvs_options\fR (that are given to the
232 left of \fBcvs_command\fR) are:
233 .SP
234 .IP "" 0
235 \fB--allow-root=\fIrootdir\fB\fR
236 .IP "" 2
237 Specify legal \fBcvsroot\fR directory.  See
238 see node `Password authentication server\(aq in the CVS manual.
239 .SP
240 .IX "Authentication, stream"
241 .IX "Stream authentication"
242 .IP "" 0
243 \fB-a\fR
244 .IP "" 2
245 Authenticate all communication between the client and
246 the server.  Only has an effect on the \fBcvs\fR client.
247 As of this writing, this is only implemented when using
248 a GSSAPI connection (see node `GSSAPI authenticated\(aq in the CVS manual).
249 Authentication prevents certain sorts of attacks
250 involving hijacking the active \fBtcp\fR connection.
251 Enabling authentication does not enable encryption.
252 .SP
253 .IX "RCSBIN, overriding"
254 .IX "Overriding RCSBIN"
255 .IP "" 0
256 \fB-b \fIbindir\fB\fR
257 .IP "" 2
258 In \fBcvs\fR 1.9.18 and older, this specified that
259 \fBrcs\fR programs are in the \fIbindir\fR directory.
260 Current versions of \fBcvs\fR do not run \fBrcs\fR
261 programs; for compatibility this option is accepted,
262 but it does nothing.
263 .SP
264 .IX "TMPDIR, overriding"
265 .IX "Overriding TMPDIR"
266 .IP "" 0
267 \fB-T \fItempdir\fB\fR
268 .IP "" 2
269 Use \fItempdir\fR as the directory where temporary files are
270 located.  Overrides the setting of the \fB$TMPDIR\fR environment
271 variable and any precompiled directory.  This parameter should be
272 specified as an absolute pathname.
273 (When running client/server, \fB-T\fR affects only the local process;
274 specifying \fB-T\fR for the client has no effect on the server and
275 vice versa.)
276 .SP
277 .IX "CVSROOT, overriding"
278 .IX "Overriding CVSROOT"
279 .IP "" 0
280 \fB-d \fIcvs_root_directory\fB\fR
281 .IP "" 2
282 Use \fIcvs_root_directory\fR as the root directory
283 pathname of the repository.  Overrides the setting of
284 the \fB$CVSROOT\fR environment variable.  see node `Repository\(aq in the CVS manual.
285 .SP
286 .IX "EDITOR, overriding"
287 .IX "Overriding EDITOR"
288 .IP "" 0
289 \fB-e \fIeditor\fB\fR
290 .IP "" 2
291 Use \fIeditor\fR to enter revision log information.  Overrides the
292 setting of the \fB$CVSEDITOR\fR and \fB$EDITOR\fR
293 environment variables.  For more information, see
294 see node `Committing your changes\(aq in the CVS manual.
295 .SP
296 .IP "" 0
297 \fB-f\fR
298 .IP "" 2
299 Do not read the \fB~/.cvsrc\fR file.  This
300 option is most often used because of the
301 non-orthogonality of the \fBcvs\fR option set.  For
302 example, the \fBcvs log\fR option \fB-N\fR (turn off
303 display of tag names) does not have a corresponding
304 option to turn the display on.  So if you have
305 \fB-N\fR in the \fB~/.cvsrc\fR entry for \fBlog\fR,
306 you may need to use \fB-f\fR to show the tag names.
307 .SP
308 .IP "" 0
309 \fB-H\fR
310 .IP "" 2
311 .IP "" 0
312 \fB--help\fR
313 .IP "" 2
314 Display usage information about the specified \fBcvs_command\fR
315 (but do not actually execute the command).  If you don\(aqt specify
316 a command name, \fBcvs -H\fR displays overall help for
317 \fBcvs\fR, including a list of other help options.
318 .SP
319 .IX "Read-only mode"
320 .IP "" 0
321 \fB-n\fR
322 .IP "" 2
323 Do not change any files.  Attempt to execute the
324 \fBcvs_command\fR, but only to issue reports; do not remove,
325 update, or merge any existing files, or create any new files.
326 .SP
327 Note that \fBcvs\fR will not necessarily produce exactly
328 the same output as without \fB-n\fR.  In some cases
329 the output will be the same, but in other cases
330 \fBcvs\fR will skip some of the processing that would
331 have been required to produce the exact same output.
332 .SP
333 .IP "" 0
334 \fB-Q\fR
335 .IP "" 2
336 Cause the command to be really quiet; the command will only
337 generate output for serious problems.
338 .SP
339 .IP "" 0
340 \fB-q\fR
341 .IP "" 2
342 Cause the command to be somewhat quiet; informational messages,
343 such as reports of recursion through subdirectories, are
344 suppressed.
345 .SP
346 .IX "Read-only files, and -r"
347 .IP "" 0
348 \fB-r\fR
349 .IP "" 2
350 Make new working files read-only.  Same effect
351 as if the \fB$CVSREAD\fR environment variable is set
352 (see node `Environment variables\(aq in the CVS manual).  The default is to
353 make working files writable, unless watches are on
354 (see node `Watches\(aq in the CVS manual).
355 .SP
356 .IP "" 0
357 \fB-s \fIvariable\fB=\fIvalue\fB\fR
358 .IP "" 2
359 Set a user variable (see node `Variables\(aq in the CVS manual).
360 .SP
361 .IX "Trace"
362 .IP "" 0
363 \fB-t\fR
364 .IP "" 2
365 Trace program execution; display messages showing the steps of
366 \fBcvs\fR activity.  Particularly useful with \fB-n\fR to explore the
367 potential impact of an unfamiliar command.
368 .SP
369 .IP "" 0
370 \fB-v\fR
371 .IP "" 2
372 .IP "" 0
373 \fB--version\fR
374 .IP "" 2
375 Display version and copyright information for \fBcvs\fR.
376 .SP
377 .IX "CVSREAD, overriding"
378 .IX "Overriding CVSREAD"
379 .IP "" 0
380 \fB-w\fR
381 .IP "" 2
382 Make new working files read-write.  Overrides the
383 setting of the \fB$CVSREAD\fR environment variable.
384 Files are created read-write by default, unless \fB$CVSREAD\fR is
385 set or \fB-r\fR is given.
386 .SP
387 .IP "" 0
388 \fB-x\fR
389 .IP "" 2
390 .IX "Encryption"
391 Encrypt all communication between the client and the
392 server.  Only has an effect on the \fBcvs\fR client.  As
393 of this writing, this is only implemented when using a
394 GSSAPI connection (see node `GSSAPI authenticated\(aq in the CVS manual) or a
395 Kerberos connection (see node `Kerberos authenticated\(aq in the CVS manual).
396 Enabling encryption implies that message traffic is
397 also authenticated.  Encryption support is not
398 available by default; it must be enabled using a
399 special configure option, \fB--enable-encryption\fR,
400 when you build \fBcvs\fR.
401 .SP
402 .IP "" 0
403 \fB-z \fIgzip-level\fB\fR
404 .IP "" 2
405 .IX "Compression"
406 .IX "Gzip"
407 Set the compression level.
408 Valid levels are 1 (high speed, low compression) to
409 9 (low speed, high compression), or 0 to disable
410 compression (the default).
411 Only has an effect on the \fBcvs\fR client.
412 .SP
413 .SP
414 .SH "Common options"
415 .SS "Common command options"
416 .IX "Common options"
417 .IX "Right-hand options"
418 .SP
419 This section describes the \fBcommand_options\fR that
420 are available across several \fBcvs\fR commands.  These
421 options are always given to the right of
422 \fBcvs_command\fR. Not all
423 commands support all of these options; each option is
424 only supported for commands where it makes sense.
425 However, when a command has one of these options you
426 can almost always count on the same behavior of the
427 option as in other commands.  (Other command options,
428 which are listed with the individual commands, may have
429 different behavior from one \fBcvs\fR command to the other).
430 .SP
431 \fBNote: the \fBhistory\fB command is an exception; it supports
432 many options that conflict even with these standard options.\fR
433 .SP
434 .IX "Dates"
435 .IX "Time"
436 .IX "Specifying dates"
437 .IP "" 0
438 \fB-D \fIdate_spec\fB\fR
439 .IP "" 2
440 Use the most recent revision no later than \fIdate_spec\fR.
441 \fIdate_spec\fR is a single argument, a date description
442 specifying a date in the past.
443 .SP
444 The specification is \fIsticky\fR when you use it to make a
445 private copy of a source file; that is, when you get a working
446 file using \fB-D\fR, \fBcvs\fR records the date you specified, so that
447 further updates in the same directory will use the same date
448 (for more information on sticky tags/dates, see node `Sticky tags\(aq in the CVS manual).
449 .SP
450 \fB-D\fR is available with the \fBannotate\fR, \fBcheckout\fR,
451 \fBdiff\fR, \fBexport\fR, \fBhistory\fR,
452 \fBrdiff\fR, \fBrtag\fR, and \fBupdate\fR commands.
453 (The \fBhistory\fR command uses this option in a
454 slightly different way; see node `history options\(aq in the CVS manual).
455 .SP
456 .IX "Timezone, in input"
457 .IX "Zone, time, in input"
458 A wide variety of date formats are supported by
459 \fBcvs\fR.  The most standard ones are ISO8601 (from the
460 International Standards Organization) and the Internet
461 e-mail standard (specified in RFC822 as amended by
462 RFC1123).
463 .SP
464 ISO8601 dates have many variants but a few examples
465 are:
466 .SP
467 .PD 0
468 .SP
469 .IP "" 4
470 1972-09-24
471 .IP "" 4
472 1972-09-24 20:05
473
474 .PD
475 .IP "" 2
476 .SP
477 There are a lot more ISO8601 date formats, and \fBcvs\fR
478 accepts many of them, but you probably don\(aqt want to
479 hear the \fIwhole\fR long story :-).
480 .SP
481 In addition to the dates allowed in Internet e-mail
482 itself, \fBcvs\fR also allows some of the fields to be
483 omitted.  For example:
484 .SP
485 .PD 0
486 .SP
487 .IP "" 4
488 24 Sep 1972 20:05
489 .IP "" 4
490 24 Sep
491
492 .PD
493 .IP "" 2
494 .SP
495 The date is interpreted as being in the
496 local timezone, unless a specific timezone is
497 specified.
498 .SP
499 These two date formats are preferred.  However,
500 \fBcvs\fR currently accepts a wide variety of other date
501 formats.  They are intentionally not documented here in
502 any detail, and future versions of \fBcvs\fR might not
503 accept all of them.
504 .SP
505 One such format is
506 \fB\fImonth\fB/\fIday\fB/\fIyear\fB\fR.  This may
507 confuse people who are accustomed to having the month
508 and day in the other order; \fB1/4/96\fR is January 4,
509 not April 1.
510 .SP
511 Remember to quote the argument to the \fB-D\fR
512 flag so that your shell doesn\(aqt interpret spaces as
513 argument separators.  A command using the \fB-D\fR
514 flag can look like this:
515 .SP
516 .PD 0
517 .SP
518 .IP "" 4
519 $ cvs diff -D "1 hour ago" cvs.texinfo
520
521 .PD
522 .IP "" 2
523 .SP
524 .IX "Forcing a tag match"
525 .IP "" 0
526 \fB-f\fR
527 .IP "" 2
528 When you specify a particular date or tag to \fBcvs\fR commands, they
529 normally ignore files that do not contain the tag (or did not
530 exist prior to the date) that you specified.  Use the \fB-f\fR option
531 if you want files retrieved even when there is no match for the
532 tag or date.  (The most recent revision of the file
533 will be used).
534 .SP
535 Note that even with \fB-f\fR, a tag that you specify
536 must exist (that is, in some file, not necessary in
537 every file).  This is so that \fBcvs\fR will continue to
538 give an error if you mistype a tag name.
539 .SP
540 \fB-f\fR is available with these commands:
541 \fBannotate\fR, \fBcheckout\fR, \fBexport\fR,
542 \fBrdiff\fR, \fBrtag\fR, and \fBupdate\fR.
543 .SP
544 \fBWARNING:  The \fBcommit\fB and \fBremove\fB
545 commands also have a
546 \fB-f\fB option, but it has a different behavior for
547 those commands.  See see node `commit options\(aq in the CVS manual, and
548 see node `Removing files\(aq in the CVS manual.\fR
549 .SP
550 .IP "" 0
551 \fB-k \fIkflag\fB\fR
552 .IP "" 2
553 Alter the default processing of keywords.
554 see node `Keyword substitution\(aq in the CVS manual, for the meaning of
555 \fIkflag\fR.  Your \fIkflag\fR specification is
556 \fIsticky\fR when you use it to create a private copy
557 of a source file; that is, when you use this option
558 with the \fBcheckout\fR or \fBupdate\fR commands,
559 \fBcvs\fR associates your selected \fIkflag\fR with the
560 file, and continues to use it with future update
561 commands on the same file until you specify otherwise.
562 .SP
563 The \fB-k\fR option is available with the \fBadd\fR,
564 \fBcheckout\fR, \fBdiff\fR, \fBimport\fR and
565 \fBupdate\fR commands.
566 .SP
567 .IP "" 0
568 \fB-l\fR
569 .IP "" 2
570 Local; run only in current working directory, rather than
571 recursing through subdirectories.
572 .SP
573 Available with the following commands: \fBannotate\fR, \fBcheckout\fR,
574 \fBcommit\fR, \fBdiff\fR, \fBedit\fR, \fBeditors\fR, \fBexport\fR,
575 \fBlog\fR, \fBrdiff\fR, \fBremove\fR, \fBrtag\fR,
576 \fBstatus\fR, \fBtag\fR, \fBunedit\fR, \fBupdate\fR, \fBwatch\fR,
577 and \fBwatchers\fR.
578 .SP
579 .IX "Editor, avoiding invocation of"
580 .IX "Avoiding editor invocation"
581 .IP "" 0
582 \fB-m \fImessage\fB\fR
583 .IP "" 2
584 Use \fImessage\fR as log information, instead of
585 invoking an editor.
586 .SP
587 Available with the following commands: \fBadd\fR,
588 \fBcommit\fR and \fBimport\fR.
589 .SP
590 .IP "" 0
591 \fB-n\fR
592 .IP "" 2
593 Do not run any tag program.  (A program can be
594 specified to run in the modules
595 database (see node `modules\(aq in the CVS manual); this option bypasses it).
596 .SP
597 \fBNote: this is not the same as the \fBcvs -n\fB
598 program option, which you can specify to the left of a cvs command!\fR
599 .SP
600 Available with the \fBcheckout\fR, \fBcommit\fR, \fBexport\fR,
601 and \fBrtag\fR commands.
602 .SP
603 .IP "" 0
604 \fB-P\fR
605 .IP "" 2
606 Prune empty directories.  See see node `Removing directories\(aq in the CVS manual.
607 .SP
608 .IP "" 0
609 \fB-p\fR
610 .IP "" 2
611 Pipe the files retrieved from the repository to standard output,
612 rather than writing them in the current directory.  Available
613 with the \fBcheckout\fR and \fBupdate\fR commands.
614 .SP
615 .IP "" 0
616 \fB-R\fR
617 .IP "" 2
618 Process directories recursively.  This is on by default.
619 .SP
620 Available with the following commands: \fBannotate\fR, \fBcheckout\fR,
621 \fBcommit\fR, \fBdiff\fR, \fBedit\fR, \fBeditors\fR, \fBexport\fR,
622 \fBrdiff\fR, \fBremove\fR, \fBrtag\fR,
623 \fBstatus\fR, \fBtag\fR, \fBunedit\fR, \fBupdate\fR, \fBwatch\fR,
624 and \fBwatchers\fR.
625 .SP
626 .IP "" 0
627 \fB-r \fItag\fB\fR
628 .IP "" 2
629 .IX "HEAD, special tag"
630 .IX "BASE, special tag"
631 Use the revision specified by the \fItag\fR argument instead of the
632 default \fIhead\fR revision.  As well as arbitrary tags defined
633 with the \fBtag\fR or \fBrtag\fR command, two special tags are
634 always available: \fBHEAD\fR refers to the most recent version
635 available in the repository, and \fBBASE\fR refers to the
636 revision you last checked out into the current working directory.
637 .SP
638 The tag specification is sticky when you use this
639 with \fBcheckout\fR or \fBupdate\fR to make your own
640 copy of a file: \fBcvs\fR remembers the tag and continues to use it on
641 future update commands, until you specify otherwise (for more information
642 on sticky tags/dates, see node `Sticky tags\(aq in the CVS manual).
643 .SP
644 The tag can be either a symbolic or numeric tag, as
645 described in see node `Tags\(aq in the CVS manual, or the name of a branch, as
646 described in see node `Branching and merging\(aq in the CVS manual.
647 .SP
648 Specifying the \fB-q\fR global option along with the
649 \fB-r\fR command option is often useful, to suppress
650 the warning messages when the \fBrcs\fR file
651 does not contain the specified tag.
652 .SP
653 \fBNote: this is not the same as the overall \fBcvs -r\fB option,
654 which you can specify to the left of a \fBcvs\fB command!\fR
655 .SP
656 \fB-r\fR is available with the \fBcheckout\fR, \fBcommit\fR,
657 \fBdiff\fR, \fBhistory\fR, \fBexport\fR, \fBrdiff\fR,
658 \fBrtag\fR, and \fBupdate\fR commands.
659 .SP
660 .IP "" 0
661 \fB-W\fR
662 .IP "" 2
663 Specify file names that should be filtered.  You can
664 use this option repeatedly.  The spec can be a file
665 name pattern of the same type that you can specify in
666 the \fB.cvswrappers\fR file.
667 Available with the following commands: \fBimport\fR,
668 and \fBupdate\fR.
669 .SP
670 .SP
671 .SH "admin"
672 .SS "Administration"
673 .IX "Admin (subcommand)"
674 .SP
675 .IP "\(bu" 2
676 Requires: repository, working directory.
677 .IP "\(bu" 2
678 Changes: repository.
679 .IP "\(bu" 2
680 Synonym: rcs
681 .SP
682 This is the \fBcvs\fR interface to assorted
683 administrative facilities.  Some of them have
684 questionable usefulness for \fBcvs\fR but exist for
685 historical purposes.  Some of the questionable options
686 are likely to disappear in the future.  This command
687 \fIdoes\fR work recursively, so extreme care should be
688 used.
689 .SP
690 .IX "cvsadmin"
691 On unix, if there is a group named \fBcvsadmin\fR,
692 only members of that group can run \fBcvs admin\fR
693 (except for the \fBcvs admin -k\fR command, which can
694 be run by anybody).  This group should exist on the
695 server, or any system running the non-client/server
696 \fBcvs\fR.  To disallow \fBcvs admin\fR for all users,
697 create a group with no users in it.  On NT, the
698 \fBcvsadmin\fR feature does not exist and all users
699 can run \fBcvs admin\fR.
700 .SP
701 .SH "admin options"
702 .SP
703 Some of these options have questionable usefulness for
704 \fBcvs\fR but exist for historical purposes.  Some even
705 make it impossible to use \fBcvs\fR until you undo the
706 effect!
707 .SP
708 .IP "" 0
709 \fB-A\fIoldfile\fB\fR
710 .IP "" 2
711 Might not work together with \fBcvs\fR.  Append the
712 access list of \fIoldfile\fR to the access list of the
713 \fBrcs\fR file.
714 .SP
715 .IP "" 0
716 \fB-a\fIlogins\fB\fR
717 .IP "" 2
718 Might not work together with \fBcvs\fR.  Append the
719 login names appearing in the comma-separated list
720 \fIlogins\fR to the access list of the \fBrcs\fR file.
721 .SP
722 .IP "" 0
723 \fB-b[\fIrev\fB]\fR
724 .IP "" 2
725 Set the default branch to \fIrev\fR.  In \fBcvs\fR, you
726 normally do not manipulate default branches; sticky
727 tags (see node `Sticky tags\(aq in the CVS manual) are a better way to decide
728 which branch you want to work on.  There is one reason
729 to run \fBcvs admin -b\fR: to revert to the vendor\(aqs
730 version when using vendor branches (see node `Reverting
731 local changes\(aq in the CVS manual).
732 There can be no space between \fB-b\fR and its argument.
733 .SP
734 .IX "Comment leader"
735 .IP "" 0
736 \fB-c\fIstring\fB\fR
737 .IP "" 2
738 Sets the comment leader to \fIstring\fR.  The comment
739 leader is not used by current versions of \fBcvs\fR or
740 \fBrcs\fR 5.7.  Therefore, you can almost surely not
741 worry about it.  see node `Keyword substitution\(aq in the CVS manual.
742 .SP
743 .IP "" 0
744 \fB-e[\fIlogins\fB]\fR
745 .IP "" 2
746 Might not work together with \fBcvs\fR.  Erase the login
747 names appearing in the comma-separated list
748 \fIlogins\fR from the access list of the RCS file.  If
749 \fIlogins\fR is omitted, erase the entire access list.
750 There can be no space between \fB-e\fR and its argument.
751 .SP
752 .IP "" 0
753 \fB-I\fR
754 .IP "" 2
755 Run interactively, even if the standard input is not a
756 terminal.  This option does not work with the
757 client/server \fBcvs\fR and is likely to disappear in
758 a future release of \fBcvs\fR.
759 .SP
760 .IP "" 0
761 \fB-i\fR
762 .IP "" 2
763 Useless with \fBcvs\fR.  This creates and initializes a
764 new \fBrcs\fR file, without depositing a revision.  With
765 \fBcvs\fR, add files with the \fBcvs add\fR command
766 (see node `Adding files\(aq in the CVS manual).
767 .SP
768 .IP "" 0
769 \fB-k\fIsubst\fB\fR
770 .IP "" 2
771 Set the default keyword
772 substitution to \fIsubst\fR.  see node `Keyword
773 substitution\(aq in the CVS manual.  Giving an explicit \fB-k\fR option to
774 \fBcvs update\fR, \fBcvs export\fR, or \fBcvs
775 checkout\fR overrides this default.
776 .SP
777 .IP "" 0
778 \fB-l[\fIrev\fB]\fR
779 .IP "" 2
780 Lock the revision with number \fIrev\fR.  If a branch
781 is given, lock the latest revision on that branch.  If
782 \fIrev\fR is omitted, lock the latest revision on the
783 default branch.  There can be no space between
784 \fB-l\fR and its argument.
785 .SP
786 This can be used in conjunction with the
787 \fBrcslock.pl\fR script in the \fBcontrib\fR
788 directory of the \fBcvs\fR source distribution to
789 provide reserved checkouts (where only one user can be
790 editing a given file at a time).  See the comments in
791 that file for details (and see the \fBREADME\fR file
792 in that directory for disclaimers about the unsupported
793 nature of contrib).  According to comments in that
794 file, locking must set to strict (which is the default).
795 .SP
796 .IP "" 0
797 \fB-L\fR
798 .IP "" 2
799 Set locking to strict.  Strict locking means that the
800 owner of an RCS file is not exempt from locking for
801 checkin.  For use with \fBcvs\fR, strict locking must be
802 set; see the discussion under the \fB-l\fR option above.
803 .SP
804 .IX "Changing a log message"
805 .IX "Replacing a log message"
806 .IX "Correcting a log message"
807 .IX "Fixing a log message"
808 .IX "Log message, correcting"
809 .IP "" 0
810 \fB-m\fIrev\fB:\fImsg\fB\fR
811 .IP "" 2
812 Replace the log message of revision \fIrev\fR with
813 \fImsg\fR.
814 .SP
815 .IP "" 0
816 \fB-N\fIname\fB[:[\fIrev\fB]]\fR
817 .IP "" 2
818 Act like \fB-n\fR, except override any previous
819 assignment of \fIname\fR.  For use with magic branches,
820 see see node `Magic branch numbers\(aq in the CVS manual.
821 .SP
822 .IP "" 0
823 \fB-n\fIname\fB[:[\fIrev\fB]]\fR
824 .IP "" 2
825 Associate the symbolic name \fIname\fR with the branch
826 or revision \fIrev\fR.  It is normally better to use
827 \fBcvs tag\fR or \fBcvs rtag\fR instead.  Delete the
828 symbolic name if both \fB:\fR and \fIrev\fR are
829 omitted; otherwise, print an error message if
830 \fIname\fR is already associated with another number.
831 If \fIrev\fR is symbolic, it is expanded before
832 association.  A \fIrev\fR consisting of a branch number
833 followed by a \fB.\fR stands for the current latest
834 revision in the branch.  A \fB:\fR with an empty
835 \fIrev\fR stands for the current latest revision on the
836 default branch, normally the trunk.  For example,
837 \fBcvs admin -n\fIname\fB:\fR associates \fIname\fR with the
838 current latest revision of all the RCS files;
839 this contrasts with \fBcvs admin -n\fIname\fB:$\fR which
840 associates \fIname\fR with the revision numbers
841 extracted from keyword strings in the corresponding
842 working files.
843 .SP
844 .IX "Deleting revisions"
845 .IX "Outdating revisions"
846 .IX "Saving space"
847 .IP "" 0
848 \fB-o\fIrange\fB\fR
849 .IP "" 2
850 Deletes (\fIoutdates\fR) the revisions given by
851 \fIrange\fR.
852 .SP
853 Note that this command can be quite dangerous unless
854 you know \fIexactly\fR what you are doing (for example
855 see the warnings below about how the
856 \fIrev1\fR:\fIrev2\fR syntax is confusing).
857 .SP
858 If you are short on disc this option might help you.
859 But think twice before using it\(emthere is no way short
860 of restoring the latest backup to undo this command!
861 If you delete different revisions than you planned,
862 either due to carelessness or (heaven forbid) a \fBcvs\fR
863 bug, there is no opportunity to correct the error
864 before the revisions are deleted.  It probably would be
865 a good idea to experiment on a copy of the repository
866 first.
867 .SP
868 Specify \fIrange\fR in one of the following ways:
869 .SP
870 .IP "" 2
871 \fB\fIrev1\fB::\fIrev2\fB\fR
872 .IP "" 4
873 Collapse all revisions between rev1 and rev2, so that
874 \fBcvs\fR only stores the differences associated with going
875 from rev1 to rev2, not intermediate steps.  For
876 example, after \fB-o 1.3::1.5\fR one can retrieve
877 revision 1.3, revision 1.5, or the differences to get
878 from 1.3 to 1.5, but not the revision 1.4, or the
879 differences between 1.3 and 1.4.  Other examples:
880 \fB-o 1.3::1.4\fR and \fB-o 1.3::1.3\fR have no
881 effect, because there are no intermediate revisions to
882 remove.
883 .SP
884 .IP "" 2
885 \fB::\fIrev\fB\fR
886 .IP "" 4
887 Collapse revisions between the beginning of the branch
888 containing \fIrev\fR and \fIrev\fR itself.  The
889 branchpoint and \fIrev\fR are left intact.  For
890 example, \fB-o ::1.3.2.6\fR deletes revision 1.3.2.1,
891 revision 1.3.2.5, and everything in between, but leaves
892 1.3 and 1.3.2.6 intact.
893 .SP
894 .IP "" 2
895 \fB\fIrev\fB::\fR
896 .IP "" 4
897 Collapse revisions between \fIrev\fR and the end of the
898 branch containing \fIrev\fR.  Revision \fIrev\fR is
899 left intact but the head revision is deleted.
900 .SP
901 .IP "" 2
902 \fB\fIrev\fB\fR
903 .IP "" 4
904 Delete the revision \fIrev\fR.  For example, \fB-o
905 1.3\fR is equivalent to \fB-o 1.2::1.4\fR.
906 .SP
907 .IP "" 2
908 \fB\fIrev1\fB:\fIrev2\fB\fR
909 .IP "" 4
910 Delete the revisions from \fIrev1\fR to \fIrev2\fR,
911 inclusive, on the same branch.  One will not be able to
912 retrieve \fIrev1\fR or \fIrev2\fR or any of the
913 revisions in between.  For example, the command
914 \fBcvs admin -oR_1_01:R_1_02 \&.\fR is rarely useful.
915 It means to delete revisions up to, and including, the
916 tag R_1_02.  But beware!  If there are files that have not
917 changed between R_1_02 and R_1_03 the file will have
918 \fIthe same\fR numerical revision number assigned to
919 the tags R_1_02 and R_1_03.  So not only will it be
920 impossible to retrieve R_1_02; R_1_03 will also have to
921 be restored from the tapes!  In most cases you want to
922 specify \fIrev1\fR::\fIrev2\fR instead.
923 .SP
924 .IP "" 2
925 \fB:\fIrev\fB\fR
926 .IP "" 4
927 Delete revisions from the beginning of the
928 branch containing \fIrev\fR up to and including
929 \fIrev\fR.
930 .SP
931 .IP "" 2
932 \fB\fIrev\fB:\fR
933 .IP "" 4
934 Delete revisions from revision \fIrev\fR, including
935 \fIrev\fR itself, to the end of the branch containing
936 \fIrev\fR.
937 .SP
938 None of the revisions to be deleted may have
939 branches or locks.
940 .SP
941 If any of the revisions to be deleted have symbolic
942 names, and one specifies one of the \fB::\fR syntaxes,
943 then \fBcvs\fR will give an error and not delete any
944 revisions.  If you really want to delete both the
945 symbolic names and the revisions, first delete the
946 symbolic names with \fBcvs tag -d\fR, then run
947 \fBcvs admin -o\fR.  If one specifies the
948 non-\fB::\fR syntaxes, then \fBcvs\fR will delete the
949 revisions but leave the symbolic names pointing to
950 nonexistent revisions.  This behavior is preserved for
951 compatibility with previous versions of \fBcvs\fR, but
952 because it isn\(aqt very useful, in the future it may
953 change to be like the \fB::\fR case.
954 .SP
955 Due to the way \fBcvs\fR handles branches \fIrev\fR
956 cannot be specified symbolically if it is a branch.
957 see node `Magic branch numbers\(aq in the CVS manual, for an explanation.
958 .SP
959 Make sure that no-one has checked out a copy of the
960 revision you outdate.  Strange things will happen if he
961 starts to edit it and tries to check it back in.  For
962 this reason, this option is not a good way to take back
963 a bogus commit; commit a new revision undoing the bogus
964 change instead (see node `Merging two revisions\(aq in the CVS manual).
965 .SP
966 .IP "" 0
967 \fB-q\fR
968 .IP "" 2
969 Run quietly; do not print diagnostics.
970 .SP
971 .IP "" 0
972 \fB-s\fIstate\fB[:\fIrev\fB]\fR
973 .IP "" 2
974 Useful with \fBcvs\fR.  Set the state attribute of the
975 revision \fIrev\fR to \fIstate\fR.  If \fIrev\fR is a
976 branch number, assume the latest revision on that
977 branch.  If \fIrev\fR is omitted, assume the latest
978 revision on the default branch.  Any identifier is
979 acceptable for \fIstate\fR.  A useful set of states is
980 \fBExp\fR (for experimental), \fBStab\fR (for
981 stable), and \fBRel\fR (for released).  By default,
982 the state of a new revision is set to \fBExp\fR when
983 it is created.  The state is visible in the output from
984 \fIcvs log\fR (see node `log\(aq in the CVS manual), and in the
985 \fB$\fP\fPLog$\fR and \fB$\fP\fPState$\fR keywords
986 (see node `Keyword substitution\(aq in the CVS manual).  Note that \fBcvs\fR
987 uses the \fBdead\fR state for its own purposes; to
988 take a file to or from the \fBdead\fR state use
989 commands like \fBcvs remove\fR and \fBcvs add\fR, not
990 \fBcvs admin -s\fR.
991 .SP
992 .IP "" 0
993 \fB-t[\fIfile\fB]\fR
994 .IP "" 2
995 Useful with \fBcvs\fR.  Write descriptive text from the
996 contents of the named \fIfile\fR into the RCS file,
997 deleting the existing text.  The \fIfile\fR pathname
998 may not begin with \fB-\fR.  The descriptive text can be seen in the
999 output from \fBcvs log\fR (see node `log\(aq in the CVS manual).
1000 There can be no space between \fB-t\fR and its argument.
1001 .SP
1002 If \fIfile\fR is omitted,
1003 obtain the text from standard input, terminated by
1004 end-of-file or by a line containing \fB.\fR by itself.
1005 Prompt for the text if interaction is possible; see
1006 \fB-I\fR.
1007 .SP
1008 .IP "" 0
1009 \fB-t-\fIstring\fB\fR
1010 .IP "" 2
1011 Similar to \fB-t\fIfile\fB\fR. Write descriptive text
1012 from the \fIstring\fR into the \fBrcs\fR file, deleting
1013 the existing text.
1014 There can be no space between \fB-t\fR and its argument.
1015 .SP
1016 .IP "" 0
1017 \fB-U\fR
1018 .IP "" 2
1019 Set locking to non-strict.  Non-strict locking means
1020 that the owner of a file need not lock a revision for
1021 checkin.  For use with \fBcvs\fR, strict locking must be
1022 set; see the discussion under the \fB-l\fR option
1023 above.
1024 .SP
1025 .IP "" 0
1026 \fB-u[\fIrev\fB]\fR
1027 .IP "" 2
1028 See the option \fB-l\fR above, for a discussion of
1029 using this option with \fBcvs\fR.  Unlock the revision
1030 with number \fIrev\fR.  If a branch is given, unlock
1031 the latest revision on that branch.  If \fIrev\fR is
1032 omitted, remove the latest lock held by the caller.
1033 Normally, only the locker of a revision may unlock it;
1034 somebody else unlocking a revision breaks the lock.
1035 This causes the original locker to be sent a \fBcommit\fR
1036 notification (see node `Getting Notified\(aq in the CVS manual).
1037 There can be no space between \fB-u\fR and its argument.
1038 .SP
1039 .IP "" 0
1040 \fB-V\fIn\fB\fR
1041 .IP "" 2
1042 In previous versions of \fBcvs\fR, this option meant to
1043 write an \fBrcs\fR file which would be acceptable to
1044 \fBrcs\fR version \fIn\fR, but it is now obsolete and
1045 specifying it will produce an error.
1046 .SP
1047 .IP "" 0
1048 \fB-x\fIsuffixes\fB\fR
1049 .IP "" 2
1050 In previous versions of \fBcvs\fR, this was documented
1051 as a way of specifying the names of the \fBrcs\fR
1052 files.  However, \fBcvs\fR has always required that the
1053 \fBrcs\fR files used by \fBcvs\fR end in \fB,v\fR, so
1054 this option has never done anything useful.
1055 .SP
1056 .SP
1057 .SH "annotate"
1058 .SS "What revision modified each line of a file?"
1059 .IX "annotate (subcommand)"
1060 .SP
1061 .IP "\(bu" 2
1062 Synopsis: annotate [options] files\&...
1063 .IP "\(bu" 2
1064 Requires: repository.
1065 .IP "\(bu" 2
1066 Changes: nothing.
1067 .SP
1068 For each file in \fIfiles\fR, print the head revision
1069 of the trunk, together with information on the last
1070 modification for each line.  
1071 .SP
1072 .SH "annotate options"
1073 .SP
1074 These standard options are supported by \fBannotate\fR
1075 (see node `Common options\(aq in the CVS manual, for a complete description of
1076 them):
1077 .SP
1078 .IP "" 0
1079 \fB-l\fR
1080 .IP "" 2
1081 Local directory only, no recursion.
1082 .SP
1083 .IP "" 0
1084 \fB-R\fR
1085 .IP "" 2
1086 Process directories recursively.
1087 .SP
1088 .IP "" 0
1089 \fB-f\fR
1090 .IP "" 2
1091 Use head revision if tag/date not found.
1092 .SP
1093 .IP "" 0
1094 \fB-F\fR
1095 .IP "" 2
1096 Annotate binary files.
1097 .SP
1098 .IP "" 0
1099 \fB-r \fIrevision\fB\fR
1100 .IP "" 2
1101 Annotate file as of specified revision/tag.
1102 .SP
1103 .IP "" 0
1104 \fB-D \fIdate\fB\fR
1105 .IP "" 2
1106 Annotate file as of specified date.
1107 .SP
1108 .SH "annotate example"
1109 .SP
1110 For example:
1111 .SP
1112 .PD 0
1113 .SP
1114 .IP "" 2
1115 $ cvs annotate ssfile
1116 .IP "" 2
1117 Annotations for ssfile
1118 .IP "" 2
1119 ***************
1120 .IP "" 2
1121 1.1          (mary     27-Mar-96): ssfile line 1
1122 .IP "" 2
1123 1.2          (joe      28-Mar-96): ssfile line 2
1124
1125 .PD
1126 .IP "" 0
1127 .SP
1128 The file \fBssfile\fR currently contains two lines.
1129 The \fBssfile line 1\fR line was checked in by
1130 \fBmary\fR on March 27.  Then, on March 28, \fBjoe\fR
1131 added a line \fBssfile line 2\fR, without modifying
1132 the \fBssfile line 1\fR line.  This report doesn\(aqt
1133 tell you anything about lines which have been deleted
1134 or replaced; you need to use \fBcvs diff\fR for that
1135 (see node `diff\(aq in the CVS manual).
1136 .SP
1137 The options to \fBcvs annotate\fR are listed in
1138 see node `Invoking CVS\(aq in the CVS manual, and can be used to select the files
1139 and revisions to annotate.  The options are described
1140 in more detail there and in see node `Common options\(aq in the CVS manual.
1141 .SP
1142 .SH "checkout"
1143 .SS "Check out sources for editing"
1144 .IX "checkout (subcommand)"
1145 .IX "co (subcommand)"
1146 .SP
1147 .IP "\(bu" 2
1148 Synopsis: checkout [options] modules\&...
1149 .IP "\(bu" 2
1150 Requires: repository.
1151 .IP "\(bu" 2
1152 Changes: working directory.
1153 .IP "\(bu" 2
1154 Synonyms: co, get
1155 .SP
1156 Create or update a working directory containing copies of the
1157 source files specified by \fImodules\fR.  You must execute
1158 \fBcheckout\fR before using most of the other \fBcvs\fR
1159 commands, since most of them operate on your working
1160 directory.
1161 .SP
1162 The \fImodules\fR are either
1163 symbolic names for some
1164 collection of source directories and files, or paths to
1165 directories or files in the repository.  The symbolic
1166 names are defined in the \fBmodules\fR file.
1167 see node `modules\(aq in the CVS manual.
1168 .SP
1169 Depending on the modules you specify, \fBcheckout\fR may
1170 recursively create directories and populate them with
1171 the appropriate source files.  You can then edit these
1172 source files at any time (regardless of whether other
1173 software developers are editing their own copies of the
1174 sources); update them to include new changes applied by
1175 others to the source repository; or commit your work as
1176 a permanent change to the source repository.
1177 .SP
1178 Note that \fBcheckout\fR is used to create
1179 directories.  The top-level directory created is always
1180 added to the directory where \fBcheckout\fR is
1181 invoked, and usually has the same name as the specified
1182 module.  In the case of a module alias, the created
1183 sub-directory may have a different name, but you can be
1184 sure that it will be a sub-directory, and that
1185 \fBcheckout\fR will show the relative path leading to
1186 each file as it is extracted into your private work
1187 area (unless you specify the \fB-Q\fR global option).
1188 .SP
1189 The files created by \fBcheckout\fR are created
1190 read-write, unless the \fB-r\fR option to \fBcvs\fR
1191 (see node `Global options\(aq in the CVS manual) is specified, the
1192 \fBCVSREAD\fR environment variable is specified
1193 (see node `Environment variables\(aq in the CVS manual), or a watch is in
1194 effect for that file (see node `Watches\(aq in the CVS manual).
1195 .SP
1196 Note that running \fBcheckout\fR on a directory that was already
1197 built by a prior \fBcheckout\fR is also permitted.
1198 This is similar to specifying the \fB-d\fR option
1199 to the \fBupdate\fR command in the sense that new
1200 directories that have been created in the repository
1201 will appear in your work area.
1202 However, \fBcheckout\fR takes a module name whereas
1203 \fBupdate\fR takes a directory name.  Also
1204 to use \fBcheckout\fR this way it must be run from the
1205 top level directory (where you originally ran
1206 \fBcheckout\fR from), so before you run
1207 \fBcheckout\fR to update an existing directory, don\(aqt
1208 forget to change your directory to the top level
1209 directory.
1210 .SP
1211 For the output produced by the \fBcheckout\fR command
1212 see see node `update output\(aq in the CVS manual.
1213 .SP
1214 .SH "checkout options"
1215 .SP
1216 These standard options are supported by \fBcheckout\fR
1217 (see node `Common options\(aq in the CVS manual, for a complete description of
1218 them):
1219 .SP
1220 .IP "" 0
1221 \fB-D \fIdate\fB\fR
1222 .IP "" 2
1223 Use the most recent revision no later than \fIdate\fR.
1224 This option is sticky, and implies \fB-P\fR.  See
1225 see node `Sticky tags\(aq in the CVS manual, for more information on sticky tags/dates.
1226 .SP
1227 .IP "" 0
1228 \fB-f\fR
1229 .IP "" 2
1230 Only useful with the \fB-D \fIdate\fB\fR or \fB-r
1231 \fItag\fB\fR flags.  If no matching revision is found,
1232 retrieve the most recent revision (instead of ignoring
1233 the file).
1234 .SP
1235 .IP "" 0
1236 \fB-k \fIkflag\fB\fR
1237 .IP "" 2
1238 Process keywords according to \fIkflag\fR.  See
1239 see node `Keyword substitution\(aq in the CVS manual.
1240 This option is sticky; future updates of
1241 this file in this working directory will use the same
1242 \fIkflag\fR.  The \fBstatus\fR command can be viewed
1243 to see the sticky options.  See see node `Invoking CVS\(aq in the CVS manual, for
1244 more information on the \fBstatus\fR command.
1245 .SP
1246 .IP "" 0
1247 \fB-l\fR
1248 .IP "" 2
1249 Local; run only in current working directory.
1250 .SP
1251 .IP "" 0
1252 \fB-n\fR
1253 .IP "" 2
1254 Do not run any checkout program (as specified
1255 with the \fB-o\fR option in the modules file;
1256 see node `modules\(aq in the CVS manual).
1257 .SP
1258 .IP "" 0
1259 \fB-P\fR
1260 .IP "" 2
1261 Prune empty directories.  See see node `Moving directories\(aq in the CVS manual.
1262 .SP
1263 .IP "" 0
1264 \fB-p\fR
1265 .IP "" 2
1266 Pipe files to the standard output.
1267 .SP
1268 .IP "" 0
1269 \fB-R\fR
1270 .IP "" 2
1271 Checkout directories recursively.  This option is on by default.
1272 .SP
1273 .IP "" 0
1274 \fB-r \fItag\fB\fR
1275 .IP "" 2
1276 Use revision \fItag\fR.  This option is sticky, and implies \fB-P\fR.
1277 See see node `Sticky tags\(aq in the CVS manual, for more information on sticky tags/dates.
1278 .SP
1279 In addition to those, you can use these special command
1280 options with \fBcheckout\fR:
1281 .SP
1282 .IP "" 0
1283 \fB-A\fR
1284 .IP "" 2
1285 Reset any sticky tags, dates, or \fB-k\fR options.
1286 See see node `Sticky tags\(aq in the CVS manual, for more information on sticky tags/dates.
1287 .SP
1288 .IP "" 0
1289 \fB-c\fR
1290 .IP "" 2
1291 Copy the module file, sorted, to the standard output,
1292 instead of creating or modifying any files or
1293 directories in your working directory.
1294 .SP
1295 .IP "" 0
1296 \fB-d \fIdir\fB\fR
1297 .IP "" 2
1298 Create a directory called \fIdir\fR for the working
1299 files, instead of using the module name.  In general,
1300 using this flag is equivalent to using \fBmkdir
1301 \fIdir\fB; cd \fIdir\fB\fR followed by the checkout
1302 command without the \fB-d\fR flag.
1303 .SP
1304 There is an important exception, however.  It is very
1305 convenient when checking out a single item to have the
1306 output appear in a directory that doesn\(aqt contain empty
1307 intermediate directories.  In this case \fIonly\fR,
1308 \fBcvs\fR tries to \`\`shorten\(aq\(aq pathnames to avoid those empty
1309 directories.
1310 .SP
1311 For example, given a module \fBfoo\fR that contains
1312 the file \fBbar.c\fR, the command \fBcvs co -d dir
1313 foo\fR will create directory \fBdir\fR and place
1314 \fBbar.c\fR inside.  Similarly, given a module
1315 \fBbar\fR which has subdirectory \fBbaz\fR wherein
1316 there is a file \fBquux.c\fR, the command \fBcvs co
1317 -d dir bar/baz\fR will create directory \fBdir\fR and
1318 place \fBquux.c\fR inside.
1319 .SP
1320 Using the \fB-N\fR flag will defeat this behavior.
1321 Given the same module definitions above, \fBcvs co
1322 -N -d dir foo\fR will create directories \fBdir/foo\fR
1323 and place \fBbar.c\fR inside, while \fBcvs co -N -d
1324 dir bar/baz\fR will create directories \fBdir/bar/baz\fR
1325 and place \fBquux.c\fR inside.
1326 .SP
1327 .IP "" 0
1328 \fB-j \fItag\fB\fR
1329 .IP "" 2
1330 With two \fB-j\fR options, merge changes from the
1331 revision specified with the first \fB-j\fR option to
1332 the revision specified with the second \fBj\fR option,
1333 into the working directory.
1334 .SP
1335 With one \fB-j\fR option, merge changes from the
1336 ancestor revision to the revision specified with the
1337 \fB-j\fR option, into the working directory.  The
1338 ancestor revision is the common ancestor of the
1339 revision which the working directory is based on, and
1340 the revision specified in the \fB-j\fR option.
1341 .SP
1342 In addition, each -j option can contain an optional
1343 date specification which, when used with branches, can
1344 limit the chosen revision to one within a specific
1345 date.  An optional date is specified by adding a colon
1346 (:) to the tag:
1347 \fB-j\fISymbolic_Tag\fB:\fIDate_Specifier\fB\fR.
1348 .SP
1349 see node `Branching and merging\(aq in the CVS manual.
1350 .SP
1351 .IP "" 0
1352 \fB-N\fR
1353 .IP "" 2
1354 Only useful together with \fB-d \fIdir\fB\fR.  With
1355 this option, \fBcvs\fR will not \`\`shorten\(aq\(aq module paths
1356 in your working directory when you check out a single
1357 module.  See the \fB-d\fR flag for examples and a
1358 discussion.
1359 .SP
1360 .IP "" 0
1361 \fB-s\fR
1362 .IP "" 2
1363 Like \fB-c\fR, but include the status of all modules,
1364 and sort it by the status string.  see node `modules\(aq in the CVS manual, for
1365 info about the \fB-s\fR option that is used inside the
1366 modules file to set the module status.
1367 .SP
1368 .SH "checkout examples"
1369 .SP
1370 Get a copy of the module \fBtc\fR:
1371 .SP
1372 .PD 0
1373 .SP
1374 .IP "" 2
1375 $ cvs checkout tc
1376
1377 .PD
1378 .IP "" 0
1379 .SP
1380 Get a copy of the module \fBtc\fR as it looked one day
1381 ago:
1382 .SP
1383 .PD 0
1384 .SP
1385 .IP "" 2
1386 $ cvs checkout -D yesterday tc
1387
1388 .PD
1389 .IP "" 0
1390 .SP
1391 .SH "commit"
1392 .SS "Check files into the repository"
1393 .IX "commit (subcommand)"
1394 .SP
1395 .IP "\(bu" 2
1396 Synopsis: commit [-lnRf] [-m \(aqlog_message\(aq |
1397 -F file] [-r revision] [files\&...]
1398 .IP "\(bu" 2
1399 Requires: working directory, repository.
1400 .IP "\(bu" 2
1401 Changes: repository.
1402 .IP "\(bu" 2
1403 Synonym: ci
1404 .SP
1405 Use \fBcommit\fR when you want to incorporate changes
1406 from your working source files into the source
1407 repository.
1408 .SP
1409 If you don\(aqt specify particular files to commit, all of
1410 the files in your working current directory are
1411 examined.  \fBcommit\fR is careful to change in the
1412 repository only those files that you have really
1413 changed.  By default (or if you explicitly specify the
1414 \fB-R\fR option), files in subdirectories are also
1415 examined and committed if they have changed; you can
1416 use the \fB-l\fR option to limit \fBcommit\fR to the
1417 current directory only.
1418 .SP
1419 \fBcommit\fR verifies that the selected files are up
1420 to date with the current revisions in the source
1421 repository; it will notify you, and exit without
1422 committing, if any of the specified files must be made
1423 current first with \fBupdate\fR (see node `update\(aq in the CVS manual).
1424 \fBcommit\fR does not call the \fBupdate\fR command
1425 for you, but rather leaves that for you to do when the
1426 time is right.
1427 .SP
1428 When all is well, an editor is invoked to allow you to
1429 enter a log message that will be written to one or more
1430 logging programs (see node `modules\(aq in the CVS manual, and see node `loginfo\(aq in the CVS manual)
1431 and placed in the \fBrcs\fR file inside the
1432 repository.  This log message can be retrieved with the
1433 \fBlog\fR command; see see node `log\(aq in the CVS manual.  You can specify the
1434 log message on the command line with the \fB-m
1435 \fImessage\fB\fR option, and thus avoid the editor invocation,
1436 or use the \fB-F \fIfile\fB\fR option to specify
1437 that the argument file contains the log message.
1438 .SP
1439 .SH "commit options"
1440 .SP
1441 These standard options are supported by \fBcommit\fR
1442 (see node `Common options\(aq in the CVS manual, for a complete description of
1443 them):
1444 .SP
1445 .IP "" 0
1446 \fB-l\fR
1447 .IP "" 2
1448 Local; run only in current working directory.
1449 .SP
1450 .IP "" 0
1451 \fB-R\fR
1452 .IP "" 2
1453 Commit directories recursively.  This is on by default.
1454 .SP
1455 .IP "" 0
1456 \fB-r \fIrevision\fB\fR
1457 .IP "" 2
1458 Commit to \fIrevision\fR.  \fIrevision\fR must be
1459 either a branch, or a revision on the main trunk that
1460 is higher than any existing revision number
1461 (see node `Assigning revisions\(aq in the CVS manual).  You
1462 cannot commit to a specific revision on a branch.
1463 .SP
1464 \fBcommit\fR also supports these options:
1465 .SP
1466 .IP "" 0
1467 \fB-F \fIfile\fB\fR
1468 .IP "" 2
1469 Read the log message from \fIfile\fR, instead
1470 of invoking an editor.
1471 .SP
1472 .IP "" 0
1473 \fB-f\fR
1474 .IP "" 2
1475 Note that this is not the standard behavior of
1476 the \fB-f\fR option as defined in see node `Common options\(aq in the CVS manual.
1477 .SP
1478 Force \fBcvs\fR to commit a new revision even if you haven\(aqt
1479 made any changes to the file.  If the current revision
1480 of \fIfile\fR is 1.7, then the following two commands
1481 are equivalent:
1482 .SP
1483 .PD 0
1484 .SP
1485 .IP "" 4
1486 $ cvs commit -f \fIfile\fR
1487 .IP "" 4
1488 $ cvs commit -r 1.8 \fIfile\fR
1489
1490 .PD
1491 .IP "" 2
1492 .SP
1493 The \fB-f\fR option disables recursion (i.e., it
1494 implies \fB-l\fR).  To force \fBcvs\fR to commit a new
1495 revision for all files in all subdirectories, you must
1496 use \fB-f -R\fR.
1497 .SP
1498 .IP "" 0
1499 \fB-m \fImessage\fB\fR
1500 .IP "" 2
1501 Use \fImessage\fR as the log message, instead of
1502 invoking an editor.
1503 .SP
1504 .SH "commit examples"
1505 .SP
1506 .SS "Committing to a branch"
1507 .SP
1508 You can commit to a branch revision (one that has an
1509 even number of dots) with the \fB-r\fR option.  To
1510 create a branch revision, use the \fB-b\fR option
1511 of the \fBrtag\fR or \fBtag\fR commands
1512 (see node `Branching and merging\(aq in the CVS manual).  Then, either \fBcheckout\fR or
1513 \fBupdate\fR can be used to base your sources on the
1514 newly created branch.  From that point on, all
1515 \fBcommit\fR changes made within these working sources
1516 will be automatically added to a branch revision,
1517 thereby not disturbing main-line development in any
1518 way.  For example, if you had to create a patch to the
1519 1.2 version of the product, even though the 2.0 version
1520 is already under development, you might do:
1521 .SP
1522 .PD 0
1523 .SP
1524 .IP "" 2
1525 $ cvs rtag -b -r FCS1_2 FCS1_2_Patch product_module
1526 .IP "" 2
1527 $ cvs checkout -r FCS1_2_Patch product_module
1528 .IP "" 2
1529 $ cd product_module
1530 .IP "" 2
1531 [[ hack away ]]
1532 .IP "" 2
1533 $ cvs commit
1534
1535 .PD
1536 .IP "" 0
1537 .SP
1538 This works automatically since the \fB-r\fR option is
1539 sticky.
1540 .SP
1541 .SS "Creating the branch after editing"
1542 .SP
1543 Say you have been working on some extremely
1544 experimental software, based on whatever revision you
1545 happened to checkout last week.  If others in your
1546 group would like to work on this software with you, but
1547 without disturbing main-line development, you could
1548 commit your change to a new branch.  Others can then
1549 checkout your experimental stuff and utilize the full
1550 benefit of \fBcvs\fR conflict resolution.  The scenario might
1551 look like:
1552 .SP
1553 .PD 0
1554 .SP
1555 .IP "" 2
1556 [[ hacked sources are present ]]
1557 .IP "" 2
1558 $ cvs tag -b EXPR1
1559 .IP "" 2
1560 $ cvs update -r EXPR1
1561 .IP "" 2
1562 $ cvs commit
1563
1564 .PD
1565 .IP "" 0
1566 .SP
1567 The \fBupdate\fR command will make the \fB-r
1568 EXPR1\fR option sticky on all files.  Note that your
1569 changes to the files will never be removed by the
1570 \fBupdate\fR command.  The \fBcommit\fR will
1571 automatically commit to the correct branch, because the
1572 \fB-r\fR is sticky.  You could also do like this:
1573 .SP
1574 .PD 0
1575 .SP
1576 .IP "" 2
1577 [[ hacked sources are present ]]
1578 .IP "" 2
1579 $ cvs tag -b EXPR1
1580 .IP "" 2
1581 $ cvs commit -r EXPR1
1582
1583 .PD
1584 .IP "" 0
1585 .SP
1586 but then, only those files that were changed by you
1587 will have the \fB-r EXPR1\fR sticky flag.  If you hack
1588 away, and commit without specifying the \fB-r EXPR1\fR
1589 flag, some files may accidentally end up on the main
1590 trunk.
1591 .SP
1592 To work with you on the experimental change, others
1593 would simply do
1594 .SP
1595 .PD 0
1596 .SP
1597 .IP "" 2
1598 $ cvs checkout -r EXPR1 whatever_module
1599
1600 .PD
1601 .IP "" 0
1602 .SP
1603 .SH "diff"
1604 .SS "Show differences between revisions"
1605 .IX "diff (subcommand)"
1606 .SP
1607 .IP "\(bu" 2
1608 Synopsis: diff [-lR] [-k kflag] [format_options] [[-r rev1 | -D date1] [-r rev2 |  -D date2]] [files\&...]
1609 .IP "\(bu" 2
1610 Requires: working directory, repository.
1611 .IP "\(bu" 2
1612 Changes: nothing.
1613 .SP
1614 The \fBdiff\fR command is used to compare different
1615 revisions of files.  The default action is to compare
1616 your working files with the revisions they were based
1617 on, and report any differences that are found.
1618 .SP
1619 If any file names are given, only those files are
1620 compared.  If any directories are given, all files
1621 under them will be compared.
1622 .SP
1623 The exit status for diff is different than for other
1624 \fBcvs\fR commands; for details see node `Exit status\(aq in the CVS manual.
1625 .SP
1626 .SH "diff options"
1627 .SP
1628 These standard options are supported by \fBdiff\fR
1629 (see node `Common options\(aq in the CVS manual, for a complete description of
1630 them):
1631 .SP
1632 .IP "" 0
1633 \fB-D \fIdate\fB\fR
1634 .IP "" 2
1635 Use the most recent revision no later than \fIdate\fR.
1636 See \fB-r\fR for how this affects the comparison.
1637 .SP
1638 .IP "" 0
1639 \fB-k \fIkflag\fB\fR
1640 .IP "" 2
1641 Process keywords according to \fIkflag\fR.  See
1642 see node `Keyword substitution\(aq in the CVS manual.
1643 .SP
1644 .IP "" 0
1645 \fB-l\fR
1646 .IP "" 2
1647 Local; run only in current working directory.
1648 .SP
1649 .IP "" 0
1650 \fB-R\fR
1651 .IP "" 2
1652 Examine directories recursively.  This option is on by
1653 default.
1654 .SP
1655 .IP "" 0
1656 \fB-r \fItag\fB\fR
1657 .IP "" 2
1658 Compare with revision \fItag\fR.  Zero, one or two
1659 \fB-r\fR options can be present.  With no \fB-r\fR
1660 option, the working file will be compared with the
1661 revision it was based on.  With one \fB-r\fR, that
1662 revision will be compared to your current working file.
1663 With two \fB-r\fR options those two revisions will be
1664 compared (and your working file will not affect the
1665 outcome in any way).
1666 .SP
1667 One or both \fB-r\fR options can be replaced by a
1668 \fB-D \fIdate\fB\fR option, described above.
1669 .SP
1670 The following options specify the format of the
1671 output.  They have the same meaning as in GNU diff.
1672 Most options have two equivalent names, one of which is a single letter
1673 preceded by \fB-\fR, and the other of which is a long name preceded by
1674 \fB--\fR.
1675 .SP
1676 .IP "" 0
1677 \fB-\fIlines\fB\fR
1678 .IP "" 2
1679 Show \fIlines\fR (an integer) lines of context.  This option does not
1680 specify an output format by itself; it has no effect unless it is
1681 combined with \fB-c\fR or \fB-u\fR.  This option is obsolete.  For proper
1682 operation, \fBpatch\fR typically needs at least two lines of context.
1683 .SP
1684 .IP "" 0
1685 \fB-a\fR
1686 .IP "" 2
1687 Treat all files as text and compare them line-by-line, even if they
1688 do not seem to be text.
1689 .SP
1690 .IP "" 0
1691 \fB-b\fR
1692 .IP "" 2
1693 Ignore trailing white space and consider all other sequences of one or
1694 more white space characters to be equivalent.
1695 .SP
1696 .IP "" 0
1697 \fB-B\fR
1698 .IP "" 2
1699 Ignore changes that just insert or delete blank lines.
1700 .SP
1701 .IP "" 0
1702 \fB--binary\fR
1703 .IP "" 2
1704 Read and write data in binary mode.
1705 .SP
1706 .IP "" 0
1707 \fB--brief\fR
1708 .IP "" 2
1709 Report only whether the files differ, not the details of the
1710 differences.
1711 .SP
1712 .IP "" 0
1713 \fB-c\fR
1714 .IP "" 2
1715 Use the context output format.
1716 .SP
1717 .IP "" 0
1718 \fB-C \fIlines\fB\fR
1719 .IP "" 2
1720 .IP "" 0
1721 \fB--context\fR[\fB=\fIlines\fB\fR]\fB\fR
1722 .IP "" 2
1723 Use the context output format, showing \fIlines\fR (an integer) lines of
1724 context, or three if \fIlines\fR is not given.
1725 For proper operation, \fBpatch\fR typically needs at least two lines of
1726 context.
1727 .SP
1728 .IP "" 0
1729 \fB--changed-group-format=\fIformat\fB\fR
1730 .IP "" 2
1731 Use \fIformat\fR to output a line group containing differing lines from
1732 both files in if-then-else format.  see node `Line group formats\(aq in the CVS manual.
1733 .SP
1734 .IP "" 0
1735 \fB-d\fR
1736 .IP "" 2
1737 Change the algorithm to perhaps find a smaller set of changes.  This makes
1738 \fBdiff\fR slower (sometimes much slower).
1739 .SP
1740 .IP "" 0
1741 \fB-e\fR
1742 .IP "" 2
1743 .IP "" 0
1744 \fB--ed\fR
1745 .IP "" 2
1746 Make output that is a valid \fBed\fR script.
1747 .SP
1748 .IP "" 0
1749 \fB--expand-tabs\fR
1750 .IP "" 2
1751 Expand tabs to spaces in the output, to preserve the alignment of tabs
1752 in the input files.
1753 .SP
1754 .IP "" 0
1755 \fB-f\fR
1756 .IP "" 2
1757 Make output that looks vaguely like an \fBed\fR script but has changes
1758 in the order they appear in the file.
1759 .SP
1760 .IP "" 0
1761 \fB-F \fIregexp\fB\fR
1762 .IP "" 2
1763 In context and unified format, for each hunk of differences, show some
1764 of the last preceding line that matches \fIregexp\fR.
1765 .SP
1766 .IP "" 0
1767 \fB--forward-ed\fR
1768 .IP "" 2
1769 Make output that looks vaguely like an \fBed\fR script but has changes
1770 in the order they appear in the file.
1771 .SP
1772 .IP "" 0
1773 \fB-H\fR
1774 .IP "" 2
1775 Use heuristics to speed handling of large files that have numerous
1776 scattered small changes.
1777 .SP
1778 .IP "" 0
1779 \fB--horizon-lines=\fIlines\fB\fR
1780 .IP "" 2
1781 Do not discard the last \fIlines\fR lines of the common prefix
1782 and the first \fIlines\fR lines of the common suffix.
1783 .SP
1784 .IP "" 0
1785 \fB-i\fR
1786 .IP "" 2
1787 Ignore changes in case; consider upper- and lower-case letters
1788 equivalent.
1789 .SP
1790 .IP "" 0
1791 \fB-I \fIregexp\fB\fR
1792 .IP "" 2
1793 Ignore changes that just insert or delete lines that match \fIregexp\fR.
1794 .SP
1795 .IP "" 0
1796 \fB--ifdef=\fIname\fB\fR
1797 .IP "" 2
1798 Make merged if-then-else output using \fIname\fR.
1799 .SP
1800 .IP "" 0
1801 \fB--ignore-all-space\fR
1802 .IP "" 2
1803 Ignore white space when comparing lines.
1804 .SP
1805 .IP "" 0
1806 \fB--ignore-blank-lines\fR
1807 .IP "" 2
1808 Ignore changes that just insert or delete blank lines.
1809 .SP
1810 .IP "" 0
1811 \fB--ignore-case\fR
1812 .IP "" 2
1813 Ignore changes in case; consider upper- and lower-case to be the same.
1814 .SP
1815 .IP "" 0
1816 \fB--ignore-matching-lines=\fIregexp\fB\fR
1817 .IP "" 2
1818 Ignore changes that just insert or delete lines that match \fIregexp\fR.
1819 .SP
1820 .IP "" 0
1821 \fB--ignore-space-change\fR
1822 .IP "" 2
1823 Ignore trailing white space and consider all other sequences of one or
1824 more white space characters to be equivalent.
1825 .SP
1826 .IP "" 0
1827 \fB--initial-tab\fR
1828 .IP "" 2
1829 Output a tab rather than a space before the text of a line in normal or
1830 context format.  This causes the alignment of tabs in the line to look
1831 normal.
1832 .SP
1833 .IP "" 0
1834 \fB-L \fIlabel\fB\fR
1835 .IP "" 2
1836 Use \fIlabel\fR instead of the file name in the context format
1837 and unified format headers.
1838 .SP
1839 .IP "" 0
1840 \fB--label=\fIlabel\fB\fR
1841 .IP "" 2
1842 Use \fIlabel\fR instead of the file name in the context format
1843 and unified format headers.
1844 .SP
1845 .IP "" 0
1846 \fB--left-column\fR
1847 .IP "" 2
1848 Print only the left column of two common lines in side by side format.
1849 .SP
1850 .IP "" 0
1851 \fB--line-format=\fIformat\fB\fR
1852 .IP "" 2
1853 Use \fIformat\fR to output all input lines in if-then-else format.
1854 see node `Line formats\(aq in the CVS manual.
1855 .SP
1856 .IP "" 0
1857 \fB--minimal\fR
1858 .IP "" 2
1859 Change the algorithm to perhaps find a smaller set of changes.  This
1860 makes \fBdiff\fR slower (sometimes much slower).
1861 .SP
1862 .IP "" 0
1863 \fB-n\fR
1864 .IP "" 2
1865 Output RCS-format diffs; like \fB-f\fR except that each command
1866 specifies the number of lines affected.
1867 .SP
1868 .IP "" 0
1869 \fB-N\fR
1870 .IP "" 2
1871 .IP "" 0
1872 \fB--new-file\fR
1873 .IP "" 2
1874 In directory comparison, if a file is found in only one directory,
1875 treat it as present but empty in the other directory.
1876 .SP
1877 .IP "" 0
1878 \fB--new-group-format=\fIformat\fB\fR
1879 .IP "" 2
1880 Use \fIformat\fR to output a group of lines taken from just the second
1881 file in if-then-else format.  see node `Line group formats\(aq in the CVS manual.
1882 .SP
1883 .IP "" 0
1884 \fB--new-line-format=\fIformat\fB\fR
1885 .IP "" 2
1886 Use \fIformat\fR to output a line taken from just the second file in
1887 if-then-else format.  see node `Line formats\(aq in the CVS manual.
1888 .SP
1889 .IP "" 0
1890 \fB--old-group-format=\fIformat\fB\fR
1891 .IP "" 2
1892 Use \fIformat\fR to output a group of lines taken from just the first
1893 file in if-then-else format.  see node `Line group formats\(aq in the CVS manual.
1894 .SP
1895 .IP "" 0
1896 \fB--old-line-format=\fIformat\fB\fR
1897 .IP "" 2
1898 Use \fIformat\fR to output a line taken from just the first file in
1899 if-then-else format.  see node `Line formats\(aq in the CVS manual.
1900 .SP
1901 .IP "" 0
1902 \fB-p\fR
1903 .IP "" 2
1904 Show which C function each change is in.
1905 .SP
1906 .IP "" 0
1907 \fB--rcs\fR
1908 .IP "" 2
1909 Output RCS-format diffs; like \fB-f\fR except that each command
1910 specifies the number of lines affected.
1911 .SP
1912 .IP "" 0
1913 \fB--report-identical-files\fR
1914 .IP "" 2
1915 .IP "" 0
1916 \fB-s\fR
1917 .IP "" 2
1918 Report when two files are the same.
1919 .SP
1920 .IP "" 0
1921 \fB--show-c-function\fR
1922 .IP "" 2
1923 Show which C function each change is in.
1924 .SP
1925 .IP "" 0
1926 \fB--show-function-line=\fIregexp\fB\fR
1927 .IP "" 2
1928 In context and unified format, for each hunk of differences, show some
1929 of the last preceding line that matches \fIregexp\fR.
1930 .SP
1931 .IP "" 0
1932 \fB--side-by-side\fR
1933 .IP "" 2
1934 Use the side by side output format.
1935 .SP
1936 .IP "" 0
1937 \fB--speed-large-files\fR
1938 .IP "" 2
1939 Use heuristics to speed handling of large files that have numerous
1940 scattered small changes.
1941 .SP
1942 .IP "" 0
1943 \fB--suppress-common-lines\fR
1944 .IP "" 2
1945 Do not print common lines in side by side format.
1946 .SP
1947 .IP "" 0
1948 \fB-t\fR
1949 .IP "" 2
1950 Expand tabs to spaces in the output, to preserve the alignment of tabs
1951 in the input files.
1952 .SP
1953 .IP "" 0
1954 \fB-T\fR
1955 .IP "" 2
1956 Output a tab rather than a space before the text of a line in normal or
1957 context format.  This causes the alignment of tabs in the line to look
1958 normal.
1959 .SP
1960 .IP "" 0
1961 \fB--text\fR
1962 .IP "" 2
1963 Treat all files as text and compare them line-by-line, even if they
1964 do not appear to be text.
1965 .SP
1966 .IP "" 0
1967 \fB-u\fR
1968 .IP "" 2
1969 Use the unified output format.
1970 .SP
1971 .IP "" 0
1972 \fB--unchanged-group-format=\fIformat\fB\fR
1973 .IP "" 2
1974 Use \fIformat\fR to output a group of common lines taken from both files
1975 in if-then-else format.  see node `Line group formats\(aq in the CVS manual.
1976 .SP
1977 .IP "" 0
1978 \fB--unchanged-line-format=\fIformat\fB\fR
1979 .IP "" 2
1980 Use \fIformat\fR to output a line common to both files in if-then-else
1981 format.  see node `Line formats\(aq in the CVS manual.
1982 .SP
1983 .IP "" 0
1984 \fB-U \fIlines\fB\fR
1985 .IP "" 2
1986 .IP "" 0
1987 \fB--unified\fR[\fB=\fIlines\fB\fR]\fB\fR
1988 .IP "" 2
1989 Use the unified output format, showing \fIlines\fR (an integer) lines of
1990 context, or three if \fIlines\fR is not given.
1991 For proper operation, \fBpatch\fR typically needs at least two lines of
1992 context.
1993 .SP
1994 .IP "" 0
1995 \fB-w\fR
1996 .IP "" 2
1997 Ignore white space when comparing lines.
1998 .SP
1999 .IP "" 0
2000 \fB-W \fIcolumns\fB\fR
2001 .IP "" 2
2002 .IP "" 0
2003 \fB--width=\fIcolumns\fB\fR
2004 .IP "" 2
2005 Use an output width of \fIcolumns\fR in side by side format.
2006 .SP
2007 .IP "" 0
2008 \fB-y\fR
2009 .IP "" 2
2010 Use the side by side output format.
2011 .SP
2012 .SH "Line group formats"
2013 .SP
2014 Line group formats let you specify formats suitable for many
2015 applications that allow if-then-else input, including programming
2016 languages and text formatting languages.  A line group format specifies
2017 the output format for a contiguous group of similar lines.
2018 .SP
2019 For example, the following command compares the TeX file \fBmyfile\fR
2020 with the original version from the repository,
2021 and outputs a merged file in which old regions are
2022 surrounded by \fB\\begin{em}\fR-\fB\\end{em}\fR lines, and new
2023 regions are surrounded by \fB\\begin{bf}\fR-\fB\\end{bf}\fR lines.
2024 .SP
2025 .PD 0
2026 .SP
2027 .IP "" 2
2028 cvs diff \\
2029 .IP "" 2
2030    --old-group-format=\(aq\\begin{em}
2031 .IP "" 2
2032 %<\\end{em}
2033 .IP "" 2
2034 \(aq \\
2035 .IP "" 2
2036    --new-group-format=\(aq\\begin{bf}
2037 .IP "" 2
2038 %>\\end{bf}
2039 .IP "" 2
2040 \(aq \\
2041 .IP "" 2
2042    myfile
2043
2044 .PD
2045 .IP "" 0
2046 .SP
2047 The following command is equivalent to the above example, but it is a
2048 little more verbose, because it spells out the default line group formats.
2049 .SP
2050 .PD 0
2051 .SP
2052 .IP "" 2
2053 cvs diff \\
2054 .IP "" 2
2055    --old-group-format=\(aq\\begin{em}
2056 .IP "" 2
2057 %<\\end{em}
2058 .IP "" 2
2059 \(aq \\
2060 .IP "" 2
2061    --new-group-format=\(aq\\begin{bf}
2062 .IP "" 2
2063 %>\\end{bf}
2064 .IP "" 2
2065 \(aq \\
2066 .IP "" 2
2067    --unchanged-group-format=\(aq%=\(aq \\
2068 .IP "" 2
2069    --changed-group-format=\(aq\\begin{em}
2070 .IP "" 2
2071 %<\\end{em}
2072 .IP "" 2
2073 \\begin{bf}
2074 .IP "" 2
2075 %>\\end{bf}
2076 .IP "" 2
2077 \(aq \\
2078 .IP "" 2
2079    myfile
2080
2081 .PD
2082 .IP "" 0
2083 .SP
2084 Here is a more advanced example, which outputs a diff listing with
2085 headers containing line numbers in a \`\`plain English\(aq\(aq style.
2086 .SP
2087 .PD 0
2088 .SP
2089 .IP "" 2
2090 cvs diff \\
2091 .IP "" 2
2092    --unchanged-group-format=\(aq\(aq \\
2093 .IP "" 2
2094    --old-group-format=\(aq-------- %dn line%(n=1?:s) deleted at %df:
2095 .IP "" 2
2096 %<\(aq \\
2097 .IP "" 2
2098    --new-group-format=\(aq-------- %dN line%(N=1?:s) added after %de:
2099 .IP "" 2
2100 %>\(aq \\
2101 .IP "" 2
2102    --changed-group-format=\(aq-------- %dn line%(n=1?:s) changed at %df:
2103 .IP "" 2
2104 %<-------- to:
2105 .IP "" 2
2106 %>\(aq \\
2107 .IP "" 2
2108    myfile
2109
2110 .PD
2111 .IP "" 0
2112 .SP
2113 To specify a line group format, use one of the options
2114 listed below.  You can specify up to four line group formats, one for
2115 each kind of line group.  You should quote \fIformat\fR, because it
2116 typically contains shell metacharacters.
2117 .SP
2118 .IP "" 0
2119 \fB--old-group-format=\fIformat\fB\fR
2120 .IP "" 2
2121 These line groups are hunks containing only lines from the first file.
2122 The default old group format is the same as the changed group format if
2123 it is specified; otherwise it is a format that outputs the line group as-is.
2124 .SP
2125 .IP "" 0
2126 \fB--new-group-format=\fIformat\fB\fR
2127 .IP "" 2
2128 These line groups are hunks containing only lines from the second
2129 file.  The default new group format is same as the changed group
2130 format if it is specified; otherwise it is a format that outputs the
2131 line group as-is.
2132 .SP
2133 .IP "" 0
2134 \fB--changed-group-format=\fIformat\fB\fR
2135 .IP "" 2
2136 These line groups are hunks containing lines from both files.  The
2137 default changed group format is the concatenation of the old and new
2138 group formats.
2139 .SP
2140 .IP "" 0
2141 \fB--unchanged-group-format=\fIformat\fB\fR
2142 .IP "" 2
2143 These line groups contain lines common to both files.  The default
2144 unchanged group format is a format that outputs the line group as-is.
2145 .SP
2146 In a line group format, ordinary characters represent themselves;
2147 conversion specifications start with \fB%\fR and have one of the
2148 following forms.
2149 .SP
2150 .IP "" 0
2151 \fB%<\fR
2152 .IP "" 2
2153 stands for the lines from the first file, including the trailing newline.
2154 Each line is formatted according to the old line format (see node `Line formats\(aq in the CVS manual).
2155 .SP
2156 .IP "" 0
2157 \fB%>\fR
2158 .IP "" 2
2159 stands for the lines from the second file, including the trailing newline.
2160 Each line is formatted according to the new line format.
2161 .SP
2162 .IP "" 0
2163 \fB%=\fR
2164 .IP "" 2
2165 stands for the lines common to both files, including the trailing newline.
2166 Each line is formatted according to the unchanged line format.
2167 .SP
2168 .IP "" 0
2169 \fB%%\fR
2170 .IP "" 2
2171 stands for \fB%\fR.
2172 .SP
2173 .IP "" 0
2174 \fB%c\(aq\fIC\fB\(aq\fR
2175 .IP "" 2
2176 where \fIC\fR is a single character, stands for \fIC\fR.
2177 \fIC\fR may not be a backslash or an apostrophe.
2178 For example, \fB%c\(aq:\(aq\fR stands for a colon, even inside
2179 the then-part of an if-then-else format, which a colon would
2180 normally terminate.
2181 .SP
2182 .IP "" 0
2183 \fB%c\(aq\\\fIO\fB\(aq\fR
2184 .IP "" 2
2185 where \fIO\fR is a string of 1, 2, or 3 octal digits,
2186 stands for the character with octal code \fIO\fR.
2187 For example, \fB%c\(aq\\0\(aq\fR stands for a null character.
2188 .SP
2189 .IP "" 0
2190 \fB\fIF\fB\fIn\fB\fR
2191 .IP "" 2
2192 where \fIF\fR is a \fBprintf\fR conversion specification and \fIn\fR is one
2193 of the following letters, stands for \fIn\fR\(aqs value formatted with \fIF\fR.
2194 .SP
2195 .IP "" 2
2196 \fBe\fR
2197 .IP "" 4
2198 The line number of the line just before the group in the old file.
2199 .SP
2200 .IP "" 2
2201 \fBf\fR
2202 .IP "" 4
2203 The line number of the first line in the group in the old file;
2204 equals \fIe\fR + 1.
2205 .SP
2206 .IP "" 2
2207 \fBl\fR
2208 .IP "" 4
2209 The line number of the last line in the group in the old file.
2210 .SP
2211 .IP "" 2
2212 \fBm\fR
2213 .IP "" 4
2214 The line number of the line just after the group in the old file;
2215 equals \fIl\fR + 1.
2216 .SP
2217 .IP "" 2
2218 \fBn\fR
2219 .IP "" 4
2220 The number of lines in the group in the old file; equals \fIl\fR - \fIf\fR + 1.
2221 .SP
2222 .IP "" 2
2223 \fBE, F, L, M, N\fR
2224 .IP "" 4
2225 Likewise, for lines in the new file.
2226 .SP
2227 .SP
2228 The \fBprintf\fR conversion specification can be \fB%d\fR,
2229 \fB%o\fR, \fB%x\fR, or \fB%X\fR, specifying decimal, octal,
2230 lower case hexadecimal, or upper case hexadecimal output
2231 respectively.  After the \fB%\fR the following options can appear in
2232 sequence: a \fB-\fR specifying left-justification; an integer
2233 specifying the minimum field width; and a period followed by an
2234 optional integer specifying the minimum number of digits.
2235 For example, \fB%5dN\fR prints the number of new lines in the group
2236 in a field of width 5 characters, using the \fBprintf\fR format \fB"%5d"\fR.
2237 .SP
2238 .IP "" 0
2239 \fB(\fIA\fB=\fIB\fB?\fIT\fB:\fIE\fB)\fR
2240 .IP "" 2
2241 If \fIA\fR equals \fIB\fR then \fIT\fR else \fIE\fR.
2242 \fIA\fR and \fIB\fR are each either a decimal constant
2243 or a single letter interpreted as above.
2244 This format spec is equivalent to \fIT\fR if
2245 \fIA\fR\(aqs value equals \fIB\fR\(aqs; otherwise it is equivalent to \fIE\fR.
2246 .SP
2247 For example, \fB%(N=0?no:%dN) line%(N=1?:s)\fR is equivalent to
2248 \fBno lines\fR if \fIN\fR (the number of lines in the group in the
2249 new file) is 0, to \fB1 line\fR if \fIN\fR is 1, and to \fB%dN lines\fR
2250 otherwise.
2251 .SP
2252 .SH "Line formats"
2253 .SP
2254 Line formats control how each line taken from an input file is
2255 output as part of a line group in if-then-else format.
2256 .SP
2257 For example, the following command outputs text with a one-column
2258 change indicator to the left of the text.  The first column of output
2259 is \fB-\fR for deleted lines, \fB|\fR for added lines, and a space
2260 for unchanged lines.  The formats contain newline characters where
2261 newlines are desired on output.
2262 .SP
2263 .PD 0
2264 .SP
2265 .IP "" 2
2266 cvs diff \\
2267 .IP "" 2
2268    --old-line-format=\(aq-%l
2269 .IP "" 2
2270 \(aq \\
2271 .IP "" 2
2272    --new-line-format=\(aq|%l
2273 .IP "" 2
2274 \(aq \\
2275 .IP "" 2
2276    --unchanged-line-format=\(aq %l
2277 .IP "" 2
2278 \(aq \\
2279 .IP "" 2
2280    myfile
2281
2282 .PD
2283 .IP "" 0
2284 .SP
2285 To specify a line format, use one of the following options.  You should
2286 quote \fIformat\fR, since it often contains shell metacharacters.
2287 .SP
2288 .IP "" 0
2289 \fB--old-line-format=\fIformat\fB\fR
2290 .IP "" 2
2291 formats lines just from the first file.
2292 .SP
2293 .IP "" 0
2294 \fB--new-line-format=\fIformat\fB\fR
2295 .IP "" 2
2296 formats lines just from the second file.
2297 .SP
2298 .IP "" 0
2299 \fB--unchanged-line-format=\fIformat\fB\fR
2300 .IP "" 2
2301 formats lines common to both files.
2302 .SP
2303 .IP "" 0
2304 \fB--line-format=\fIformat\fB\fR
2305 .IP "" 2
2306 formats all lines; in effect, it sets all three above options simultaneously.
2307 .SP
2308 In a line format, ordinary characters represent themselves;
2309 conversion specifications start with \fB%\fR and have one of the
2310 following forms.
2311 .SP
2312 .IP "" 0
2313 \fB%l\fR
2314 .IP "" 2
2315 stands for the contents of the line, not counting its trailing
2316 newline (if any).  This format ignores whether the line is incomplete.
2317 .SP
2318 .IP "" 0
2319 \fB%L\fR
2320 .IP "" 2
2321 stands for the contents of the line, including its trailing newline
2322 (if any).  If a line is incomplete, this format preserves its
2323 incompleteness.
2324 .SP
2325 .IP "" 0
2326 \fB%%\fR
2327 .IP "" 2
2328 stands for \fB%\fR.
2329 .SP
2330 .IP "" 0
2331 \fB%c\(aq\fIC\fB\(aq\fR
2332 .IP "" 2
2333 where \fIC\fR is a single character, stands for \fIC\fR.
2334 \fIC\fR may not be a backslash or an apostrophe.
2335 For example, \fB%c\(aq:\(aq\fR stands for a colon.
2336 .SP
2337 .IP "" 0
2338 \fB%c\(aq\\\fIO\fB\(aq\fR
2339 .IP "" 2
2340 where \fIO\fR is a string of 1, 2, or 3 octal digits,
2341 stands for the character with octal code \fIO\fR.
2342 For example, \fB%c\(aq\\0\(aq\fR stands for a null character.
2343 .SP
2344 .IP "" 0
2345 \fB\fIF\fBn\fR
2346 .IP "" 2
2347 where \fIF\fR is a \fBprintf\fR conversion specification,
2348 stands for the line number formatted with \fIF\fR.
2349 For example, \fB%.5dn\fR prints the line number using the
2350 \fBprintf\fR format \fB"%.5d"\fR.  see node `Line group formats\(aq in the CVS manual, for
2351 more about printf conversion specifications.
2352 .SP
2353 .SP
2354 The default line format is \fB%l\fR followed by a newline character.
2355 .SP
2356 If the input contains tab characters and it is important that they line
2357 up on output, you should ensure that \fB%l\fR or \fB%L\fR in a line
2358 format is just after a tab stop (e.g. by preceding \fB%l\fR or
2359 \fB%L\fR with a tab character), or you should use the \fB-t\fR or
2360 \fB--expand-tabs\fR option.
2361 .SP
2362 Taken together, the line and line group formats let you specify many
2363 different formats.  For example, the following command uses a format
2364 similar to \fBdiff\fR\(aqs normal format.  You can tailor this command
2365 to get fine control over \fBdiff\fR\(aqs output.
2366 .SP
2367 .PD 0
2368 .SP
2369 .IP "" 2
2370 cvs diff \\
2371 .IP "" 2
2372    --old-line-format=\(aq< %l
2373 .IP "" 2
2374 \(aq \\
2375 .IP "" 2
2376    --new-line-format=\(aq> %l
2377 .IP "" 2
2378 \(aq \\
2379 .IP "" 2
2380    --old-group-format=\(aq%df%(f=l?:,%dl)d%dE
2381 .IP "" 2
2382 %<\(aq \\
2383 .IP "" 2
2384    --new-group-format=\(aq%dea%dF%(F=L?:,%dL)
2385 .IP "" 2
2386 %>\(aq \\
2387 .IP "" 2
2388    --changed-group-format=\(aq%df%(f=l?:,%dl)c%dF%(F=L?:,%dL)
2389 .IP "" 2
2390 %<\(em
2391 .IP "" 2
2392 %>\(aq \\
2393 .IP "" 2
2394    --unchanged-group-format=\(aq\(aq \\
2395 .IP "" 2
2396    myfile
2397
2398 .PD
2399 .IP "" 0
2400 .SP
2401 .SH "diff examples"
2402 .SP
2403 The following line produces a Unidiff (\fB-u\fR flag)
2404 between revision 1.14 and 1.19 of
2405 \fBbackend.c\fR.  Due to the \fB-kk\fR flag no
2406 keywords are substituted, so differences that only depend
2407 on keyword substitution are ignored.
2408 .SP
2409 .PD 0
2410 .SP
2411 .IP "" 2
2412 $ cvs diff -kk -u -r 1.14 -r 1.19 backend.c
2413
2414 .PD
2415 .IP "" 0
2416 .SP
2417 Suppose the experimental branch EXPR1 was based on a
2418 set of files tagged RELEASE_1_0.  To see what has
2419 happened on that branch, the following can be used:
2420 .SP
2421 .PD 0
2422 .SP
2423 .IP "" 2
2424 $ cvs diff -r RELEASE_1_0 -r EXPR1
2425
2426 .PD
2427 .IP "" 0
2428 .SP
2429 A command like this can be used to produce a context
2430 diff between two releases:
2431 .SP
2432 .PD 0
2433 .SP
2434 .IP "" 2
2435 $ cvs diff -c -r RELEASE_1_0 -r RELEASE_1_1 > diffs
2436
2437 .PD
2438 .IP "" 0
2439 .SP
2440 If you are maintaining ChangeLogs, a command like the following
2441 just before you commit your changes may help you write
2442 the ChangeLog entry.  All local modifications that have
2443 not yet been committed will be printed.
2444 .SP
2445 .PD 0
2446 .SP
2447 .IP "" 2
2448 $ cvs diff -u | less
2449
2450 .PD
2451 .IP "" 0
2452 .SP
2453 .SH "export"
2454 .SS "Export sources from CVS, similar to checkout"
2455 .IX "export (subcommand)"
2456 .SP
2457 .IP "\(bu" 2
2458 Synopsis: export [-flNnR] [-r rev|-D date] [-k subst] [-d dir] module\&...
2459 .IP "\(bu" 2
2460 Requires: repository.
2461 .IP "\(bu" 2
2462 Changes: current directory.
2463 .SP
2464 This command is a variant of \fBcheckout\fR; use it
2465 when you want a copy of the source for module without
2466 the \fBcvs\fR administrative directories.  For example, you
2467 might use \fBexport\fR to prepare source for shipment
2468 off-site.  This command requires that you specify a
2469 date or tag (with \fB-D\fR or \fB-r\fR), so that you
2470 can count on reproducing the source you ship to others
2471 (and thus it always prunes empty directories).
2472 .SP
2473 One often would like to use \fB-kv\fR with \fBcvs
2474 export\fR.  This causes any keywords to be
2475 expanded such that an import done at some other site
2476 will not lose the keyword revision information.  But be
2477 aware that doesn\(aqt handle an export containing binary
2478 files correctly.  Also be aware that after having used
2479 \fB-kv\fR, one can no longer use the \fBident\fR
2480 command (which is part of the \fBrcs\fR suite\(emsee
2481 ident(1)) which looks for keyword strings.  If
2482 you want to be able to use \fBident\fR you must not
2483 use \fB-kv\fR.
2484 .SP
2485 .SH "export options"
2486 .SP
2487 These standard options are supported by \fBexport\fR
2488 (see node `Common options\(aq in the CVS manual, for a complete description of
2489 them):
2490 .SP
2491 .IP "" 0
2492 \fB-D \fIdate\fB\fR
2493 .IP "" 2
2494 Use the most recent revision no later than \fIdate\fR.
2495 .SP
2496 .IP "" 0
2497 \fB-f\fR
2498 .IP "" 2
2499 If no matching revision is found, retrieve the most
2500 recent revision (instead of ignoring the file).
2501 .SP
2502 .IP "" 0
2503 \fB-l\fR
2504 .IP "" 2
2505 Local; run only in current working directory.
2506 .SP
2507 .IP "" 0
2508 \fB-n\fR
2509 .IP "" 2
2510 Do not run any checkout program.
2511 .SP
2512 .IP "" 0
2513 \fB-R\fR
2514 .IP "" 2
2515 Export directories recursively.  This is on by default.
2516 .SP
2517 .IP "" 0
2518 \fB-r \fItag\fB\fR
2519 .IP "" 2
2520 Use revision \fItag\fR.
2521 .SP
2522 In addition, these options (that are common to
2523 \fBcheckout\fR and \fBexport\fR) are also supported:
2524 .SP
2525 .IP "" 0
2526 \fB-d \fIdir\fB\fR
2527 .IP "" 2
2528 Create a directory called \fIdir\fR for the working
2529 files, instead of using the module name.
2530 see node `checkout options\(aq in the CVS manual, for complete details on how
2531 \fBcvs\fR handles this flag.
2532 .SP
2533 .IP "" 0
2534 \fB-k \fIsubst\fB\fR
2535 .IP "" 2
2536 Set keyword expansion mode (see node `Substitution modes\(aq in the CVS manual).
2537 .SP
2538 .IP "" 0
2539 \fB-N\fR
2540 .IP "" 2
2541 Only useful together with \fB-d \fIdir\fB\fR.
2542 see node `checkout options\(aq in the CVS manual, for complete details on how
2543 \fBcvs\fR handles this flag.
2544 .SP
2545 .SH "history"
2546 .SS "Show status of files and users"
2547 .IX "history (subcommand)"
2548 .SP
2549 .IP "\(bu" 2
2550 Synopsis:     history [-report] [-flags] [-options args] [files\&...]
2551 .IP "\(bu" 2
2552 Requires: the file \fB$CVSROOT/CVSROOT/history\fR
2553 .IP "\(bu" 2
2554 Changes: nothing.
2555 .SP
2556 \fBcvs\fR can keep a history file that tracks each use of the
2557 \fBcheckout\fR, \fBcommit\fR, \fBrtag\fR,
2558 \fBupdate\fR, and \fBrelease\fR commands.  You can
2559 use \fBhistory\fR to display this information in
2560 various formats.
2561 .SP
2562 Logging must be enabled by creating the file
2563 \fB$CVSROOT/CVSROOT/history\fR.
2564 .SP
2565 \fBNote: \fBhistory\fB uses \fB-f\fB, \fB-l\fB,
2566 \fB-n\fB, and \fB-p\fB in ways that conflict with the
2567 normal use inside \fBcvs\fB (see node `Common options\(aq in the CVS manual).\fR
2568 .SP
2569 .SH "history options"
2570 .SP
2571 Several options (shown above as \fB-report\fR)  control  what
2572 kind of report is generated:
2573 .SP
2574 .IP "" 0
2575 \fB-c\fR
2576 .IP "" 2
2577 Report on each time commit was used (i.e., each time
2578 the repository was modified).
2579 .SP
2580 .IP "" 0
2581 \fB-e\fR
2582 .IP "" 2
2583 Everything (all record types).  Equivalent to
2584 specifying \fB-x\fR with all record types.  Of course,
2585 \fB-e\fR will also include record types which are
2586 added in a future version of \fBcvs\fR; if you are
2587 writing a script which can only handle certain record
2588 types, you\(aqll want to specify \fB-x\fR.
2589 .SP
2590 .IP "" 0
2591 \fB-m \fImodule\fB\fR
2592 .IP "" 2
2593 Report on a particular module.  (You can meaningfully
2594 use \fB-m\fR more than once on the command line.)
2595 .SP
2596 .IP "" 0
2597 \fB-o\fR
2598 .IP "" 2
2599 Report on checked-out modules.  This is the default report type.
2600 .SP
2601 .IP "" 0
2602 \fB-T\fR
2603 .IP "" 2
2604 Report on all tags.
2605 .SP
2606 .IP "" 0
2607 \fB-x \fItype\fB\fR
2608 .IP "" 2
2609 Extract a particular set of record types \fItype\fR from the \fBcvs\fR
2610 history.  The types are indicated by single letters,
2611 which you may specify in combination.
2612 .SP
2613 Certain commands have a single record type:
2614 .SP
2615 .IP "" 2
2616 \fBF\fR
2617 .IP "" 4
2618 release
2619 .IP "" 2
2620 \fBO\fR
2621 .IP "" 4
2622 checkout
2623 .IP "" 2
2624 \fBE\fR
2625 .IP "" 4
2626 export
2627 .IP "" 2
2628 \fBT\fR
2629 .IP "" 4
2630 rtag
2631 .SP
2632 One of five record types may result from an update:
2633 .SP
2634 .IP "" 2
2635 \fBC\fR
2636 .IP "" 4
2637 A merge was necessary but collisions were
2638 detected (requiring manual merging).
2639 .IP "" 2
2640 \fBG\fR
2641 .IP "" 4
2642 A merge was necessary and it succeeded.
2643 .IP "" 2
2644 \fBU\fR
2645 .IP "" 4
2646 A working file was copied from the repository.
2647 .IP "" 2
2648 \fBP\fR
2649 .IP "" 4
2650 A working file was patched to match the repository.
2651 .IP "" 2
2652 \fBW\fR
2653 .IP "" 4
2654 The working copy of a file was deleted during
2655 update (because it was gone from the repository).
2656 .SP
2657 One of three record types results from commit:
2658 .SP
2659 .IP "" 2
2660 \fBA\fR
2661 .IP "" 4
2662 A file was added for the first time.
2663 .IP "" 2
2664 \fBM\fR
2665 .IP "" 4
2666 A file was modified.
2667 .IP "" 2
2668 \fBR\fR
2669 .IP "" 4
2670 A file was removed.
2671 .SP
2672 The options shown as \fB-flags\fR constrain or expand
2673 the report without requiring option arguments:
2674 .SP
2675 .IP "" 0
2676 \fB-a\fR
2677 .IP "" 2
2678 Show data for all users (the default is to show data
2679 only for the user executing \fBhistory\fR).
2680 .SP
2681 .IP "" 0
2682 \fB-l\fR
2683 .IP "" 2
2684 Show last modification only.
2685 .SP
2686 .IP "" 0
2687 \fB-w\fR
2688 .IP "" 2
2689 Show only the records for modifications done from the
2690 same working directory where \fBhistory\fR is
2691 executing.
2692 .SP
2693 The options shown as \fB-options \fIargs\fB\fR constrain the report
2694 based on an argument:
2695 .SP
2696 .IP "" 0
2697 \fB-b \fIstr\fB\fR
2698 .IP "" 2
2699 Show data back to a record containing  the  string
2700 \fIstr\fR  in  either the module name, the file name, or
2701 the repository path.
2702 .SP
2703 .IP "" 0
2704 \fB-D \fIdate\fB\fR
2705 .IP "" 2
2706 Show data since \fIdate\fR.  This is slightly different
2707 from the normal use of \fB-D \fIdate\fB\fR, which
2708 selects the newest revision older than \fIdate\fR.
2709 .SP
2710 .IP "" 0
2711 \fB-f \fIfile\fB\fR
2712 .IP "" 2
2713 Show data for a particular file
2714 (you can specify several \fB-f\fR options on the same command line).
2715 This is equivalent to specifying the file on the command line.
2716 .SP
2717 .IP "" 0
2718 \fB-n \fImodule\fB\fR
2719 .IP "" 2
2720 Show data for a particular module
2721 (you can specify several \fB-n\fR options on the same command line).
2722 .SP
2723 .IP "" 0
2724 \fB-p \fIrepository\fB\fR
2725 .IP "" 2
2726 Show data for a particular source repository  (you
2727 can specify several \fB-p\fR options on the same command
2728 line).
2729 .SP
2730 .IP "" 0
2731 \fB-r \fIrev\fB\fR
2732 .IP "" 2
2733 Show records referring to revisions since the revision
2734 or tag named \fIrev\fR appears in individual \fBrcs\fR
2735 files.  Each \fBrcs\fR file is searched for the revision or
2736 tag.
2737 .SP
2738 .IP "" 0
2739 \fB-t \fItag\fB\fR
2740 .IP "" 2
2741 Show records since tag \fItag\fR was last added to the
2742 history file.  This differs from the \fB-r\fR flag
2743 above in that it reads only the history file, not the
2744 \fBrcs\fR files, and is much faster.
2745 .SP
2746 .IP "" 0
2747 \fB-u \fIname\fB\fR
2748 .IP "" 2
2749 Show records for user \fIname\fR.
2750 .SP
2751 .IP "" 0
2752 \fB-z \fItimezone\fB\fR
2753 .IP "" 2
2754 Show times in the selected records using the specified
2755 time zone instead of UTC.
2756 .SP
2757 .SH "import"
2758 .SS "Import sources into CVS, using vendor branches"
2759 .IX "import (subcommand)"
2760 .SP
2761 .IP "\(bu" 2
2762 Synopsis: import [-options] repository vendortag releasetag\&...
2763 .IP "\(bu" 2
2764 Requires: Repository, source distribution directory.
2765 .IP "\(bu" 2
2766 Changes: repository.
2767 .SP
2768 Use \fBimport\fR to incorporate an entire source
2769 distribution from an outside source (e.g., a source
2770 vendor) into your source repository directory.  You can
2771 use this command both for initial creation of a
2772 repository, and for wholesale updates to the module
2773 from the outside source.  see node `Tracking sources\(aq in the CVS manual, for
2774 a discussion on this subject.
2775 .SP
2776 The \fIrepository\fR argument gives a directory name
2777 (or a path to a directory) under the \fBcvs\fR root directory
2778 for repositories; if the directory did not exist,
2779 import creates it.
2780 .SP
2781 When you use import for updates to source that has been
2782 modified in your source repository (since a prior
2783 import), it will notify you of any files that conflict
2784 in the two branches of development; use \fBcheckout
2785 -j\fR to reconcile the differences, as import instructs
2786 you to do.
2787 .SP
2788 If \fBcvs\fR decides a file should be ignored
2789 (see node `cvsignore\(aq in the CVS manual), it does not import it and prints
2790 \fBI \fR followed by the filename (see node `import output\(aq in the CVS manual, for a
2791 complete description of the output).
2792 .SP
2793 If the file \fB$CVSROOT/CVSROOT/cvswrappers\fR exists,
2794 any file whose names match the specifications in that
2795 file will be treated as packages and the appropriate
2796 filtering will be performed on the file/directory
2797 before being imported.  see node `Wrappers\(aq in the CVS manual.
2798 .SP
2799 The outside source is saved in a first-level
2800 branch, by default 1.1.1.  Updates are leaves of this
2801 branch; for example, files from the first imported
2802 collection of source will be revision 1.1.1.1, then
2803 files from the first imported update will be revision
2804 1.1.1.2, and so on.
2805 .SP
2806 At least three arguments are required.
2807 \fIrepository\fR is needed to identify the collection
2808 of source.  \fIvendortag\fR is a tag for the entire
2809 branch (e.g., for 1.1.1).  You must also specify at
2810 least one \fIreleasetag\fR to identify the files at
2811 the leaves created each time you execute \fBimport\fR.
2812 .SP
2813 Note that \fBimport\fR does \fInot\fR change the
2814 directory in which you invoke it.  In particular, it
2815 does not set up that directory as a \fBcvs\fR working
2816 directory; if you want to work with the sources import
2817 them first and then check them out into a different
2818 directory (see node `Getting the source\(aq in the CVS manual).
2819 .SP
2820 .SH "import options"
2821 .SP
2822 This standard option is supported by \fBimport\fR
2823 (see node `Common options\(aq in the CVS manual, for a complete description):
2824 .SP
2825 .IP "" 0
2826 \fB-m \fImessage\fB\fR
2827 .IP "" 2
2828 Use \fImessage\fR as log information, instead of
2829 invoking an editor.
2830 .SP
2831 There are the following additional special options.
2832 .SP
2833 .IP "" 0
2834 \fB-b \fIbranch\fB\fR
2835 .IP "" 2
2836 See see node `Multiple vendor branches\(aq in the CVS manual.
2837 .SP
2838 .IP "" 0
2839 \fB-k \fIsubst\fB\fR
2840 .IP "" 2
2841 Indicate the keyword expansion mode desired.  This
2842 setting will apply to all files created during the
2843 import, but not to any files that previously existed in
2844 the repository.  See see node `Substitution modes\(aq in the CVS manual, for a
2845 list of valid \fB-k\fR settings.
2846 .SP
2847 .IP "" 0
2848 \fB-I \fIname\fB\fR
2849 .IP "" 2
2850 Specify file names that should be ignored during
2851 import.  You can use this option repeatedly.  To avoid
2852 ignoring any files at all (even those ignored by
2853 default), specify \`-I !\(aq.
2854 .SP
2855 \fIname\fR can be a file name pattern of the same type
2856 that you can specify in the \fB.cvsignore\fR file.
2857 see node `cvsignore\(aq in the CVS manual.
2858 .SP
2859 .IP "" 0
2860 \fB-W \fIspec\fB\fR
2861 .IP "" 2
2862 Specify file names that should be filtered during
2863 import.  You can use this option repeatedly.
2864 .SP
2865 \fIspec\fR can be a file name pattern of the same type
2866 that you can specify in the \fB.cvswrappers\fR
2867 file. see node `Wrappers\(aq in the CVS manual.
2868 .SP
2869 .SH "import output"
2870 .SP
2871 \fBimport\fR keeps you informed of its progress by printing a line
2872 for each file, preceded by one character indicating the status of the file:
2873 .SP
2874 .IP "" 0
2875 \fBU \fIfile\fB\fR
2876 .IP "" 2
2877 The file already exists in the repository and has not been locally
2878 modified; a new revision has been created (if necessary).
2879 .SP
2880 .IP "" 0
2881 \fBN \fIfile\fB\fR
2882 .IP "" 2
2883 The file is a new file which has been added to the repository.
2884 .SP
2885 .IP "" 0
2886 \fBC \fIfile\fB\fR
2887 .IP "" 2
2888 The file already exists in the repository but has been locally modified;
2889 you will have to merge the changes.
2890 .SP
2891 .IP "" 0
2892 \fBI \fIfile\fB\fR
2893 .IP "" 2
2894 The file is being ignored (see node `cvsignore\(aq in the CVS manual).
2895 .SP
2896 .IX "Symbolic link, importing"
2897 .IX "Link, symbolic, importing"
2898 .IP "" 0
2899 \fBL \fIfile\fB\fR
2900 .IP "" 2
2901 The file is a symbolic link; \fBcvs import\fR ignores symbolic links.
2902 People periodically suggest that this behavior should
2903 be changed, but if there is a consensus on what it
2904 should be changed to, it doesn\(aqt seem to be apparent.
2905 (Various options in the \fBmodules\fR file can be used
2906 to recreate symbolic links on checkout, update, etc.;
2907 see node `modules\(aq in the CVS manual.)
2908 .SP
2909 .SH "import examples"
2910 .SP
2911 See see node `Tracking sources\(aq in the CVS manual, and see node `From files\(aq in the CVS manual.
2912 .SP
2913 .SH "log"
2914 .SS "Print out log information for files"
2915 .IX "log (subcommand)"
2916 .SP
2917 .IP "\(bu" 2
2918 Synopsis: log [options] [files\&...]
2919 .IP "\(bu" 2
2920 Requires: repository, working directory.
2921 .IP "\(bu" 2
2922 Changes: nothing.
2923 .SP
2924 Display log information for files.  \fBlog\fR used to
2925 call the \fBrcs\fR utility \fBrlog\fR.  Although this
2926 is no longer true in the current sources, this history
2927 determines the format of the output and the options,
2928 which are not quite in the style of the other \fBcvs\fR
2929 commands.
2930 .SP
2931 .IX "Timezone, in output"
2932 .IX "Zone, time, in output"
2933 The output includes the location of the \fBrcs\fR file,
2934 the \fIhead\fR revision (the latest revision on the
2935 trunk), all symbolic names (tags) and some other
2936 things.  For each revision, the revision number, the
2937 author, the number of lines added/deleted and the log
2938 message are printed.  All times are displayed in
2939 Coordinated Universal Time (UTC).  (Other parts of
2940 \fBcvs\fR print times in the local timezone).
2941 .SP
2942 \fBNote: \fBlog\fB uses \fB-R\fB in a way that conflicts
2943 with the normal use inside \fBcvs\fB (see node `Common options\(aq in the CVS manual).\fR
2944 .SP
2945 .SH "log options"
2946 .SP
2947 By default, \fBlog\fR prints all information that is
2948 available.  All other options restrict the output.
2949 .SP
2950 .IP "" 0
2951 \fB-b\fR
2952 .IP "" 2
2953 Print information about the revisions on the default
2954 branch, normally the highest branch on the trunk.
2955 .SP
2956 .IP "" 0
2957 \fB-d \fIdates\fB\fR
2958 .IP "" 2
2959 Print information about revisions with a checkin
2960 date/time in the range given by the
2961 semicolon-separated list of dates.  The date formats
2962 accepted are those accepted by the \fB-D\fR option to
2963 many other \fBcvs\fR commands (see node `Common options\(aq in the CVS manual).
2964 Dates can be combined into ranges as follows:
2965 .SP
2966 .IP "" 2
2967 \fB\fId1\fB<\fId2\fB\fR
2968 .IP "" 4
2969 .IP "" 2
2970 \fB\fId2\fB>\fId1\fB\fR
2971 .IP "" 4
2972 Select the revisions that were deposited between
2973 \fId1\fR and \fId2\fR.
2974 .SP
2975 .IP "" 2
2976 \fB<\fId\fB\fR
2977 .IP "" 4
2978 .IP "" 2
2979 \fB\fId\fB>\fR
2980 .IP "" 4
2981 Select all revisions dated \fId\fR or earlier.
2982 .SP
2983 .IP "" 2
2984 \fB\fId\fB<\fR
2985 .IP "" 4
2986 .IP "" 2
2987 \fB>\fId\fB\fR
2988 .IP "" 4
2989 Select all revisions dated \fId\fR or later.
2990 .SP
2991 .IP "" 2
2992 \fB\fId\fB\fR
2993 .IP "" 4
2994 Select the single, latest revision dated \fId\fR or
2995 earlier.
2996 .SP
2997 The \fB>\fR or \fB<\fR characters may be followed by
2998 \fB=\fR to indicate an inclusive range rather than an
2999 exclusive one.
3000 .SP
3001 Note that the separator is a semicolon (;).
3002 .SP
3003 .IP "" 0
3004 \fB-h\fR
3005 .IP "" 2
3006 Print only the name of the \fBrcs\fR file, name
3007 of the file in the working directory, head,
3008 default branch, access list, locks, symbolic names, and
3009 suffix.
3010 .SP
3011 .IP "" 0
3012 \fB-l\fR
3013 .IP "" 2
3014 Local; run only in current working directory.  (Default
3015 is to run recursively).
3016 .SP
3017 .IP "" 0
3018 \fB-N\fR
3019 .IP "" 2
3020 Do not print the list of tags for this file.  This
3021 option can be very useful when your site uses a lot of
3022 tags, so rather than "more"\(aqing over 3 pages of tag
3023 information, the log information is presented without
3024 tags at all.
3025 .SP
3026 .IP "" 0
3027 \fB-R\fR
3028 .IP "" 2
3029 Print only the name of the \fBrcs\fR file.
3030 .SP
3031 .IP "" 0
3032 \fB-r\fIrevisions\fB\fR
3033 .IP "" 2
3034 Print information about revisions given in the
3035 comma-separated list \fIrevisions\fR of revisions and
3036 ranges.  The following table explains the available
3037 range formats:
3038 .SP
3039 .IP "" 2
3040 \fB\fIrev1\fB:\fIrev2\fB\fR
3041 .IP "" 4
3042 Revisions \fIrev1\fR to \fIrev2\fR (which must be on
3043 the same branch).
3044 .SP
3045 .IP "" 2
3046 \fB\fIrev1\fB::\fIrev2\fB\fR
3047 .IP "" 4
3048 The same, but excluding \fIrev1\fR.
3049 .SP
3050 .IP "" 2
3051 \fB:\fIrev\fB\fR
3052 .IP "" 4
3053 .IP "" 2
3054 \fB::\fIrev\fB\fR
3055 .IP "" 4
3056 Revisions from the beginning of the branch up to
3057 and including \fIrev\fR.
3058 .SP
3059 .IP "" 2
3060 \fB\fIrev\fB:\fR
3061 .IP "" 4
3062 Revisions starting with \fIrev\fR to the end of the
3063 branch containing \fIrev\fR.
3064 .SP
3065 .IP "" 2
3066 \fB\fIrev\fB::\fR
3067 .IP "" 4
3068 Revisions starting just after \fIrev\fR to the end of the
3069 branch containing \fIrev\fR.
3070 .SP
3071 .IP "" 2
3072 \fB\fIbranch\fB\fR
3073 .IP "" 4
3074 An argument that is a branch means all revisions on
3075 that branch.
3076 .SP
3077 .IP "" 2
3078 \fB\fIbranch1\fB:\fIbranch2\fB\fR
3079 .IP "" 4
3080 .IP "" 2
3081 \fB\fIbranch1\fB::\fIbranch2\fB\fR
3082 .IP "" 4
3083 A range of branches means all revisions
3084 on the branches in that range.
3085 .SP
3086 .IP "" 2
3087 \fB\fIbranch\fB.\fR
3088 .IP "" 4
3089 The latest revision in \fIbranch\fR.
3090 .SP
3091 A bare \fB-r\fR with no revisions means the latest
3092 revision on the default branch, normally the trunk.
3093 There can be no space between the \fB-r\fR option and
3094 its argument.
3095 .SP
3096 .IP "" 0
3097 \fB-S\fR
3098 .IP "" 2
3099 Suppress the header if no revisions are selected.
3100 .SP
3101 .IP "" 0
3102 \fB-s \fIstates\fB\fR
3103 .IP "" 2
3104 Print information about revisions whose state
3105 attributes match one of the states given in the
3106 comma-separated list \fIstates\fR.
3107 .SP
3108 .IP "" 0
3109 \fB-t\fR
3110 .IP "" 2
3111 Print the same as \fB-h\fR, plus the descriptive text.
3112 .SP
3113 .IP "" 0
3114 \fB-w\fIlogins\fB\fR
3115 .IP "" 2
3116 Print information about revisions checked in by users
3117 with login names appearing in the comma-separated list
3118 \fIlogins\fR.  If \fIlogins\fR is omitted, the user\(aqs
3119 login is assumed.  There can be no space between the
3120 \fB-w\fR option and its argument.
3121 .SP
3122 \fBlog\fR prints the intersection of the revisions
3123 selected with the options \fB-d\fR, \fB-s\fR, and
3124 \fB-w\fR, intersected with the union of the revisions
3125 selected by \fB-b\fR and \fB-r\fR.
3126 .SP
3127 .SH "log examples"
3128 .SP
3129 Contributed examples are gratefully accepted.
3130 .SP
3131 .SH "rdiff"
3132 .SS "\(aqpatch\(aq format diffs between releases"
3133 .IX "rdiff (subcommand)"
3134 .SP
3135 .IP "\(bu" 2
3136 rdiff [-flags] [-V vn] [-r t|-D d [-r t2|-D d2]] modules\&...
3137 .IP "\(bu" 2
3138 Requires: repository.
3139 .IP "\(bu" 2
3140 Changes: nothing.
3141 .IP "\(bu" 2
3142 Synonym: patch
3143 .SP
3144 Builds a Larry Wall format patch(1) file between two
3145 releases, that can be fed directly into the \fBpatch\fR
3146 program to bring an old release up-to-date with the new
3147 release.  (This is one of the few \fBcvs\fR commands that
3148 operates directly from the repository, and doesn\(aqt
3149 require a prior checkout.) The diff output is sent to
3150 the standard output device.
3151 .SP
3152 You can specify (using the standard \fB-r\fR and
3153 \fB-D\fR options) any combination of one or two
3154 revisions or dates.  If only one revision or date is
3155 specified, the patch file reflects differences between
3156 that revision or date and the current head revisions in
3157 the \fBrcs\fR file.
3158 .SP
3159 Note that if the software release affected is contained
3160 in more than one directory, then it may be necessary to
3161 specify the \fB-p\fR option to the \fBpatch\fR command when
3162 patching the old sources, so that \fBpatch\fR is able to find
3163 the files that are located in other directories.
3164 .SP
3165 .SH "rdiff options"
3166 .SP
3167 These standard options are supported by \fBrdiff\fR
3168 (see node `Common options\(aq in the CVS manual, for a complete description of
3169 them):
3170 .SP
3171 .IP "" 0
3172 \fB-D \fIdate\fB\fR
3173 .IP "" 2
3174 Use the most recent revision no later than \fIdate\fR.
3175 .SP
3176 .IP "" 0
3177 \fB-f\fR
3178 .IP "" 2
3179 If no matching revision is found, retrieve the most
3180 recent revision (instead of ignoring the file).
3181 .SP
3182 .IP "" 0
3183 \fB-l\fR
3184 .IP "" 2
3185 Local; don\(aqt descend subdirectories.
3186 .SP
3187 .IP "" 0
3188 \fB-R\fR
3189 .IP "" 2
3190 Examine directories recursively.  This option is on by default.
3191 .SP
3192 .IP "" 0
3193 \fB-r \fItag\fB\fR
3194 .IP "" 2
3195 Use revision \fItag\fR.
3196 .SP
3197 In addition to the above, these options are available:
3198 .SP
3199 .IP "" 0
3200 \fB-c\fR
3201 .IP "" 2
3202 Use the context diff format.  This is the default format.
3203 .SP
3204 .IP "" 0
3205 \fB-s\fR
3206 .IP "" 2
3207 Create a summary change report instead of a patch.  The
3208 summary includes information about files that were
3209 changed or added between the releases.  It is sent to
3210 the standard output device.  This is useful for finding
3211 out, for example, which files have changed between two
3212 dates or revisions.
3213 .SP
3214 .IP "" 0
3215 \fB-t\fR
3216 .IP "" 2
3217 A diff of the top two revisions is sent to the standard
3218 output device.  This is most useful for seeing what the
3219 last change to a file was.
3220 .SP
3221 .IP "" 0
3222 \fB-u\fR
3223 .IP "" 2
3224 Use the unidiff format for the context diffs.
3225 Remember that old versions
3226 of the \fBpatch\fR program can\(aqt handle the unidiff
3227 format, so if you plan to post this patch to the net
3228 you should probably not use \fB-u\fR.
3229 .SP
3230 .IP "" 0
3231 \fB-V \fIvn\fB\fR
3232 .IP "" 2
3233 Expand keywords according to the rules current in
3234 \fBrcs\fR version \fIvn\fR (the expansion format changed with
3235 \fBrcs\fR version 5).  Note that this option is no
3236 longer accepted.  \fBcvs\fR will always expand keywords the
3237 way that \fBrcs\fR version 5 does.
3238 .SP
3239 .SH "rdiff examples"
3240 .SP
3241 Suppose you receive mail from \fRfoo@example.net\fR asking for an
3242 update from release 1.2 to 1.4 of the tc compiler.  You
3243 have no such patches on hand, but with \fBcvs\fR that can
3244 easily be fixed with a command such as this:
3245 .SP
3246 .PD 0
3247 .SP
3248 .IP "" 2
3249 $ cvs rdiff -c -r FOO1_2 -r FOO1_4 tc | \\
3250 .IP "" 2
3251 $$ Mail -s \(aqThe patches you asked for\(aq foo@example.net
3252
3253 .PD
3254 .IP "" 0
3255 .SP
3256 Suppose you have made release 1.3, and forked a branch
3257 called \fBR_1_3fix\fR for bug fixes.  \fBR_1_3_1\fR
3258 corresponds to release 1.3.1, which was made some time
3259 ago.  Now, you want to see how much development has been
3260 done on the branch.  This command can be used:
3261 .SP
3262 .PD 0
3263 .SP
3264 .IP "" 2
3265 $ cvs patch -s -r R_1_3_1 -r R_1_3fix module-name
3266 .IP "" 2
3267 cvs rdiff: Diffing module-name
3268 .IP "" 2
3269 File ChangeLog,v changed from revision 1.52.2.5 to 1.52.2.6
3270 .IP "" 2
3271 File foo.c,v changed from revision 1.52.2.3 to 1.52.2.4
3272 .IP "" 2
3273 File bar.h,v changed from revision 1.29.2.1 to 1.2
3274
3275 .PD
3276 .IP "" 0
3277 .SP
3278 .SH "release"
3279 .SS "Indicate that a Module is no longer in use"
3280 .IX "release (subcommand)"
3281 .SP
3282 .IP "\(bu" 2
3283 release [-d] directories\&...
3284 .IP "\(bu" 2
3285 Requires: Working directory.
3286 .IP "\(bu" 2
3287 Changes: Working directory, history log.
3288 .SP
3289 This command is meant to safely cancel the effect of
3290 \fBcvs checkout\fR.  Since \fBcvs\fR doesn\(aqt lock files, it
3291 isn\(aqt strictly necessary to use this command.  You can
3292 always simply delete your working directory, if you
3293 like; but you risk losing changes you may have
3294 forgotten, and you leave no trace in the \fBcvs\fR history
3295 file (see node `history file\(aq in the CVS manual) that you\(aqve abandoned your
3296 checkout.
3297 .SP
3298 Use \fBcvs release\fR to avoid these problems.  This
3299 command checks that no uncommitted changes are
3300 present; that you are executing it from immediately
3301 above a \fBcvs\fR working directory; and that the repository
3302 recorded for your files is the same as the repository
3303 defined in the module database.
3304 .SP
3305 If all these conditions are true, \fBcvs release\fR
3306 leaves a record of its execution (attesting to your
3307 intentionally abandoning your checkout) in the \fBcvs\fR
3308 history log.
3309 .SP
3310 .SH "release options"
3311 .SP
3312 The \fBrelease\fR command supports one command option:
3313 .SP
3314 .IP "" 0
3315 \fB-d\fR
3316 .IP "" 2
3317 Delete your working copy of the file if the release
3318 succeeds.  If this flag is not given your files will
3319 remain in your working directory.
3320 .SP
3321 \fBWARNING:  The \fBrelease\fB command deletes
3322 all directories and files recursively.  This
3323 has the very serious side-effect that any directory
3324 that you have created inside your checked-out sources,
3325 and not added to the repository (using the \fBadd\fB
3326 command; see node `Adding files\(aq in the CVS manual) will be silently deleted\(emeven
3327 if it is non-empty!\fR
3328 .SP
3329 .SH "release output"
3330 .SP
3331 Before \fBrelease\fR releases your sources it will
3332 print a one-line message for any file that is not
3333 up-to-date.
3334 .SP
3335 .IP "" 0
3336 \fBU \fIfile\fB\fR
3337 .IP "" 2
3338 .IP "" 0
3339 \fBP \fIfile\fB\fR
3340 .IP "" 2
3341 There exists a newer revision of this file in the
3342 repository, and you have not modified your local copy
3343 of the file (\fBU\fR and \fBP\fR mean the same thing).
3344 .SP
3345 .IP "" 0
3346 \fBA \fIfile\fB\fR
3347 .IP "" 2
3348 The file has been added to your private copy of the
3349 sources, but has not yet been committed to the
3350 repository.  If you delete your copy of the sources
3351 this file will be lost.
3352 .SP
3353 .IP "" 0
3354 \fBR \fIfile\fB\fR
3355 .IP "" 2
3356 The file has been removed from your private copy of the
3357 sources, but has not yet been removed from the
3358 repository, since you have not yet committed the
3359 removal.  see node `commit\(aq in the CVS manual.
3360 .SP
3361 .IP "" 0
3362 \fBM \fIfile\fB\fR
3363 .IP "" 2
3364 The file is modified in your working directory.  There
3365 might also be a newer revision inside the repository.
3366 .SP
3367 .IP "" 0
3368 \fB? \fIfile\fB\fR
3369 .IP "" 2
3370 \fIfile\fR is in your working directory, but does not
3371 correspond to anything in the source repository, and is
3372 not in the list of files for \fBcvs\fR to ignore (see the
3373 description of the \fB-I\fR option, and
3374 see node `cvsignore\(aq in the CVS manual).  If you remove your working
3375 sources, this file will be lost.
3376 .SP
3377 .SH "release examples"
3378 .SP
3379 Release the \fBtc\fR directory, and delete your local working copy
3380 of the files.
3381 .SP
3382 .PD 0
3383 .SP
3384 .IP "" 2
3385 $ cd \&..         # \fRYou must stand immediately above the\fR
3386 .IP "" 2
3387                 # \fRsources when you issue \fBcvs release\fR.\fR
3388 .IP "" 2
3389 $ cvs release -d tc
3390 .IP "" 2
3391 You have [0] altered files in this repository.
3392 .IP "" 2
3393 Are you sure you want to release (and delete) directory \`tc\(aq: y
3394 .IP "" 2
3395 $
3396
3397 .PD
3398 .IP "" 0
3399 .SP
3400 .SH "update"
3401 .SS "Bring work tree in sync with repository"
3402 .IX "update (subcommand)"
3403 .SP
3404 .IP "\(bu" 2
3405 update [-ACdflPpR] [-I name] [-j rev [-j rev]] [-k kflag] [-r tag|-D date] [-W spec] files\&...
3406 .IP "\(bu" 2
3407 Requires: repository, working directory.
3408 .IP "\(bu" 2
3409 Changes: working directory.
3410 .SP
3411 After you\(aqve run checkout to create your private copy
3412 of source from the common repository, other developers
3413 will continue changing the central source.  From time
3414 to time, when it is convenient in your development
3415 process, you can use the \fBupdate\fR command from
3416 within your working directory to reconcile your work
3417 with any revisions applied to the source repository
3418 since your last checkout or update.
3419 .SP
3420 .SH "update options"
3421 .SP
3422 These standard options are available with \fBupdate\fR
3423 (see node `Common options\(aq in the CVS manual, for a complete description of
3424 them):
3425 .SP
3426 .IP "" 0
3427 \fB-D date\fR
3428 .IP "" 2
3429 Use the most recent revision no later than \fIdate\fR.
3430 This option is sticky, and implies \fB-P\fR.
3431 See see node `Sticky tags\(aq in the CVS manual, for more information on sticky tags/dates.
3432 .SP
3433 .IP "" 0
3434 \fB-f\fR
3435 .IP "" 2
3436 Only useful with the \fB-D \fIdate\fB\fR or \fB-r
3437 \fItag\fB\fR flags.  If no matching revision is found,
3438 retrieve the most recent revision (instead of ignoring
3439 the file).
3440 .SP
3441 .IP "" 0
3442 \fB-k \fIkflag\fB\fR
3443 .IP "" 2
3444 Process keywords according to \fIkflag\fR.  See
3445 see node `Keyword substitution\(aq in the CVS manual.
3446 This option is sticky; future updates of
3447 this file in this working directory will use the same
3448 \fIkflag\fR.  The \fBstatus\fR command can be viewed
3449 to see the sticky options.  See see node `Invoking CVS\(aq in the CVS manual, for
3450 more information on the \fBstatus\fR command.
3451 .SP
3452 .IP "" 0
3453 \fB-l\fR
3454 .IP "" 2
3455 Local; run only in current working directory.  see node `Recursive behavior\(aq in the CVS manual.
3456 .SP
3457 .IP "" 0
3458 \fB-P\fR
3459 .IP "" 2
3460 Prune empty directories.  See see node `Moving directories\(aq in the CVS manual.
3461 .SP
3462 .IP "" 0
3463 \fB-p\fR
3464 .IP "" 2
3465 Pipe files to the standard output.
3466 .SP
3467 .IP "" 0
3468 \fB-R\fR
3469 .IP "" 2
3470 Update directories recursively (default).  see node `Recursive
3471 behavior\(aq in the CVS manual.
3472 .SP
3473 .IP "" 0
3474 \fB-r rev\fR
3475 .IP "" 2
3476 Retrieve revision/tag \fIrev\fR.  This option is sticky,
3477 and implies \fB-P\fR.
3478 See see node `Sticky tags\(aq in the CVS manual, for more information on sticky tags/dates.
3479 .SP
3480 These special options are also available with
3481 \fBupdate\fR.
3482 .SP
3483 .IP "" 0
3484 \fB-A\fR
3485 .IP "" 2
3486 Reset any sticky tags, dates, or \fB-k\fR options.
3487 See see node `Sticky tags\(aq in the CVS manual, for more information on sticky tags/dates.
3488 .SP
3489 .IP "" 0
3490 \fB-C\fR
3491 .IP "" 2
3492 Overwrite locally modified files with clean copies from
3493 the repository (the modified file is saved in
3494 \fB.#\fIfile\fB.\fIrevision\fB\fR, however).
3495 .SP
3496 .IP "" 0
3497 \fB-d\fR
3498 .IP "" 2
3499 Create any directories that exist in the repository if
3500 they\(aqre missing from the working directory.  Normally,
3501 \fBupdate\fR acts only on directories and files that
3502 were already enrolled in your working directory.
3503 .SP
3504 This is useful for updating directories that were
3505 created in the repository since the initial checkout;
3506 but it has an unfortunate side effect.  If you
3507 deliberately avoided certain directories in the
3508 repository when you created your working directory
3509 (either through use of a module name or by listing
3510 explicitly the files and directories you wanted on the
3511 command line), then updating with \fB-d\fR will create
3512 those directories, which may not be what you want.
3513 .SP
3514 .IP "" 0
3515 \fB-I \fIname\fB\fR
3516 .IP "" 2
3517 Ignore files whose names match \fIname\fR (in your
3518 working directory) during the update.  You can specify
3519 \fB-I\fR more than once on the command line to specify
3520 several files to ignore.  Use \fB-I !\fR to avoid
3521 ignoring any files at all.  see node `cvsignore\(aq in the CVS manual, for other
3522 ways to make \fBcvs\fR ignore some files.
3523 .SP
3524 .IP "" 0
3525 \fB-W\fIspec\fB\fR
3526 .IP "" 2
3527 Specify file names that should be filtered during
3528 update.  You can use this option repeatedly.
3529 .SP
3530 \fIspec\fR can be a file name pattern of the same type
3531 that you can specify in the \fB.cvswrappers\fR
3532 file. see node `Wrappers\(aq in the CVS manual.
3533 .SP
3534 .IP "" 0
3535 \fB-j\fIrevision\fB\fR
3536 .IP "" 2
3537 With two \fB-j\fR options, merge changes from the
3538 revision specified with the first \fB-j\fR option to
3539 the revision specified with the second \fBj\fR option,
3540 into the working directory.
3541 .SP
3542 With one \fB-j\fR option, merge changes from the
3543 ancestor revision to the revision specified with the
3544 \fB-j\fR option, into the working directory.  The
3545 ancestor revision is the common ancestor of the
3546 revision which the working directory is based on, and
3547 the revision specified in the \fB-j\fR option.
3548 .SP
3549 Note that using a single \fB-j \fItagname\fB\fR option rather than
3550 \fB-j \fIbranchname\fB\fR to merge changes from a branch will
3551 often not remove files which were removed on the branch.
3552 see node `Merging adds and removals\(aq in the CVS manual, for more.
3553 .SP
3554 In addition, each \fB-j\fR option can contain an optional
3555 date specification which, when used with branches, can
3556 limit the chosen revision to one within a specific
3557 date.  An optional date is specified by adding a colon
3558 (:) to the tag:
3559 \fB-j\fISymbolic_Tag\fB:\fIDate_Specifier\fB\fR.
3560 .SP
3561 see node `Branching and merging\(aq in the CVS manual.
3562 .SP
3563 .SP
3564 .SH "update output"
3565 .SP
3566 \fBupdate\fR and \fBcheckout\fR keep you informed of
3567 their progress by printing a line for each file, preceded
3568 by one character indicating the status of the file:
3569 .SP
3570 .IP "" 0
3571 \fBU \fIfile\fB\fR
3572 .IP "" 2
3573 The file was brought up to date with respect to the
3574 repository.  This is done for any file that exists in
3575 the repository but not in your source, and for files
3576 that you haven\(aqt changed but are not the most recent
3577 versions available in the repository.
3578 .SP
3579 .IP "" 0
3580 \fBP \fIfile\fB\fR
3581 .IP "" 2
3582 Like \fBU\fR, but the \fBcvs\fR server sends a patch instead of an entire
3583 file.  This accomplishes the same thing as \fBU\fR using less bandwidth.
3584 .SP
3585 .IP "" 0
3586 \fBA \fIfile\fB\fR
3587 .IP "" 2
3588 The file has been added to your private copy of the
3589 sources, and will be added to the source repository
3590 when you run \fBcommit\fR on the file.  This is a
3591 reminder to you that the file needs to be committed.
3592 .SP
3593 .IP "" 0
3594 \fBR \fIfile\fB\fR
3595 .IP "" 2
3596 The file has been removed from your private copy of the
3597 sources, and will be removed from the source repository
3598 when you run \fBcommit\fR on the file.  This is a
3599 reminder to you that the file needs to be committed.
3600 .SP
3601 .IP "" 0
3602 \fBM \fIfile\fB\fR
3603 .IP "" 2
3604 The file is modified in  your  working  directory.
3605 .SP
3606 \fBM\fR can indicate one of two states for a file
3607 you\(aqre working on: either there were no modifications
3608 to the same file in the repository, so that your file
3609 remains as you last saw it; or there were modifications
3610 in the repository as well as in your copy, but they
3611 were merged successfully, without conflict, in your
3612 working directory.
3613 .SP
3614 \fBcvs\fR will print some messages if it merges your work,
3615 and a backup copy of your working file (as it looked
3616 before you ran \fBupdate\fR) will be made.  The exact
3617 name of that file is printed while \fBupdate\fR runs.
3618 .SP
3619 .IP "" 0
3620 \fBC \fIfile\fB\fR
3621 .IP "" 2
3622 .IX "\&.# files"
3623 .IX "__ files (VMS)"
3624 A conflict was detected while trying to merge your
3625 changes to \fIfile\fR with changes from the source
3626 repository.  \fIfile\fR (the copy in your working
3627 directory) is now the result of attempting to merge
3628 the two revisions; an unmodified copy of your file
3629 is also in your working directory, with the name
3630 \fB.#\fIfile\fB.\fIrevision\fB\fR where \fIrevision\fR
3631 is the revision that your modified file started
3632 from.  Resolve the conflict as described in
3633 see node `Conflicts example\(aq in the CVS manual.
3634 (Note that some systems automatically purge
3635 files that begin with \fB.#\fR if they have not been
3636 accessed for a few days.  If you intend to keep a copy
3637 of your original file, it is a very good idea to rename
3638 it.)  Under \fBvms\fR, the file name starts with
3639 \fB__\fR rather than \fB.#\fR.
3640 .SP
3641 .IP "" 0
3642 \fB? \fIfile\fB\fR
3643 .IP "" 2
3644 \fIfile\fR is in your working directory, but does not
3645 correspond to anything in the source repository, and is
3646 not in the list of files for \fBcvs\fR to ignore (see the
3647 description of the \fB-I\fR option, and
3648 see node `cvsignore\(aq in the CVS manual).
3649 .SH "AUTHORS"
3650 .TP
3651 Dick Grune
3652 Original author of the
3653 .B cvs
3654 shell script version posted to
3655 .B comp.sources.unix
3656 in the volume6 release of December, 1986.
3657 Credited with much of the
3658 .B cvs
3659 conflict resolution algorithms.
3660 .TP
3661 Brian Berliner
3662 Coder and designer of the
3663 .B cvs
3664 program itself in April, 1989, based on the original work done by Dick.
3665 .TP
3666 Jeff Polk
3667 Helped Brian with the design of the
3668 .B cvs
3669 module and vendor branch support and author of the
3670 .BR checkin ( 1 )
3671 shell script (the ancestor of \fBcvs import\fP).
3672 .TP
3673 Larry Jones, Derek R. Price, and Mark D. Baushke
3674 Have helped maintain
3675 .B cvs
3676 for many years.
3677 .TP
3678 And many others too numerous to mention here.
3679 .SH "SEE ALSO"
3680 The most comprehensive manual for CVS is
3681 Version Management with CVS by Per Cederqvist et al.  Depending on
3682 your system, you may be able to get it with the
3683 .B info CVS
3684 command or it may be available as cvs.pdf (Portable Document Format),
3685 cvs.ps (PostScript), cvs.texinfo (Texinfo source), or cvs.html.
3686 .SP
3687 For CVS updates, more information on documentation, software related
3688 to CVS, development of CVS, and more, see:
3689 .in +1i
3690 .SP
3691 .PD 0
3692 .IP "" 4
3693 .B http://cvshome.org
3694 .IP "" 4
3695 .B http://www.loria.fr/~molli/cvs-index.html
3696 .in -1i
3697 .SP
3698 .BR ci ( 1 ),
3699 .BR co ( 1 ),
3700 .BR cvs ( 5 ),
3701 .BR cvsbug ( 8 ),
3702 .BR diff ( 1 ),
3703 .BR grep ( 1 ),
3704 .BR patch ( 1 ),
3705 .BR rcs ( 1 ),
3706 .BR rcsdiff ( 1 ),
3707 .BR rcsmerge ( 1 ),
3708 .BR rlog ( 1 ).