1CVS(1)                      General Commands Manual                     CVS(1)
2
3
4

NAME

6       cvs - Concurrent Versions System
7

SYNOPSIS

9       cvs [ cvs_options ]
10              cvs_command [ command_options ] [ command_args ]
11

NOTE

13       This  manpage is a summary of some of the features of cvs.  It is auto-
14       generated from an appendix of the CVS manual.  For more in-depth  docu‐
15       mentation,  please consult the Cederqvist manual (via the info CVS com‐
16       mand or otherwise, as described in the SEE ALSO section  of  this  man‐
17       page).  Cross-references in this man page refer to nodes in the same.
18

CVS commands

20   Guide to CVS commands
21       This  appendix  describes  the  overall  structure of cvs commands, and
22       describes some commands in detail (others are described elsewhere;  for
23       a  quick  reference to cvs commands, see node `Invoking CVS' in the CVS
24       manual).
25
26

Structure

28   Overall structure of CVS commands
29       The overall format of all cvs commands is:
30
31
32         cvs [ cvs_options ] cvs_command [ command_options ] [ command_args ]
33
34
35
36
37
38
39       cvs
40
41         The name of the cvs program.
42
43
44
45       cvs_options
46
47         Some  options  that  affect  all  sub-commands  of  cvs.   These  are
48         described below.
49
50
51
52       cvs_command
53
54         One  of  several  different  sub-commands.  Some of the commands have
55         aliases that can be used instead; those aliases are noted in the ref‐
56         erence  manual for that command.  There are only two situations where
57         you may omit cvs_command: cvs -H elicits a  list  of  available  com‐
58         mands, and cvs -v displays version information on cvs itself.
59
60
61
62       command_options
63
64         Options that are specific for the command.
65
66
67
68       command_args
69
70         Arguments to the commands.
71
72         There  is  unfortunately  some confusion between cvs_options and com‐
73         mand_options.  When given as a cvs_option, some options  only  affect
74         some  of  the commands.  When given as a command_option it may have a
75         different meaning, and be accepted by more commands.  In other words,
76         do not take the above categorization too seriously.  Look at the doc‐
77         umentation instead.
78
79

Exit status

81   CVS's exit status
82       cvs can indicate to the calling environment  whether  it  succeeded  or
83       failed  by  setting its exit status.  The exact way of testing the exit
84       status will vary from one operating system to another.  For example  in
85       a  unix  shell  script  the  $?  variable will be 0 if the last command
86       returned a successful exit status, or greater than 0 if the exit status
87       indicated failure.
88
89       If  cvs  is  successful, it returns a successful status; if there is an
90       error, it prints an error message and returns a  failure  status.   The
91       one  exception  to this is the cvs diff command.  It will return a suc‐
92       cessful status if it found no differences, or a failure status if there
93       were  differences or if there was an error.  Because this behavior pro‐
94       vides no good way to detect errors, in the future it is  possible  that
95       cvs diff will be changed to behave like the other cvs commands.
96
97

~/.cvsrc

99   Default options and the ~/.cvsrc file
100       There  are  some  command_options that are used so often that you might
101       have set up an alias or some other means to make sure you always  spec‐
102       ify that option.  One example (the one that drove the implementation of
103       the .cvsrc support, actually) is that many people find the default out‐
104       put  of  the diff command to be very hard to read, and that either con‐
105       text diffs or unidiffs are much easier to understand.
106
107       The ~/.cvsrc file is a way that you can add default options to cvs_com‐
108       mands within cvs, instead of relying on aliases or other shell scripts.
109
110       The  format of the ~/.cvsrc file is simple.  The file is searched for a
111       line that begins with the same name as the cvs_command being  executed.
112       If  a  match  is  found, then the remainder of the line is split up (at
113       whitespace characters) into separate options and added to  the  command
114       arguments before any options from the command line.
115
116       If  a command has two names (e.g., checkout and co), the official name,
117       not necessarily the one used on the command line, will be used to match
118       against  the  file.   So if this is the contents of the user's ~/.cvsrc
119       file:
120
121
122         log -N
123         diff -uN
124         rdiff -u
125         update -Pd
126         checkout -P
127         release -d
128
129
130
131
132       the command cvs checkout foo would have the  -P  option  added  to  the
133       arguments, as well as cvs co foo.
134
135       With the example file above, the output from cvs diff foobar will be in
136       unidiff format.  cvs diff -c foobar  will  provide  context  diffs,  as
137       usual.   Getting "old" format diffs would be slightly more complicated,
138       because diff doesn't have an option to specify use of the "old" format,
139       so you would need cvs -f diff foobar.
140
141       In  place of the command name you can use cvs to specify global options
142       (see node `Global options' in the CVS manual).  For example the follow‐
143       ing line in .cvsrc
144
145
146         cvs -z6
147
148
149
150
151       causes cvs to use compression level 6.
152
153

Global options

155       The  available  cvs_options (that are given to the left of cvs_command)
156       are:
157
158
159
160       --allow-root=rootdir
161
162         Specify legal cvsroot directory.  See see node `Password  authentica‐
163         tion server' in the CVS manual.
164
165
166
167       -a
168
169         Authenticate  all  communication  between  the client and the server.
170         Only has an effect on the cvs client.  As of this  writing,  this  is
171         only  implemented  when  using  a GSSAPI connection (see node `GSSAPI
172         authenticated' in the CVS manual).  Authentication  prevents  certain
173         sorts  of  attacks  involving  hijacking  the  active tcp connection.
174         Enabling authentication does not enable encryption.
175
176
177
178       -b bindir
179
180         In cvs 1.9.18 and older, this specified that rcs programs are in  the
181         bindir  directory.   Current versions of cvs do not run rcs programs;
182         for compatibility this option is accepted, but it does nothing.
183
184
185
186       -T tempdir
187
188         Use tempdir as the  directory  where  temporary  files  are  located.
189         Overrides  the  setting  of  the $TMPDIR environment variable and any
190         precompiled directory.  This parameter  should  be  specified  as  an
191         absolute  pathname.  (When running client/server, -T affects only the
192         local process; specifying -T for the client  has  no  effect  on  the
193         server and vice versa.)
194
195
196
197       -d cvs_root_directory
198
199         Use  cvs_root_directory as the root directory pathname of the reposi‐
200         tory.  Overrides the setting of the  $CVSROOT  environment  variable.
201         see node `Repository' in the CVS manual.
202
203
204
205       -e editor
206
207         Use  editor to enter revision log information.  Overrides the setting
208         of the $CVSEDITOR and $EDITOR environment variables.  For more infor‐
209         mation, see see node `Committing your changes' in the CVS manual.
210
211
212
213       -f
214
215         Do  not  read  the  ~/.cvsrc  file.   This  option is most often used
216         because of the non-orthogonality of the cvs option set.  For example,
217         the cvs log option -N (turn off display of tag names) does not have a
218         corresponding option to turn the display on.  So if you  have  -N  in
219         the  ~/.cvsrc  entry  for log, you may need to use -f to show the tag
220         names.
221
222
223
224       -H
225
226
227
228
229       --help
230
231         Display usage information about the specified cvs_command (but do not
232         actually  execute the command).  If you don't specify a command name,
233         cvs -H displays overall help for cvs, including a list of other  help
234         options.
235
236
237
238       -n
239
240         Do  not  change  any  files.  Attempt to execute the cvs_command, but
241         only to issue reports; do not remove, update, or merge  any  existing
242         files, or create any new files.
243
244         Note that cvs will not necessarily produce exactly the same output as
245         without -n.  In some cases the output will be the same, but in  other
246         cases  cvs  will  skip  some  of  the processing that would have been
247         required to produce the exact same output.
248
249
250
251       -Q
252
253         Cause the command to be really quiet; the command will only  generate
254         output for serious problems.
255
256
257
258       -q
259
260         Cause  the command to be somewhat quiet; informational messages, such
261         as reports of recursion through subdirectories, are suppressed.
262
263
264
265       -r
266
267         Make new working files read-only.  Same effect  as  if  the  $CVSREAD
268         environment  variable is set (see node `Environment variables' in the
269         CVS manual).  The default is to make working files  writable,  unless
270         watches are on (see node `Watches' in the CVS manual).
271
272
273
274       -s variable=value
275
276         Set a user variable (see node `Variables' in the CVS manual).
277
278
279
280       -t
281
282         Trace  program  execution;  display messages showing the steps of cvs
283         activity.  Particularly useful  with  -n  to  explore  the  potential
284         impact of an unfamiliar command.
285
286
287
288       -v
289
290
291
292
293       --version
294
295         Display version and copyright information for cvs.
296
297
298
299       -w
300
301         Make  new  working  files  read-write.   Overrides the setting of the
302         $CVSREAD environment  variable.   Files  are  created  read-write  by
303         default, unless $CVSREAD is set or -r is given.
304
305
306
307       -x
308
309         Encrypt  all  communication  between the client and the server.  Only
310         has an effect on the cvs client.  As of this writing,  this  is  only
311         implemented  when using a GSSAPI connection (see node `GSSAPI authen‐
312         ticated' in the CVS manual) or a Kerberos connection (see node  `Ker‐
313         beros authenticated' in the CVS manual).  Enabling encryption implies
314         that message traffic is also authenticated.   Encryption  support  is
315         not  available by default; it must be enabled using a special config‐
316         ure option, --enable-encryption, when you build cvs.
317
318
319
320       -z gzip-level
321
322         Set the compression level.  Valid levels are 1 (high speed, low  com‐
323         pression)  to  9  (low speed, high compression), or 0 to disable com‐
324         pression (the default).  Only has an effect on the cvs client.
325
326
327

Common options

329   Common command options
330       This section describes the command_options that  are  available  across
331       several  cvs  commands.  These options are always given to the right of
332       cvs_command. Not all commands support all of these options; each option
333       is  only  supported for commands where it makes sense.  However, when a
334       command has one of these options you can almost  always  count  on  the
335       same  behavior  of  the  option  as  in other commands.  (Other command
336       options, which are listed with the individual commands, may  have  dif‐
337       ferent behavior from one cvs command to the other).
338
339       The history command is an exception; it supports many options that con‐
340       flict even with these standard options.
341
342
343
344       -D date_spec
345
346         Use the most recent revision no later than date_spec.  date_spec is a
347         single argument, a date description specifying a date in the past.
348
349         The specification is sticky when you use it to make a private copy of
350         a source file; that is, when you get a working  file  using  -D,  cvs
351         records  the  date you specified, so that further updates in the same
352         directory will use the same date  (for  more  information  on  sticky
353         tags/dates, see node `Sticky tags' in the CVS manual).
354
355         -D  is  available with the annotate, checkout, diff, export, history,
356         rdiff, rtag, and update commands.  (The  history  command  uses  this
357         option in a slightly different way; see node `history options' in the
358         CVS manual).
359
360         A wide variety of date formats are supported by cvs.  The most  stan‐
361         dard ones are ISO8601 (from the International Standards Organization)
362         and the Internet e-mail standard (specified in RFC822 as  amended  by
363         RFC1123).
364
365         ISO8601 dates have many variants but a few examples are:
366
367
368           1972-09-24
369           1972-09-24 20:05
370
371
372
373
374         There  are  a  lot more ISO8601 date formats, and cvs accepts many of
375         them, but you probably don't want to hear the whole long story :-).
376
377         In addition to the dates allowed in Internet e-mail itself, cvs  also
378         allows some of the fields to be omitted.  For example:
379
380
381           24 Sep 1972 20:05
382           24 Sep
383
384
385
386
387         The date is interpreted as being in the local timezone, unless a spe‐
388         cific timezone is specified.
389
390         These two date formats are preferred.  However, cvs currently accepts
391         a  wide  variety  of  other date formats.  They are intentionally not
392         documented here in any detail, and future versions of cvs  might  not
393         accept all of them.
394
395         One  such  format is month/day/year.  This may confuse people who are
396         accustomed to having the month and day in the other order; 1/4/96  is
397         January 4, not April 1.
398
399         Remember  to  quote  the  argument  to the -D flag so that your shell
400         doesn't interpret spaces as argument separators.  A command using the
401         -D flag can look like this:
402
403
404           $ cvs diff -D "1 hour ago" cvs.texinfo
405
406
407
408
409
410
411       -f
412
413         When  you specify a particular date or tag to cvs commands, they nor‐
414         mally ignore files that do not contain the  tag  (or  did  not  exist
415         prior to the date) that you specified.  Use the -f option if you want
416         files retrieved even when there is no match  for  the  tag  or  date.
417         (The most recent revision of the file will be used).
418
419         Note  that  even with -f, a tag that you specify must exist (that is,
420         in some file, not necessary in every file).  This is so that cvs will
421         continue to give an error if you mistype a tag name.
422
423         -f  is  available  with  these  commands: annotate, checkout, export,
424         rdiff, rtag, and update.
425
426         WARNING:  The commit and remove commands also have a -f  option,  but
427         it has a different behavior for those commands.  See see node `commit
428         options' in the CVS manual, and see node `Removing files' in the  CVS
429         manual.
430
431
432
433       -k kflag
434
435         Alter  the default processing of keywords.  see node `Keyword substi‐
436         tution' in the CVS manual, for the  meaning  of  kflag.   Your  kflag
437         specification is sticky when you use it to create a private copy of a
438         source file; that is, when you use this option with the  checkout  or
439         update  commands,  cvs  associates your selected kflag with the file,
440         and continues to use it with future update commands on the same  file
441         until you specify otherwise.
442
443         The  -k  option  is  available  with  the add, checkout, diff, rdiff,
444         import and update commands.
445
446
447
448       -l
449
450         Local; run only in current working directory, rather  than  recursing
451         through subdirectories.
452
453         Available  with  the  following commands: annotate, checkout, commit,
454         diff, edit, editors, export, log, rdiff, remove, rtag,  status,  tag,
455         unedit, update, watch, and watchers.
456
457
458
459       -m message
460
461         Use message as log information, instead of invoking an editor.
462
463         Available with the following commands: add, commit and import.
464
465
466
467       -n
468
469         Do  not  run  any tag program.  (A program can be specified to run in
470         the modules database (see node `modules' in  the  CVS  manual);  this
471         option bypasses it).
472
473         This  is  not  the  same  as the cvs -n program option, which you can
474         specify to the left of a cvs command!
475
476         Available with the checkout, export, and rtag commands.
477
478
479
480       -P
481
482         Prune empty directories.  See see node `Removing directories' in  the
483         CVS manual.
484
485
486
487       -p
488
489         Pipe  the  files  retrieved  from  the repository to standard output,
490         rather than writing them in the current  directory.   Available  with
491         the checkout and update commands.
492
493
494
495       -R
496
497         Process directories recursively.  This is on by default.
498
499         Available  with  the  following commands: annotate, checkout, commit,
500         diff, edit,  editors,  export,  rdiff,  remove,  rtag,  status,  tag,
501         unedit, update, watch, and watchers.
502
503
504
505       -r tag
506
507         Use the revision specified by the tag argument instead of the default
508         head revision.  As well as arbitrary tags defined  with  the  tag  or
509         rtag  command,  two special tags are always available: HEAD refers to
510         the most recent version available in the repository, and BASE  refers
511         to  the revision you last checked out into the current working direc‐
512         tory.
513
514         The tag specification is sticky when you use this  with  checkout  or
515         update  to  make  your  own copy of a file: cvs remembers the tag and
516         continues to use it on future update commands, until you specify oth‐
517         erwise  (for  more information on sticky tags/dates, see node `Sticky
518         tags' in the CVS manual).
519
520         The tag can be either a symbolic or numeric tag, as described in  see
521         node  `Tags' in the CVS manual, or the name of a branch, as described
522         in see node `Branching and merging' in the CVS manual.  When  a  com‐
523         mand expects a specific revision, the name of a branch is interpreted
524         as the most recent revision on that branch.
525
526         Specifying the -q global option along with the -r command  option  is
527         often useful, to suppress the warning messages when the rcs file does
528         not contain the specified tag.
529
530         This is not the same as the overall cvs  -r  option,  which  you  can
531         specify to the left of a cvs command!
532
533         -r  is  available with the annotate, checkout, commit, diff, history,
534         export, rdiff, rtag, and update commands.
535
536
537
538       -W
539
540         Specify file names that should be filtered.  You can use this  option
541         repeatedly.   The  spec  can  be a file name pattern of the same type
542         that you can specify in the .cvswrappers file.   Available  with  the
543         following commands: import, and update.
544
545
546

admin

548   Administration
549       · Requires: repository, working directory.
550
551       · Changes: repository.
552
553       · Synonym: rcs
554
555         This  is  the  cvs  interface  to assorted administrative facilities.
556         Some of them have questionable usefulness for cvs but exist for  his‐
557         torical  purposes.   Some  of  the questionable options are likely to
558         disappear in the future.  This  command  does  work  recursively,  so
559         extreme care should be used.
560
561         On  unix,  if  there  is a group named cvsadmin, only members of that
562         group can run cvs admin (except for the cvs admin -k  command,  which
563         can  be  run  by anybody).  This group should exist on the server, or
564         any system running the non-client/server cvs.  To disallow cvs  admin
565         for all users, create a group with no users in it.  On NT, the cvsad‐
566         min feature does not exist and all users can run cvs admin.
567
568

admin options

570       Some of these options have questionable usefulness for  cvs  but  exist
571       for historical purposes.  Some even make it impossible to use cvs until
572       you undo the effect!
573
574
575
576       -Aoldfile
577
578         Might not work together with cvs.  Append the access list of  oldfile
579         to the access list of the rcs file.
580
581
582
583       -alogins
584
585         Might  not  work together with cvs.  Append the login names appearing
586         in the comma-separated list logins to the  access  list  of  the  rcs
587         file.
588
589
590
591       -b[rev]
592
593         Set  the  default branch to rev.  In cvs, you normally do not manipu‐
594         late default branches; sticky tags (see node `Sticky tags' in the CVS
595         manual)  are a better way to decide which branch you want to work on.
596         There is one reason to run cvs admin -b: to revert  to  the  vendor's
597         version  when  using  vendor  branches  (see  node  `Reverting  local
598         changes' in the CVS manual).  There can be no space  between  -b  and
599         its argument.
600
601
602
603       -cstring
604
605         Sets the comment leader to string.  The comment leader is not used by
606         current versions of cvs or rcs 5.7.  Therefore, you can almost surely
607         not  worry about it.  see node `Keyword substitution' in the CVS man‐
608         ual.
609
610
611
612       -e[logins]
613
614         Might not work together with cvs.  Erase the login names appearing in
615         the comma-separated list logins from the access list of the RCS file.
616         If logins is omitted, erase the entire access list.  There can be  no
617         space between -e and its argument.
618
619
620
621       -I
622
623         Run  interactively,  even  if  the  standard input is not a terminal.
624         This option does not work with the client/server cvs and is likely to
625         disappear in a future release of cvs.
626
627
628
629       -i
630
631         Useless with cvs.  This creates and initializes a new rcs file, with‐
632         out depositing a revision.  With cvs, add files with the cvs add com‐
633         mand (see node `Adding files' in the CVS manual).
634
635
636
637       -ksubst
638
639         Set  the  default  keyword  substitution to subst.  see node `Keyword
640         substitution' in the CVS manual.  Giving an explicit -k option to cvs
641         update, cvs export, or cvs checkout overrides this default.
642
643
644
645       -l[rev]
646
647         Lock  the  revision  with number rev.  If a branch is given, lock the
648         latest revision on that branch.  If rev is omitted, lock  the  latest
649         revision on the default branch.  There can be no space between -l and
650         its argument.
651
652         This can be used in conjunction with the  rcslock.pl  script  in  the
653         contrib  directory of the cvs source distribution to provide reserved
654         checkouts (where only one user can be  editing  a  given  file  at  a
655         time).  See the comments in that file for details (and see the README
656         file in that directory for disclaimers about the  unsupported  nature
657         of contrib).  According to comments in that file, locking must set to
658         strict (which is the default).
659
660
661
662       -L
663
664         Set locking to strict.  Strict locking means that the owner of an RCS
665         file  is  not  exempt  from  locking  for checkin.  For use with cvs,
666         strict locking must be set; see the discussion under  the  -l  option
667         above.
668
669
670
671       -mrev:msg
672
673         Replace the log message of revision rev with msg.
674
675
676
677       -Nname[:[rev]]
678
679         Act  like  -n,  except override any previous assignment of name.  For
680         use with magic branches, see see node `Magic branch numbers'  in  the
681         CVS manual.
682
683
684
685       -nname[:[rev]]
686
687         Associate the symbolic name name with the branch or revision rev.  It
688         is normally better to use cvs tag or cvs rtag  instead.   Delete  the
689         symbolic  name  if  both  :  and rev are omitted; otherwise, print an
690         error message if name is already associated with another number.   If
691         rev is symbolic, it is expanded before association.  A rev consisting
692         of a branch number followed by a .  stands  for  the  current  latest
693         revision in the branch.  A : with an empty rev stands for the current
694         latest revision on the default branch, normally the trunk.  For exam‐
695         ple,  cvs admin -nname: associates name with the current latest revi‐
696         sion of all the RCS files; this contrasts  with  cvs  admin  -nname:$
697         which  associates  name with the revision numbers extracted from key‐
698         word strings in the corresponding working files.
699
700
701
702       -orange
703
704         Deletes (outdates) the revisions given by range.
705
706         Note that this command can be quite dangerous unless you know exactly
707         what  you are doing (for example see the warnings below about how the
708         rev1:rev2 syntax is confusing).
709
710         If you are short on disc this option might help you.  But think twice
711         before  using it—there is no way short of restoring the latest backup
712         to undo this command!  If you delete  different  revisions  than  you
713         planned,  either  due  to  carelessness or (heaven forbid) a cvs bug,
714         there is no opportunity to correct the error before the revisions are
715         deleted.  It probably would be a good idea to experiment on a copy of
716         the repository first.
717
718         Specify range in one of the following ways:
719
720
721         rev1::rev2
722
723           Collapse all revisions between rev1 and  rev2,  so  that  cvs  only
724           stores the differences associated with going from rev1 to rev2, not
725           intermediate  steps.   For  example,  after  -o  1.3::1.5  one  can
726           retrieve revision 1.3, revision 1.5, or the differences to get from
727           1.3 to 1.5, but not the revision 1.4, or  the  differences  between
728           1.3  and  1.4.  Other examples: -o 1.3::1.4 and -o 1.3::1.3 have no
729           effect, because there are no intermediate revisions to remove.
730
731
732         ::rev
733
734           Collapse revisions between the beginning of the  branch  containing
735           rev  and rev itself.  The branchpoint and rev are left intact.  For
736           example, -o ::1.3.2.6 deletes revision 1.3.2.1,  revision  1.3.2.5,
737           and everything in between, but leaves 1.3 and 1.3.2.6 intact.
738
739
740         rev::
741
742           Collapse revisions between rev and the end of the branch containing
743           rev.  Revision rev is left intact but the head revision is deleted.
744
745
746         rev
747
748           Delete the revision rev.  For example, -o 1.3 is equivalent  to  -o
749           1.2::1.4.
750
751
752         rev1:rev2
753
754           Delete  the  revisions  from  rev1  to rev2, inclusive, on the same
755           branch.  One will not be able to retrieve rev1 or rev2  or  any  of
756           the  revisions  in  between.   For  example,  the command cvs admin
757           -oR_1_01:R_1_02 . is rarely useful.  It means to  delete  revisions
758           up  to,  and  including, the tag R_1_02.  But beware!  If there are
759           files that have not changed between R_1_02 and R_1_03 the file will
760           have the same numerical revision number assigned to the tags R_1_02
761           and R_1_03.  So not only will it be impossible to retrieve  R_1_02;
762           R_1_03 will also have to be restored from the tapes!  In most cases
763           you want to specify rev1::rev2 instead.
764
765
766         :rev
767
768           Delete revisions from the beginning of the branch containing rev up
769           to and including rev.
770
771
772         rev:
773
774           Delete  revisions  from  revision rev, including rev itself, to the
775           end of the branch containing rev.
776
777           None of the revisions to be deleted may have branches or locks.
778
779           If any of the revisions to be deleted have symbolic names, and  one
780           specifies  one  of the :: syntaxes, then cvs will give an error and
781           not delete any revisions.  If you really want to  delete  both  the
782           symbolic  names  and the revisions, first delete the symbolic names
783           with cvs tag -d, then run cvs  admin  -o.   If  one  specifies  the
784           non-::  syntaxes,  then cvs will delete the revisions but leave the
785           symbolic names pointing to nonexistent revisions.  This behavior is
786           preserved  for  compatibility  with  previous  versions of cvs, but
787           because it isn't very useful, in the future it  may  change  to  be
788           like the :: case.
789
790           Due to the way cvs handles branches rev cannot be specified symbol‐
791           ically if it is a branch.  see node `Magic branch numbers'  in  the
792           CVS manual, for an explanation.
793
794           Make  sure  that  no-one has checked out a copy of the revision you
795           outdate.  Strange things will happen if he starts to  edit  it  and
796           tries  to  check it back in.  For this reason, this option is not a
797           good way to take back a bogus commit; commit a new revision undoing
798           the  bogus  change instead (see node `Merging two revisions' in the
799           CVS manual).
800
801
802
803       -q
804
805         Run quietly; do not print diagnostics.
806
807
808
809       -sstate[:rev]
810
811         Useful with cvs.  Set the state attribute  of  the  revision  rev  to
812         state.  If rev is a branch number, assume the latest revision on that
813         branch.  If rev is omitted, assume the latest revision on the default
814         branch.   Any  identifier  is  acceptable for state.  A useful set of
815         states is Exp (for experimental), Stab (for  stable),  and  Rel  (for
816         released).   By  default,  the  state of a new revision is set to Exp
817         when it is created.  The state is visible in the output from cvs  log
818         (see node `log' in the CVS manual), and in the $Log$ and $State$ key‐
819         words (see node `Keyword substitution' in the CVS manual).  Note that
820         cvs uses the dead state for its own purposes (see node `Attic' in the
821         CVS manual); to take a file to or from the dead  state  use  commands
822         like  cvs  remove  and cvs add (see node `Adding and removing' in the
823         CVS manual), not cvs admin -s.
824
825
826
827       -t[file]
828
829         Useful with cvs.  Write descriptive text from  the  contents  of  the
830         named  file  into the RCS file, deleting the existing text.  The file
831         pathname may not begin with -.  The descriptive text can be  seen  in
832         the  output  from  cvs log (see node `log' in the CVS manual).  There
833         can be no space between -t and its argument.
834
835         If file is omitted, obtain the text from standard  input,  terminated
836         by  end-of-file  or by a line containing . by itself.  Prompt for the
837         text if interaction is possible; see -I.
838
839
840
841       -t-string
842
843         Similar to -tfile. Write descriptive text from the  string  into  the
844         rcs  file, deleting the existing text.  There can be no space between
845         -t and its argument.
846
847
848
849       -U
850
851         Set locking to non-strict.  Non-strict locking means that  the  owner
852         of  a  file  need not lock a revision for checkin.  For use with cvs,
853         strict locking must be set; see the discussion under  the  -l  option
854         above.
855
856
857
858       -u[rev]
859
860         See  the  option -l above, for a discussion of using this option with
861         cvs.  Unlock the revision with number rev.  If  a  branch  is  given,
862         unlock the latest revision on that branch.  If rev is omitted, remove
863         the latest lock held by the caller.  Normally, only the locker  of  a
864         revision may unlock it; somebody else unlocking a revision breaks the
865         lock.  This causes the original locker to be sent a commit  notifica‐
866         tion  (see  node `Getting Notified' in the CVS manual).  There can be
867         no space between -u and its argument.
868
869
870
871       -Vn
872
873         In previous versions of cvs, this option meant to write an  rcs  file
874         which  would  be  acceptable to rcs version n, but it is now obsolete
875         and specifying it will produce an error.
876
877
878
879       -xsuffixes
880
881         In previous versions of cvs, this was documented as a way of specify‐
882         ing  the  names  of  the rcs files.  However, cvs has always required
883         that the rcs files used by cvs end in ,v, so this  option  has  never
884         done anything useful.
885
886
887

annotate

889   What revision modified each line of a file?
890       · Synopsis: annotate [options] files...
891
892       · Requires: repository.
893
894       · Changes: nothing.
895
896         For  each  file  in  files,  print  the  head  revision of the trunk,
897         together with information on the last modification for each line.
898
899

annotate options

901       These standard options are supported  by  annotate  (see  node  `Common
902       options' in the CVS manual, for a complete description of them):
903
904
905
906       -l
907
908         Local directory only, no recursion.
909
910
911
912       -R
913
914         Process directories recursively.
915
916
917
918       -f
919
920         Use head revision if tag/date not found.
921
922
923
924       -F
925
926         Annotate binary files.
927
928
929
930       -r revision
931
932         Annotate file as of specified revision/tag.
933
934
935
936       -D date
937
938         Annotate file as of specified date.
939
940

annotate example

942       For example:
943
944
945         $ cvs annotate ssfile
946         Annotations for ssfile
947         ***************
948         1.1          (mary     27-Mar-96): ssfile line 1
949         1.2          (joe      28-Mar-96): ssfile line 2
950
951
952
953
954       The  file  ssfile currently contains two lines.  The ssfile line 1 line
955       was checked in by mary on March 27.  Then, on March  28,  joe  added  a
956       line  ssfile  line  2,  without modifying the ssfile line 1 line.  This
957       report doesn't tell you anything about lines which have been deleted or
958       replaced; you need to use cvs diff for that (see node `diff' in the CVS
959       manual).
960
961       The options to cvs annotate are listed in see node  `Invoking  CVS'  in
962       the  CVS  manual,  and can be used to select the files and revisions to
963       annotate.  The options are described in more detail there  and  in  see
964       node `Common options' in the CVS manual.
965
966

checkout

968   Check out sources for editing
969       · Synopsis: checkout [options] modules...
970
971       · Requires: repository.
972
973       · Changes: working directory.
974
975       · Synonyms: co, get
976
977         Create  or update a working directory containing copies of the source
978         files specified by modules.  You must execute checkout  before  using
979         most  of  the  other cvs commands, since most of them operate on your
980         working directory.
981
982         The modules are either symbolic names for some collection  of  source
983         directories and files, or paths to directories or files in the repos‐
984         itory.  The symbolic names are defined in the modules file.  see node
985         `modules' in the CVS manual.
986
987         Depending on the modules you specify, checkout may recursively create
988         directories and populate them with the appropriate source files.  You
989         can  then  edit these source files at any time (regardless of whether
990         other software  developers  are  editing  their  own  copies  of  the
991         sources); update them to include new changes applied by others to the
992         source repository; or commit your work as a permanent change  to  the
993         source repository.
994
995         Note  that  checkout  is  used  to create directories.  The top-level
996         directory created is always added to the directory where checkout  is
997         invoked,  and  usually has the same name as the specified module.  In
998         the case of a module alias, the created sub-directory may have a dif‐
999         ferent name, but you can be sure that it will be a sub-directory, and
1000         that checkout will show the relative path leading to each file as  it
1001         is  extracted  into your private work area (unless you specify the -Q
1002         global option).
1003
1004         The files created by checkout are created read-write, unless  the  -r
1005         option to cvs (see node `Global options' in the CVS manual) is speci‐
1006         fied, the CVSREAD environment variable is specified (see node  `Envi‐
1007         ronment  variables'  in  the CVS manual), or a watch is in effect for
1008         that file (see node `Watches' in the CVS manual).
1009
1010         Note that running checkout on a directory that was already built by a
1011         prior  checkout is also permitted.  This is similar to specifying the
1012         -d option to the update command in the  sense  that  new  directories
1013         that  have  been  created  in the repository will appear in your work
1014         area.  However, checkout takes a module name whereas update  takes  a
1015         directory  name.   Also  to use checkout this way it must be run from
1016         the top level directory (where you originally ran checkout from),  so
1017         before you run checkout to update an existing directory, don't forget
1018         to change your directory to the top level directory.
1019
1020         For the output produced by the checkout command see see node  `update
1021         output' in the CVS manual.
1022
1023

checkout options

1025       These  standard  options  are  supported  by checkout (see node `Common
1026       options' in the CVS manual, for a complete description of them):
1027
1028
1029
1030       -D date
1031
1032         Use the most recent revision no later  than  date.   This  option  is
1033         sticky,  and  implies -P.  See see node `Sticky tags' in the CVS man‐
1034         ual, for more information on sticky tags/dates.
1035
1036
1037
1038       -f
1039
1040         Only useful with the -D date or -r tag flags.  If no  matching  revi‐
1041         sion is found, retrieve the most recent revision (instead of ignoring
1042         the file).
1043
1044
1045
1046       -k kflag
1047
1048         Process keywords according to kflag.  See see node `Keyword substitu‐
1049         tion'  in  the  CVS manual.  This option is sticky; future updates of
1050         this file in this working directory will use  the  same  kflag.   The
1051         status command can be viewed to see the sticky options.  See see node
1052         `Invoking CVS' in the CVS manual, for more information on the  status
1053         command.
1054
1055
1056
1057       -l
1058
1059         Local; run only in current working directory.
1060
1061
1062
1063       -n
1064
1065         Do  not  run any checkout program (as specified with the -o option in
1066         the modules file; see node `modules' in the CVS manual).
1067
1068
1069
1070       -P
1071
1072         Prune empty directories.  See see node `Moving  directories'  in  the
1073         CVS manual.
1074
1075
1076
1077       -p
1078
1079         Pipe files to the standard output.
1080
1081
1082
1083       -R
1084
1085         Checkout directories recursively.  This option is on by default.
1086
1087
1088
1089       -r tag
1090
1091         Use  revision  tag.   This option is sticky, and implies -P.  See see
1092         node `Sticky tags' in the CVS manual, for more information on  sticky
1093         tags/dates.
1094
1095         In  addition to those, you can use these special command options with
1096         checkout:
1097
1098
1099
1100       -A
1101
1102         Reset any sticky tags, dates, or -k options.  Does not  reset  sticky
1103         -k  options on modified files.  See see node `Sticky tags' in the CVS
1104         manual, for more information on sticky tags/dates.
1105
1106
1107
1108       -c
1109
1110         Copy the module file, sorted, to the standard output, instead of cre‐
1111         ating  or  modifying  any files or directories in your working direc‐
1112         tory.
1113
1114
1115
1116       -d dir
1117
1118         Create a directory called dir for the working files, instead of using
1119         the  module name.  In general, using this flag is equivalent to using
1120         mkdir dir; cd dir followed by the checkout  command  without  the  -d
1121         flag.
1122
1123         There is an important exception, however.  It is very convenient when
1124         checking out a single item to have the output appear in  a  directory
1125         that  doesn't  contain  empty intermediate directories.  In this case
1126         only, cvs tries to ``shorten'' pathnames to avoid those empty  direc‐
1127         tories.
1128
1129         For  example,  given  a  module foo that contains the file bar.c, the
1130         command cvs co -d dir foo will create directory dir and  place  bar.c
1131         inside.   Similarly,  given  a  module bar which has subdirectory baz
1132         wherein there is a file quux.c, the command cvs  co  -d  dir  bar/baz
1133         will create directory dir and place quux.c inside.
1134
1135         Using  the  -N flag will defeat this behavior.  Given the same module
1136         definitions above, cvs co -N  -d  dir  foo  will  create  directories
1137         dir/foo  and  place bar.c inside, while cvs co -N -d dir bar/baz will
1138         create directories dir/bar/baz and place quux.c inside.
1139
1140
1141
1142       -j tag
1143
1144         With two -j options, merge changes from the revision  specified  with
1145         the  first  -j  option  to  the  revision specified with the second j
1146         option, into the working directory.
1147
1148         With one -j option, merge changes from the ancestor revision  to  the
1149         revision  specified  with  the -j option, into the working directory.
1150         The ancestor revision is the common ancestor of  the  revision  which
1151         the  working directory is based on, and the revision specified in the
1152         -j option.
1153
1154         In addition, each -j option can contain an optional  date  specifica‐
1155         tion which, when used with branches, can limit the chosen revision to
1156         one within a specific date.  An optional date is specified by  adding
1157         a colon (:) to the tag: -jSymbolic_Tag:Date_Specifier.
1158
1159         see node `Branching and merging' in the CVS manual.
1160
1161
1162
1163       -N
1164
1165         Only  useful  together  with  -d dir.  With this option, cvs will not
1166         ``shorten'' module paths in your working directory when you check out
1167         a single module.  See the -d flag for examples and a discussion.
1168
1169
1170
1171       -s
1172
1173         Like  -c,  but  include the status of all modules, and sort it by the
1174         status string.  see node `modules' in the CVS manual, for info  about
1175         the  -s option that is used inside the modules file to set the module
1176         status.
1177
1178

checkout examples

1180       Get a copy of the module tc:
1181
1182
1183         $ cvs checkout tc
1184
1185
1186
1187
1188       Get a copy of the module tc as it looked one day ago:
1189
1190
1191         $ cvs checkout -D yesterday tc
1192
1193
1194
1195
1196

commit

1198   Check files into the repository
1199       · Synopsis: commit [-lRf] [-m 'log_message' | -F  file]  [-r  revision]
1200         [files...]
1201
1202       · Requires: working directory, repository.
1203
1204       · Changes: repository.
1205
1206       · Synonym: ci
1207
1208         Use  commit  when  you  want to incorporate changes from your working
1209         source files into the source repository.
1210
1211         If you don't specify particular files to commit, all of the files  in
1212         your  working  current  directory are examined.  commit is careful to
1213         change in the repository  only  those  files  that  you  have  really
1214         changed.   By  default  (or if you explicitly specify the -R option),
1215         files in subdirectories are also examined and committed if they  have
1216         changed;  you  can  use  the -l option to limit commit to the current
1217         directory only.
1218
1219         commit verifies that the selected files are up to date with the  cur‐
1220         rent revisions in the source repository; it will notify you, and exit
1221         without committing, if any of the specified files must be  made  cur‐
1222         rent first with update (see node `update' in the CVS manual).  commit
1223         does not call the update command for you, but rather leaves that  for
1224         you to do when the time is right.
1225
1226         When  all  is  well, an editor is invoked to allow you to enter a log
1227         message that will be written to one or  more  logging  programs  (see
1228         node  `modules'  in the CVS manual, and see node `loginfo' in the CVS
1229         manual) and placed in the rcs file inside the repository.   This  log
1230         message  can be retrieved with the log command; see see node `log' in
1231         the CVS manual.  You can specify the log message on the command  line
1232         with  the -m message option, and thus avoid the editor invocation, or
1233         use the -F file option to specify that the argument file contains the
1234         log message.
1235
1236

commit options

1238       These  standard  options  are  supported  by  commit  (see node `Common
1239       options' in the CVS manual, for a complete description of them):
1240
1241
1242
1243       -l
1244
1245         Local; run only in current working directory.
1246
1247
1248
1249       -R
1250
1251         Commit directories recursively.  This is on by default.
1252
1253
1254
1255       -r revision
1256
1257         Commit to revision.  revision must be either a branch, or a  revision
1258         on  the  main  trunk that is higher than any existing revision number
1259         (see node `Assigning revisions' in the CVS manual).  You cannot  com‐
1260         mit to a specific revision on a branch.
1261
1262         commit also supports these options:
1263
1264
1265
1266       -F file
1267
1268         Read the log message from file, instead of invoking an editor.
1269
1270
1271
1272       -f
1273
1274         Note  that  this  is  not  the  standard behavior of the -f option as
1275         defined in see node `Common options' in the CVS manual.
1276
1277         Force cvs to commit a new revision  even  if  you  haven't  made  any
1278         changes  to  the  file.  If the current revision of file is 1.7, then
1279         the following two commands are equivalent:
1280
1281
1282           $ cvs commit -f file
1283           $ cvs commit -r 1.8 file
1284
1285
1286
1287
1288         The -f option disables recursion (i.e., it implies -l).  To force cvs
1289         to  commit  a  new  revision for all files in all subdirectories, you
1290         must use -f -R.
1291
1292
1293
1294       -m message
1295
1296         Use message as the log message, instead of invoking an editor.
1297
1298

commit examples

1300   Committing to a branch
1301       You can commit to a branch revision (one that has  an  even  number  of
1302       dots)  with  the  -r  option.   To create a branch revision, use the -b
1303       option of the rtag or tag commands (see node `Branching and merging' in
1304       the  CVS  manual).  Then, either checkout or update can be used to base
1305       your sources on the newly created branch.  From that point on, all com‐
1306       mit  changes  made  within  these working sources will be automatically
1307       added to a branch revision, thereby not disturbing  main-line  develop‐
1308       ment  in any way.  For example, if you had to create a patch to the 1.2
1309       version of the product, even though the 2.0 version  is  already  under
1310       development, you might do:
1311
1312
1313         $ cvs rtag -b -r FCS1_2 FCS1_2_Patch product_module
1314         $ cvs checkout -r FCS1_2_Patch product_module
1315         $ cd product_module
1316         [[ hack away ]]
1317         $ cvs commit
1318
1319
1320
1321
1322       This works automatically since the -r option is sticky.
1323
1324
1325   Creating the branch after editing
1326       Say  you  have  been  working  on some extremely experimental software,
1327       based on whatever revision you happened to checkout last week.  If oth‐
1328       ers  in  your  group  would like to work on this software with you, but
1329       without disturbing main-line development, you could commit your  change
1330       to  a new branch.  Others can then checkout your experimental stuff and
1331       utilize the full benefit of  cvs  conflict  resolution.   The  scenario
1332       might look like:
1333
1334
1335         [[ hacked sources are present ]]
1336         $ cvs tag -b EXPR1
1337         $ cvs update -r EXPR1
1338         $ cvs commit
1339
1340
1341
1342
1343       The  update  command will make the -r EXPR1 option sticky on all files.
1344       Note that your changes to the files will never be removed by the update
1345       command.   The  commit will automatically commit to the correct branch,
1346       because the -r is sticky.  You could also do like this:
1347
1348
1349         [[ hacked sources are present ]]
1350         $ cvs tag -b EXPR1
1351         $ cvs commit -r EXPR1
1352
1353
1354
1355
1356       but then, only those files that were changed by you will  have  the  -r
1357       EXPR1 sticky flag.  If you hack away, and commit without specifying the
1358       -r EXPR1 flag, some files may accidentally end up on the main trunk.
1359
1360       To work with you on the experimental change, others would simply do
1361
1362
1363         $ cvs checkout -r EXPR1 whatever_module
1364
1365
1366
1367
1368

diff

1370   Show differences between revisions
1371       · Synopsis: diff [-lR] [-k  kflag]  [format_options]  [[-r  rev1  |  -D
1372         date1] [-r rev2 |  -D date2]] [files...]
1373
1374       · Requires: working directory, repository.
1375
1376       · Changes: nothing.
1377
1378         The  diff  command  is  used to compare different revisions of files.
1379         The default action is to compare your working files  with  the  revi‐
1380         sions they were based on, and report any differences that are found.
1381
1382         If  any  file names are given, only those files are compared.  If any
1383         directories are given, all files under them will be compared.
1384
1385         The exit status for diff is different than for  other  cvs  commands;
1386         for details see node `Exit status' in the CVS manual.
1387
1388

diff options

1390       These standard options are supported by diff (see node `Common options'
1391       in the CVS manual, for a complete description of them):
1392
1393
1394
1395       -D date
1396
1397         Use the most recent revision no later than date.  See -r for how this
1398         affects the comparison.
1399
1400
1401
1402       -k kflag
1403
1404         Process keywords according to kflag.  See see node `Keyword substitu‐
1405         tion' in the CVS manual.
1406
1407
1408
1409       -l
1410
1411         Local; run only in current working directory.
1412
1413
1414
1415       -R
1416
1417         Examine directories recursively.  This option is on by default.
1418
1419
1420
1421       -r tag
1422
1423         Compare with revision tag.  Zero,  one  or  two  -r  options  can  be
1424         present.   With  no -r option, the working file will be compared with
1425         the revision it was based on.  With one -r,  that  revision  will  be
1426         compared to your current working file.  With two -r options those two
1427         revisions will be compared (and your working file will not affect the
1428         outcome in any way).
1429
1430         One or both -r options can be replaced by a -D date option, described
1431         above.
1432
1433         The following options specify the format of the  output.   They  have
1434         the  same  meaning  as in GNU diff.  Most options have two equivalent
1435         names, one of which is a single letter preceded by -, and  the  other
1436         of which is a long name preceded by --.
1437
1438
1439
1440       -lines
1441
1442         Show lines (an integer) lines of context.  This option does not spec‐
1443         ify an output format by itself; it has no effect unless  it  is  com‐
1444         bined with -c or -u.  This option is obsolete.  For proper operation,
1445         patch typically needs at least two lines of context.
1446
1447
1448
1449       -a
1450
1451         Treat all files as text and compare them line-by-line, even  if  they
1452         do not seem to be text.
1453
1454
1455
1456       -b
1457
1458         Ignore  trailing  white space and consider all other sequences of one
1459         or more white space characters to be equivalent.
1460
1461
1462
1463       -B
1464
1465         Ignore changes that just insert or delete blank lines.
1466
1467
1468
1469       --binary
1470
1471         Read and write data in binary mode.
1472
1473
1474
1475       --brief
1476
1477         Report only whether the files differ, not the details of the  differ‐
1478         ences.
1479
1480
1481
1482       -c
1483
1484         Use the context output format.
1485
1486
1487
1488       -C lines
1489
1490
1491
1492
1493       --context[=lines]
1494
1495         Use  the  context  output format, showing lines (an integer) lines of
1496         context, or three if lines is not given.  For proper operation, patch
1497         typically needs at least two lines of context.
1498
1499
1500
1501       --changed-group-format=format
1502
1503         Use  format  to  output  a line group containing differing lines from
1504         both files in if-then-else format.  see node `Line group formats'  in
1505         the CVS manual.
1506
1507
1508
1509       -d
1510
1511         Change  the algorithm to perhaps find a smaller set of changes.  This
1512         makes diff slower (sometimes much slower).
1513
1514
1515
1516       -e
1517
1518
1519
1520
1521       --ed
1522
1523         Make output that is a valid ed script.
1524
1525
1526
1527       --expand-tabs
1528
1529         Expand tabs to spaces in the output, to  preserve  the  alignment  of
1530         tabs in the input files.
1531
1532
1533
1534       -f
1535
1536         Make  output  that looks vaguely like an ed script but has changes in
1537         the order they appear in the file.
1538
1539
1540
1541       -F regexp
1542
1543         In context and unified format, for each  hunk  of  differences,  show
1544         some of the last preceding line that matches regexp.
1545
1546
1547
1548       --forward-ed
1549
1550         Make  output  that looks vaguely like an ed script but has changes in
1551         the order they appear in the file.
1552
1553
1554
1555       -H
1556
1557         Use heuristics to speed handling of large files  that  have  numerous
1558         scattered small changes.
1559
1560
1561
1562       --horizon-lines=lines
1563
1564         Do  not  discard  the  last  lines lines of the common prefix and the
1565         first lines lines of the common suffix.
1566
1567
1568
1569       -i
1570
1571         Ignore changes in case; consider upper- and lower-case letters equiv‐
1572         alent.
1573
1574
1575
1576       -I regexp
1577
1578         Ignore changes that just insert or delete lines that match regexp.
1579
1580
1581
1582       --ifdef=name
1583
1584         Make merged if-then-else output using name.
1585
1586
1587
1588       --ignore-all-space
1589
1590         Ignore white space when comparing lines.
1591
1592
1593
1594       --ignore-blank-lines
1595
1596         Ignore changes that just insert or delete blank lines.
1597
1598
1599
1600       --ignore-case
1601
1602         Ignore  changes  in  case;  consider  upper- and lower-case to be the
1603         same.
1604
1605
1606
1607       --ignore-matching-lines=regexp
1608
1609         Ignore changes that just insert or delete lines that match regexp.
1610
1611
1612
1613       --ignore-space-change
1614
1615         Ignore trailing white space and consider all other sequences  of  one
1616         or more white space characters to be equivalent.
1617
1618
1619
1620       --initial-tab
1621
1622         Output  a tab rather than a space before the text of a line in normal
1623         or context format.  This causes the alignment of tabs in the line  to
1624         look normal.
1625
1626
1627
1628       -L label
1629
1630         Use  label instead of the file name in the context format and unified
1631         format headers.
1632
1633
1634
1635       --label=label
1636
1637         Use label instead of the file name in the context format and  unified
1638         format headers.
1639
1640
1641
1642       --left-column
1643
1644         Print  only  the left column of two common lines in side by side for‐
1645         mat.
1646
1647
1648
1649       --line-format=format
1650
1651         Use format to output all input lines  in  if-then-else  format.   see
1652         node `Line formats' in the CVS manual.
1653
1654
1655
1656       --minimal
1657
1658         Change  the algorithm to perhaps find a smaller set of changes.  This
1659         makes diff slower (sometimes much slower).
1660
1661
1662
1663       -n
1664
1665         Output RCS-format diffs; like -f except that each  command  specifies
1666         the number of lines affected.
1667
1668
1669
1670       -N
1671
1672
1673
1674
1675       --new-file
1676
1677         In  directory  comparison,  if a file is found in only one directory,
1678         treat it as present but empty in the other directory.
1679
1680
1681
1682       --new-group-format=format
1683
1684         Use format to output a group of lines taken from just the second file
1685         in  if-then-else  format.   see  node `Line group formats' in the CVS
1686         manual.
1687
1688
1689
1690       --new-line-format=format
1691
1692         Use format to output a line taken from just the second  file  in  if-
1693         then-else format.  see node `Line formats' in the CVS manual.
1694
1695
1696
1697       --old-group-format=format
1698
1699         Use  format to output a group of lines taken from just the first file
1700         in if-then-else format.  see node `Line group  formats'  in  the  CVS
1701         manual.
1702
1703
1704
1705       --old-line-format=format
1706
1707         Use  format  to  output  a line taken from just the first file in if-
1708         then-else format.  see node `Line formats' in the CVS manual.
1709
1710
1711
1712       -p
1713
1714         Show which C function each change is in.
1715
1716
1717
1718       --rcs
1719
1720         Output RCS-format diffs; like -f except that each  command  specifies
1721         the number of lines affected.
1722
1723
1724
1725       --report-identical-files
1726
1727
1728
1729
1730       -s
1731
1732         Report when two files are the same.
1733
1734
1735
1736       --show-c-function
1737
1738         Show which C function each change is in.
1739
1740
1741
1742       --show-function-line=regexp
1743
1744         In  context  and  unified  format, for each hunk of differences, show
1745         some of the last preceding line that matches regexp.
1746
1747
1748
1749       --side-by-side
1750
1751         Use the side by side output format.
1752
1753
1754
1755       --speed-large-files
1756
1757         Use heuristics to speed handling of large files  that  have  numerous
1758         scattered small changes.
1759
1760
1761
1762       --suppress-common-lines
1763
1764         Do not print common lines in side by side format.
1765
1766
1767
1768       -t
1769
1770         Expand  tabs  to  spaces  in the output, to preserve the alignment of
1771         tabs in the input files.
1772
1773
1774
1775       -T
1776
1777         Output a tab rather than a space before the text of a line in  normal
1778         or  context format.  This causes the alignment of tabs in the line to
1779         look normal.
1780
1781
1782
1783       --text
1784
1785         Treat all files as text and compare them line-by-line, even  if  they
1786         do not appear to be text.
1787
1788
1789
1790       -u
1791
1792         Use the unified output format.
1793
1794
1795
1796       --unchanged-group-format=format
1797
1798         Use format to output a group of common lines taken from both files in
1799         if-then-else format.  see node `Line group formats' in the  CVS  man‐
1800         ual.
1801
1802
1803
1804       --unchanged-line-format=format
1805
1806         Use format to output a line common to both files in if-then-else for‐
1807         mat.  see node `Line formats' in the CVS manual.
1808
1809
1810
1811       -U lines
1812
1813
1814
1815
1816       --unified[=lines]
1817
1818         Use the unified output format, showing lines (an  integer)  lines  of
1819         context, or three if lines is not given.  For proper operation, patch
1820         typically needs at least two lines of context.
1821
1822
1823
1824       -w
1825
1826         Ignore white space when comparing lines.
1827
1828
1829
1830       -W columns
1831
1832
1833
1834
1835       --width=columns
1836
1837         Use an output width of columns in side by side format.
1838
1839
1840
1841       -y
1842
1843         Use the side by side output format.
1844
1845

Line group formats

1847       Line group formats let you specify formats suitable for  many  applica‐
1848       tions  that  allow  if-then-else input, including programming languages
1849       and text formatting languages.  A line group format specifies the  out‐
1850       put format for a contiguous group of similar lines.
1851
1852       For  example,  the  following command compares the TeX file myfile with
1853       the original version from the repository, and outputs a merged file  in
1854       which  old regions are surrounded by \begin{em}-\end{em} lines, and new
1855       regions are surrounded by \begin{bf}-\end{bf} lines.
1856
1857
1858         cvs diff \
1859
1860            --old-group-format='\begin{em}
1861         %<\end{em}
1862         ' \
1863
1864            --new-group-format='\begin{bf}
1865         %>\end{bf}
1866         ' \
1867
1868            myfile
1869
1870
1871
1872
1873       The following command is equivalent to the above example, but it  is  a
1874       little  more verbose, because it spells out the default line group for‐
1875       mats.
1876
1877
1878         cvs diff \
1879
1880            --old-group-format='\begin{em}
1881         %<\end{em}
1882         ' \
1883
1884            --new-group-format='\begin{bf}
1885         %>\end{bf}
1886         ' \
1887
1888            --unchanged-group-format='%=' \
1889
1890            --changed-group-format='\begin{em}
1891         %<\end{em}
1892         \begin{bf}
1893         %>\end{bf}
1894         ' \
1895
1896            myfile
1897
1898
1899
1900
1901       Here is a more advanced example, which  outputs  a  diff  listing  with
1902       headers containing line numbers in a ``plain English'' style.
1903
1904
1905         cvs diff \
1906
1907            --unchanged-group-format='' \
1908
1909            --old-group-format='-------- %dn line%(n=1?:s) deleted at %df:
1910         %<' \
1911
1912            --new-group-format='-------- %dN line%(N=1?:s) added after %de:
1913         %>' \
1914
1915            --changed-group-format='-------- %dn line%(n=1?:s) changed at %df:
1916         %<-------- to:
1917         %>' \
1918
1919            myfile
1920
1921
1922
1923
1924       To  specify  a  line group format, use one of the options listed below.
1925       You can specify up to four line group formats, one  for  each  kind  of
1926       line  group.   You  should  quote format, because it typically contains
1927       shell metacharacters.
1928
1929
1930
1931       --old-group-format=format
1932
1933         These line groups are hunks containing  only  lines  from  the  first
1934         file.   The default old group format is the same as the changed group
1935         format if it is specified; otherwise it is a format that outputs  the
1936         line group as-is.
1937
1938
1939
1940       --new-group-format=format
1941
1942         These  line  groups  are  hunks containing only lines from the second
1943         file.  The default new group format is same as the changed group for‐
1944         mat  if  it  is  specified; otherwise it is a format that outputs the
1945         line group as-is.
1946
1947
1948
1949       --changed-group-format=format
1950
1951         These line groups are hunks containing lines from  both  files.   The
1952         default  changed group format is the concatenation of the old and new
1953         group formats.
1954
1955
1956
1957       --unchanged-group-format=format
1958
1959         These line groups contain lines common to both  files.   The  default
1960         unchanged group format is a format that outputs the line group as-is.
1961
1962         In  a  line  group  format, ordinary characters represent themselves;
1963         conversion specifications start with % and have one of the  following
1964         forms.
1965
1966
1967
1968       %<
1969
1970         stands for the lines from the first file, including the trailing new‐
1971         line.  Each line is formatted according to the old line  format  (see
1972         node `Line formats' in the CVS manual).
1973
1974
1975
1976       %>
1977
1978         stands  for  the  lines  from the second file, including the trailing
1979         newline.  Each line is formatted according to the new line format.
1980
1981
1982
1983       %=
1984
1985         stands for the lines common to both  files,  including  the  trailing
1986         newline.  Each line is formatted according to the unchanged line for‐
1987         mat.
1988
1989
1990
1991       %%
1992
1993         stands for %.
1994
1995
1996
1997       %c'C'
1998
1999         where C is a single character, stands for C.  C may not  be  a  back‐
2000         slash  or an apostrophe.  For example, %c':' stands for a colon, even
2001         inside the then-part of an if-then-else format, which a  colon  would
2002         normally terminate.
2003
2004
2005
2006       %c'\O'
2007
2008         where  O is a string of 1, 2, or 3 octal digits, stands for the char‐
2009         acter with octal code O.  For example, %c'\0' stands for a null char‐
2010         acter.
2011
2012
2013
2014       Fn
2015
2016         where F is a printf conversion specification and n is one of the fol‐
2017         lowing letters, stands for n's value formatted with F.
2018
2019
2020         e
2021
2022           The line number of the line just before the group in the old file.
2023
2024
2025         f
2026
2027           The line number of the first line in the group  in  the  old  file;
2028           equals e + 1.
2029
2030
2031         l
2032
2033           The line number of the last line in the group in the old file.
2034
2035
2036         m
2037
2038           The  line  number of the line just after the group in the old file;
2039           equals l + 1.
2040
2041
2042         n
2043
2044           The number of lines in the group in the old file; equals l - f + 1.
2045
2046
2047         E, F, L, M, N
2048
2049           Likewise, for lines in the new file.
2050
2051
2052           The printf conversion specification can be %d, %o, %x, or %X, spec‐
2053           ifying  decimal, octal, lower case hexadecimal, or upper case hexa‐
2054           decimal output respectively.  After the % the following options can
2055           appear  in  sequence: a - specifying left-justification; an integer
2056           specifying the minimum field width; and a  period  followed  by  an
2057           optional  integer  specifying  the  minimum  number of digits.  For
2058           example, %5dN prints the number of new lines  in  the  group  in  a
2059           field of width 5 characters, using the printf format "%5d".
2060
2061
2062
2063       (A=B?T:E)
2064
2065         If  A equals B then T else E.  A and B are each either a decimal con‐
2066         stant or a single letter interpreted as above.  This format  spec  is
2067         equivalent  to  T if A's value equals B's; otherwise it is equivalent
2068         to E.
2069
2070         For example, %(N=0?no:%dN) line%(N=1?:s) is equivalent to no lines if
2071         N  (the number of lines in the group in the new file) is 0, to 1 line
2072         if N is 1, and to %dN lines otherwise.
2073
2074

Line formats

2076       Line formats control how each line taken from an input file  is  output
2077       as part of a line group in if-then-else format.
2078
2079       For  example,  the  following  command  outputs  text with a one-column
2080       change indicator to the left of the text.  The first column  of  output
2081       is  -  for  deleted lines, | for added lines, and a space for unchanged
2082       lines.  The formats  contain  newline  characters  where  newlines  are
2083       desired on output.
2084
2085
2086         cvs diff \
2087
2088            --old-line-format='-%l
2089         ' \
2090
2091            --new-line-format='|%l
2092         ' \
2093
2094            --unchanged-line-format=' %l
2095         ' \
2096
2097            myfile
2098
2099
2100
2101
2102       To specify a line format, use one of the following options.  You should
2103       quote format, since it often contains shell metacharacters.
2104
2105
2106
2107       --old-line-format=format
2108
2109         formats lines just from the first file.
2110
2111
2112
2113       --new-line-format=format
2114
2115         formats lines just from the second file.
2116
2117
2118
2119       --unchanged-line-format=format
2120
2121         formats lines common to both files.
2122
2123
2124
2125       --line-format=format
2126
2127         formats all lines; in effect, it sets all three above options  simul‐
2128         taneously.
2129
2130         In  a  line format, ordinary characters represent themselves; conver‐
2131         sion specifications start with % and have one of the following forms.
2132
2133
2134
2135       %l
2136
2137         stands for the contents of the line, not counting its  trailing  new‐
2138         line (if any).  This format ignores whether the line is incomplete.
2139
2140
2141
2142       %L
2143
2144         stands  for  the contents of the line, including its trailing newline
2145         (if any).  If a line is incomplete, this format preserves its  incom‐
2146         pleteness.
2147
2148
2149
2150       %%
2151
2152         stands for %.
2153
2154
2155
2156       %c'C'
2157
2158         where  C  is  a single character, stands for C.  C may not be a back‐
2159         slash or an apostrophe.  For example, %c':' stands for a colon.
2160
2161
2162
2163       %c'\O'
2164
2165         where O is a string of 1, 2, or 3 octal digits, stands for the  char‐
2166         acter with octal code O.  For example, %c'\0' stands for a null char‐
2167         acter.
2168
2169
2170
2171       Fn
2172
2173         where F is a printf conversion specification,  stands  for  the  line
2174         number  formatted  with F.  For example, %.5dn prints the line number
2175         using the printf format "%.5d".  see node `Line group formats' in the
2176         CVS manual, for more about printf conversion specifications.
2177
2178
2179         The default line format is %l followed by a newline character.
2180
2181         If  the  input  contains tab characters and it is important that they
2182         line up on output, you should ensure that %l or %L in a  line  format
2183         is just after a tab stop (e.g. by preceding %l or %L with a tab char‐
2184         acter), or you should use the -t or --expand-tabs option.
2185
2186         Taken together, the line and line group formats let you specify  many
2187         different  formats.  For example, the following command uses a format
2188         similar to diff's normal format.  You can tailor this command to  get
2189         fine control over diff's output.
2190
2191
2192         cvs diff \
2193
2194            --old-line-format='< %l
2195         ' \
2196
2197            --new-line-format='> %l
2198         ' \
2199
2200            --old-group-format='%df%(f=l?:,%dl)d%dE
2201         %<' \
2202
2203            --new-group-format='%dea%dF%(F=L?:,%dL)
2204         %>' \
2205
2206            --changed-group-format='%df%(f=l?:,%dl)c%dF%(F=L?:,%dL)
2207         %<—
2208         %>' \
2209
2210            --unchanged-group-format='' \
2211
2212            myfile
2213
2214
2215
2216
2217

diff examples

2219       The  following  line produces a Unidiff (-u flag) between revision 1.14
2220       and 1.19 of backend.c.  Due to the -kk flag  no  keywords  are  substi‐
2221       tuted,  so  differences  that  only  depend on keyword substitution are
2222       ignored.
2223
2224
2225         $ cvs diff -kk -u -r 1.14 -r 1.19 backend.c
2226
2227
2228
2229
2230       Suppose the experimental branch EXPR1 was  based  on  a  set  of  files
2231       tagged  RELEASE_1_0.  To see what has happened on that branch, the fol‐
2232       lowing can be used:
2233
2234
2235         $ cvs diff -r RELEASE_1_0 -r EXPR1
2236
2237
2238
2239
2240       A command like this can be used to produce a context diff  between  two
2241       releases:
2242
2243
2244         $ cvs diff -c -r RELEASE_1_0 -r RELEASE_1_1 > diffs
2245
2246
2247
2248
2249       If  you  are  maintaining ChangeLogs, a command like the following just
2250       before you commit your changes may help you write the ChangeLog  entry.
2251       All  local  modifications  that  have  not  yet  been committed will be
2252       printed.
2253
2254
2255         $ cvs diff -u | less
2256
2257
2258
2259
2260

export

2262   Export sources from CVS, similar to checkout
2263       · Synopsis: export [-flNnR] [-r rev|-D date] [-k subst] [-d  dir]  mod‐
2264         ule...
2265
2266       · Requires: repository.
2267
2268       · Changes: current directory.
2269
2270         This command is a variant of checkout; use it when you want a copy of
2271         the source for module without  the  cvs  administrative  directories.
2272         For example, you might use export to prepare source for shipment off-
2273         site.  This command requires that you specify a date or tag (with  -D
2274         or  -r),  so that you can count on reproducing the source you ship to
2275         others (and thus it always prunes empty directories).
2276
2277         One often would like to use -kv with cvs  export.   This  causes  any
2278         keywords  to  be expanded such that an import done at some other site
2279         will not lose the keyword revision information.  But  be  aware  that
2280         doesn't  handle an export containing binary files correctly.  Also be
2281         aware that after having used -kv, one can no  longer  use  the  ident
2282         command (which is part of the rcs suite—see ident(1)) which looks for
2283         keyword strings.  If you want to be able to use ident  you  must  not
2284         use -kv.
2285
2286

export options

2288       These  standard  options  are  supported  by  export  (see node `Common
2289       options' in the CVS manual, for a complete description of them):
2290
2291
2292
2293       -D date
2294
2295         Use the most recent revision no later than date.
2296
2297
2298
2299       -f
2300
2301         If no matching revision is found, retrieve the most  recent  revision
2302         (instead of ignoring the file).
2303
2304
2305
2306       -l
2307
2308         Local; run only in current working directory.
2309
2310
2311
2312       -n
2313
2314         Do not run any checkout program.
2315
2316
2317
2318       -R
2319
2320         Export directories recursively.  This is on by default.
2321
2322
2323
2324       -r tag
2325
2326         Use revision tag.
2327
2328         In  addition,  these options (that are common to checkout and export)
2329         are also supported:
2330
2331
2332
2333       -d dir
2334
2335         Create a directory called dir for the working files, instead of using
2336         the  module name.  see node `checkout options' in the CVS manual, for
2337         complete details on how cvs handles this flag.
2338
2339
2340
2341       -k subst
2342
2343         Set keyword expansion mode (see node `Substitution modes' in the  CVS
2344         manual).
2345
2346
2347
2348       -N
2349
2350         Only useful together with -d dir.  see node `checkout options' in the
2351         CVS manual, for complete details on how cvs handles this flag.
2352
2353

history

2355   Show status of files and users
2356       · Synopsis:     history [-report] [-flags] [-options args] [files...]
2357
2358       · Requires: the file $CVSROOT/CVSROOT/history
2359
2360       · Changes: nothing.
2361
2362         cvs can keep a history file that tracks each  use  of  the  checkout,
2363         commit,  rtag,  update, and release commands.  You can use history to
2364         display this information in various formats.
2365
2366         Logging must be enabled by creating  the  file  $CVSROOT/CVSROOT/his‐
2367         tory.
2368
2369         history uses -f, -l, -n, and -p in ways that conflict with the normal
2370         use inside cvs (see node `Common options' in the CVS manual).
2371
2372

history options

2374       Several options (shown above as -report)  control  what kind of  report
2375       is generated:
2376
2377
2378
2379       -c
2380
2381         Report  on  each time commit was used (i.e., each time the repository
2382         was modified).
2383
2384
2385
2386       -e
2387
2388         Everything (all record types).  Equivalent to specifying -x with  all
2389         record types.  Of course, -e will also include record types which are
2390         added in a future version of cvs; if you are writing a  script  which
2391         can only handle certain record types, you'll want to specify -x.
2392
2393
2394
2395       -m module
2396
2397         Report  on  a  particular  module.  (You can meaningfully use -m more
2398         than once on the command line.)
2399
2400
2401
2402       -o
2403
2404         Report on checked-out modules.  This is the default report type.
2405
2406
2407
2408       -T
2409
2410         Report on all tags.
2411
2412
2413
2414       -x type
2415
2416         Extract a particular set of record types type from the  cvs  history.
2417         The  types  are indicated by single letters, which you may specify in
2418         combination.
2419
2420         Certain commands have a single record type:
2421
2422
2423         F
2424
2425           release
2426
2427         O
2428
2429           checkout
2430
2431         E
2432
2433           export
2434
2435         T
2436
2437           rtag
2438
2439           One of five record types may result from an update:
2440
2441
2442         C
2443
2444           A merge was necessary but collisions were detected (requiring  man‐
2445           ual merging).
2446
2447         G
2448
2449           A merge was necessary and it succeeded.
2450
2451         U
2452
2453           A working file was copied from the repository.
2454
2455         P
2456
2457           A working file was patched to match the repository.
2458
2459         W
2460
2461           The  working  copy  of a file was deleted during update (because it
2462           was gone from the repository).
2463
2464           One of three record types results from commit:
2465
2466
2467         A
2468
2469           A file was added for the first time.
2470
2471         M
2472
2473           A file was modified.
2474
2475         R
2476
2477           A file was removed.
2478
2479           The options shown as -flags constrain or expand the report  without
2480           requiring option arguments:
2481
2482
2483
2484       -a
2485
2486         Show  data  for  all  users (the default is to show data only for the
2487         user executing history).
2488
2489
2490
2491       -l
2492
2493         Show last modification only.
2494
2495
2496
2497       -w
2498
2499         Show only the records for modifications done from  the  same  working
2500         directory where history is executing.
2501
2502         The  options  shown as -options args constrain the report based on an
2503         argument:
2504
2505
2506
2507       -b str
2508
2509         Show data back to a record containing  the  string  str   in   either
2510         the module name, the file name, or the repository path.
2511
2512
2513
2514       -D date
2515
2516         Show data since date.  This is slightly different from the normal use
2517         of -D date, which selects the newest revision older than date.
2518
2519
2520
2521       -f file
2522
2523         Show data for a particular file (you can specify several  -f  options
2524         on the same command line).  This is equivalent to specifying the file
2525         on the command line.
2526
2527
2528
2529       -n module
2530
2531         Show data for a particular module (you can specify several -n options
2532         on the same command line).
2533
2534
2535
2536       -p repository
2537
2538         Show  data  for a particular source repository  (you can specify sev‐
2539         eral -p options on the same command line).
2540
2541
2542
2543       -r rev
2544
2545         Show records referring to revisions since the revision or  tag  named
2546         rev  appears  in individual rcs files.  Each rcs file is searched for
2547         the revision or tag.
2548
2549
2550
2551       -t tag
2552
2553         Show records since tag tag was last added to the history file.   This
2554         differs  from  the  -r  flag  above in that it reads only the history
2555         file, not the rcs files, and is much faster.
2556
2557
2558
2559       -u name
2560
2561         Show records for user name.
2562
2563
2564
2565       -z timezone
2566
2567         Show times in the selected records  using  the  specified  time  zone
2568         instead of UTC.
2569
2570

import

2572   Import sources into CVS, using vendor branches
2573       · Synopsis: import [-options] repository vendortag releasetag...
2574
2575       · Requires: Repository, source distribution directory.
2576
2577       · Changes: repository.
2578
2579         Use  import to incorporate an entire source distribution from an out‐
2580         side source (e.g., a  source  vendor)  into  your  source  repository
2581         directory.   You  can use this command both for initial creation of a
2582         repository, and for wholesale updates to the module from the  outside
2583         source.  see node `Tracking sources' in the CVS manual, for a discus‐
2584         sion on this subject.
2585
2586         The repository argument gives a directory name (or a path to a direc‐
2587         tory) under the cvs root directory for repositories; if the directory
2588         did not exist, import creates it.
2589
2590         When you use import for updates to source that has been  modified  in
2591         your  source repository (since a prior import), it will notify you of
2592         any files that conflict in  the  two  branches  of  development;  use
2593         checkout  -j to reconcile the differences, as import instructs you to
2594         do.
2595
2596         If cvs decides a file should be ignored (see node `cvsignore' in  the
2597         CVS  manual),  it  does  not  import it and prints I  followed by the
2598         filename (see node `import output' in the CVS manual, for a  complete
2599         description of the output).
2600
2601         If the file $CVSROOT/CVSROOT/cvswrappers exists, any file whose names
2602         match the specifications in that file will be treated as packages and
2603         the  appropriate  filtering  will  be performed on the file/directory
2604         before being imported.  see node `Wrappers' in the CVS manual.
2605
2606         The outside source is saved  in  a  first-level  branch,  by  default
2607         1.1.1.   Updates  are  leaves of this branch; for example, files from
2608         the first imported collection of source  will  be  revision  1.1.1.1,
2609         then  files  from the first imported update will be revision 1.1.1.2,
2610         and so on.
2611
2612         At least three arguments are required.  repository is needed to iden‐
2613         tify  the  collection  of  source.  vendortag is a tag for the entire
2614         branch (e.g., for  1.1.1).   You  must  also  specify  at  least  one
2615         releasetag  to uniquely identify the files at the leaves created each
2616         time you execute import.  The releasetag should be  new,  not  previ‐
2617         ously  existing  in  the  repository  file, and uniquely identify the
2618         imported release,
2619
2620         Note that import does not change the directory in  which  you  invoke
2621         it.   In particular, it does not set up that directory as a cvs work‐
2622         ing directory; if you want to work with the sources import them first
2623         and then check them out into a different directory (see node `Getting
2624         the source' in the CVS manual).
2625
2626

import options

2628       This standard option is supported by import (see node `Common  options'
2629       in the CVS manual, for a complete description):
2630
2631
2632
2633       -m message
2634
2635         Use message as log information, instead of invoking an editor.
2636
2637         There are the following additional special options.
2638
2639
2640
2641       -b branch
2642
2643         See see node `Multiple vendor branches' in the CVS manual.
2644
2645
2646
2647       -k subst
2648
2649         Indicate the keyword expansion mode desired.  This setting will apply
2650         to all files created during the import, but not  to  any  files  that
2651         previously  existed  in  the  repository.  See see node `Substitution
2652         modes' in the CVS manual, for a list of valid -k settings.
2653
2654
2655
2656       -I name
2657
2658         Specify file names that should be ignored during import.  You can use
2659         this  option  repeatedly.   To  avoid ignoring any files at all (even
2660         those ignored by default), specify `-I !'.
2661
2662         name can be a file name pattern of the same type that you can specify
2663         in the .cvsignore file.  see node `cvsignore' in the CVS manual.
2664
2665
2666
2667       -W spec
2668
2669         Specify  file  names  that should be filtered during import.  You can
2670         use this option repeatedly.
2671
2672         spec can be a file name pattern of the same type that you can specify
2673         in the .cvswrappers file. see node `Wrappers' in the CVS manual.
2674
2675

import output

2677       import  keeps  you informed of its progress by printing a line for each
2678       file, preceded by one character indicating the status of the file:
2679
2680
2681
2682       U file
2683
2684         The file already exists in the repository and has  not  been  locally
2685         modified; a new revision has been created (if necessary).
2686
2687
2688
2689       N file
2690
2691         The file is a new file which has been added to the repository.
2692
2693
2694
2695       C file
2696
2697         The  file already exists in the repository but has been locally modi‐
2698         fied; you will have to merge the changes.
2699
2700
2701
2702       I file
2703
2704         The file is being ignored (see node `cvsignore' in the CVS manual).
2705
2706
2707
2708       L file
2709
2710         The file is a symbolic link; cvs import ignores symbolic links.  Peo‐
2711         ple periodically suggest that this behavior should be changed, but if
2712         there is a consensus on what it should be changed to, it doesn't seem
2713         to  be apparent.  (Various options in the modules file can be used to
2714         recreate symbolic links on checkout, update, etc.; see node `modules'
2715         in the CVS manual.)
2716
2717

import examples

2719       See  see  node `Tracking sources' in the CVS manual, and see node `From
2720       files' in the CVS manual.
2721
2722

log

2724   Print out log information for files
2725       · Synopsis: log [options] [files...]
2726
2727       · Requires: repository, working directory.
2728
2729       · Changes: nothing.
2730
2731         Display log information for files.  log used to call the rcs  utility
2732         rlog.   Although  this is no longer true in the current sources, this
2733         history determines the format of the output and  the  options,  which
2734         are not quite in the style of the other cvs commands.
2735
2736         The  output  includes the location of the rcs file, the head revision
2737         (the latest revision on the trunk), all  symbolic  names  (tags)  and
2738         some  other  things.   For  each  revision,  the revision number, the
2739         author, the number of lines added/deleted and  the  log  message  are
2740         printed.   All  times  are  displayed  in  Coordinated Universal Time
2741         (UTC).  (Other parts of cvs print times in the local timezone).
2742
2743         log uses -R in a way that conflicts with the normal  use  inside  cvs
2744         (see node `Common options' in the CVS manual).
2745
2746

log options

2748       By  default,  log  prints all information that is available.  All other
2749       options restrict the output.  Note that the revision selection  options
2750       (-d,  -r,  -s,  and  -w)  have no effect, other than possibly causing a
2751       search for files in Attic directories, when used  in  conjunction  with
2752       the options that restrict the output to only log header fields (-b, -h,
2753       -R, and -t) unless the -S option is also specified.
2754
2755
2756
2757       -b
2758
2759         Print information about the revisions on the default branch, normally
2760         the highest branch on the trunk.
2761
2762
2763
2764       -d dates
2765
2766         Print  information  about  revisions  with a checkin date/time in the
2767         range given by the semicolon-separated list of dates.  The date  for‐
2768         mats  accepted  are those accepted by the -D option to many other cvs
2769         commands (see node `Common options' in the CVS manual).  Dates can be
2770         combined into ranges as follows:
2771
2772
2773         d1<d2
2774
2775
2776
2777         d2>d1
2778
2779           Select the revisions that were deposited between d1 and d2.
2780
2781
2782         <d
2783
2784
2785
2786         d>
2787
2788           Select all revisions dated d or earlier.
2789
2790
2791         d<
2792
2793
2794
2795         >d
2796
2797           Select all revisions dated d or later.
2798
2799
2800         d
2801
2802           Select the single, latest revision dated d or earlier.
2803
2804           The > or < characters may be followed by = to indicate an inclusive
2805           range rather than an exclusive one.
2806
2807           Note that the separator is a semicolon (;).
2808
2809
2810
2811       -h
2812
2813         Print only the name of the rcs file, name of the file in the  working
2814         directory,  head, default branch, access list, locks, symbolic names,
2815         and suffix.
2816
2817
2818
2819       -l
2820
2821         Local; run only in current working directory.   (Default  is  to  run
2822         recursively).
2823
2824
2825
2826       -N
2827
2828         Do not print the list of tags for this file.  This option can be very
2829         useful when your site uses a lot of tags, so rather  than  "more"'ing
2830         over  3  pages  of  tag information, the log information is presented
2831         without tags at all.
2832
2833
2834
2835       -R
2836
2837         Print only the name of the rcs file.
2838
2839
2840
2841       -rrevisions
2842
2843         Print information about revisions given in the  comma-separated  list
2844         revisions  of revisions and ranges.  The following table explains the
2845         available range formats:
2846
2847
2848         rev1:rev2
2849
2850           Revisions rev1 to rev2 (which must be on the same branch).
2851
2852
2853         rev1::rev2
2854
2855           The same, but excluding rev1.
2856
2857
2858         :rev
2859
2860
2861
2862         ::rev
2863
2864           Revisions from the beginning of the branch up to and including rev.
2865
2866
2867         rev:
2868
2869           Revisions starting with rev to the end  of  the  branch  containing
2870           rev.
2871
2872
2873         rev::
2874
2875           Revisions starting just after rev to the end of the branch contain‐
2876           ing rev.
2877
2878
2879         branch
2880
2881           An argument that is a branch means all revisions on that branch.
2882
2883
2884         branch1:branch2
2885
2886
2887
2888         branch1::branch2
2889
2890           A range of branches means all revisions on  the  branches  in  that
2891           range.
2892
2893
2894         branch.
2895
2896           The latest revision in branch.
2897
2898           A  bare  -r  with  no  revisions  means  the latest revision on the
2899           default branch, normally the trunk.  There can be no space  between
2900           the -r option and its argument.
2901
2902
2903
2904       -S
2905
2906         Suppress the header if no revisions are selected.
2907
2908
2909
2910       -s states
2911
2912         Print information about revisions whose state attributes match one of
2913         the states given in  the  comma-separated  list  states.   Individual
2914         states  may  be  any  text  string, though cvs commonly only uses two
2915         states, Exp and dead.  See see node `admin options' in the CVS manual
2916         for more information.
2917
2918
2919
2920       -t
2921
2922         Print the same as -h, plus the descriptive text.
2923
2924
2925
2926       -wlogins
2927
2928         Print  information  about  revisions  checked  in by users with login
2929         names appearing in the comma-separated list  logins.   If  logins  is
2930         omitted,  the user's login is assumed.  There can be no space between
2931         the -w option and its argument.
2932
2933         log prints the  intersection  of  the  revisions  selected  with  the
2934         options  -d,  -s, and -w, intersected with the union of the revisions
2935         selected by -b and -r.
2936
2937

log examples

2939       Contributed examples are gratefully accepted.
2940
2941

rdiff

2943   'patch' format diffs between releases
2944       · rdiff [-flags] [-V vn] [-r t|-D d [-r t2|-D d2]] modules...
2945
2946       · Requires: repository.
2947
2948       · Changes: nothing.
2949
2950       · Synonym: patch
2951
2952         Builds a Larry Wall format patch(1) file between two  releases,  that
2953         can  be  fed  directly into the patch program to bring an old release
2954         up-to-date with the new release.  (This is one of the  few  cvs  com‐
2955         mands that operates directly from the repository, and doesn't require
2956         a prior checkout.) The diff output is sent  to  the  standard  output
2957         device.
2958
2959         You  can  specify (using the standard -r and -D options) any combina‐
2960         tion of one or two revisions or dates.  If only one revision or  date
2961         is  specified, the patch file reflects differences between that revi‐
2962         sion or date and the current head revisions in the rcs file.
2963
2964         Note that if the software release affected is contained in more  than
2965         one  directory,  then it may be necessary to specify the -p option to
2966         the patch command when patching the old sources,  so  that  patch  is
2967         able to find the files that are located in other directories.
2968
2969

rdiff options

2971       These  standard  options  are  supported  by  rdiff  (see  node `Common
2972       options' in the CVS manual, for a complete description of them):
2973
2974
2975
2976       -D date
2977
2978         Use the most recent revision no later than date.
2979
2980
2981
2982       -f
2983
2984         If no matching revision is found, retrieve the most  recent  revision
2985         (instead of ignoring the file).
2986
2987
2988
2989       -k kflag
2990
2991         Process keywords according to kflag.  See see node `Keyword substitu‐
2992         tion' in the CVS manual.
2993
2994
2995
2996       -l
2997
2998         Local; don't descend subdirectories.
2999
3000
3001
3002       -R
3003
3004         Examine directories recursively.  This option is on by default.
3005
3006
3007
3008       -r tag
3009
3010         Use revision tag.
3011
3012         In addition to the above, these options are available:
3013
3014
3015
3016       -c
3017
3018         Use the context diff format.  This is the default format.
3019
3020
3021
3022       -s
3023
3024         Create a summary change report  instead  of  a  patch.   The  summary
3025         includes  information  about files that were changed or added between
3026         the releases.  It is sent to the standard  output  device.   This  is
3027         useful for finding out, for example, which files have changed between
3028         two dates or revisions.
3029
3030
3031
3032       -t
3033
3034         A diff of the top two  revisions  is  sent  to  the  standard  output
3035         device.   This  is  most  useful for seeing what the last change to a
3036         file was.
3037
3038
3039
3040       -u
3041
3042         Use the unidiff format for the context diffs.  Remember that old ver‐
3043         sions of the patch program can't handle the unidiff format, so if you
3044         plan to post this patch to the net you should probably not use -u.
3045
3046
3047
3048       -V vn
3049
3050         Expand keywords according to the rules current in rcs version vn (the
3051         expansion  format changed with rcs version 5).  Note that this option
3052         is no longer accepted.  cvs will always expand keywords the way  that
3053         rcs version 5 does.
3054
3055

rdiff examples

3057       Suppose you receive mail from foo@example.net asking for an update from
3058       release 1.2 to 1.4 of the tc compiler.  You have  no  such  patches  on
3059       hand,  but  with  cvs  that  can easily be fixed with a command such as
3060       this:
3061
3062
3063         $ cvs rdiff -c -r FOO1_2 -r FOO1_4 tc | \
3064         $$ Mail -s 'The patches you asked for' foo@example.net
3065
3066
3067
3068
3069       Suppose you have made release 1.3, and forked a branch called  R_1_3fix
3070       for  bug  fixes.   R_1_3_1 corresponds to release 1.3.1, which was made
3071       some time ago.  Now, you want to see how much development has been done
3072       on the branch.  This command can be used:
3073
3074
3075         $ cvs patch -s -r R_1_3_1 -r R_1_3fix module-name
3076         cvs rdiff: Diffing module-name
3077         File ChangeLog,v changed from revision 1.52.2.5 to 1.52.2.6
3078         File foo.c,v changed from revision 1.52.2.3 to 1.52.2.4
3079         File bar.h,v changed from revision 1.29.2.1 to 1.2
3080
3081
3082
3083
3084

release

3086   Indicate that a Module is no longer in use
3087       · release [-d] directories...
3088
3089       · Requires: Working directory.
3090
3091       · Changes: Working directory, history log.
3092
3093         This  command  is  meant to safely cancel the effect of cvs checkout.
3094         Since cvs doesn't lock files, it isn't strictly necessary to use this
3095         command.  You can always simply delete your working directory, if you
3096         like; but you risk losing changes you may  have  forgotten,  and  you
3097         leave  no  trace  in the cvs history file (see node `history file' in
3098         the CVS manual) that you've abandoned your checkout.
3099
3100         Use cvs release to avoid these problems.  This command checks that no
3101         uncommitted changes are present; that you are executing it from imme‐
3102         diately above a  cvs  working  directory;  and  that  the  repository
3103         recorded  for your files is the same as the repository defined in the
3104         module database.
3105
3106         If all these conditions are true, cvs release leaves a record of  its
3107         execution  (attesting to your intentionally abandoning your checkout)
3108         in the cvs history log.
3109
3110

release options

3112       The release command supports one command option:
3113
3114
3115
3116       -d
3117
3118         Delete your working copy of the file if  the  release  succeeds.   If
3119         this  flag is not given your files will remain in your working direc‐
3120         tory.
3121
3122         WARNING:  The release  command  deletes  all  directories  and  files
3123         recursively.   This  has the very serious side-effect that any direc‐
3124         tory that you have created inside your checked-out sources,  and  not
3125         added  to  the  repository  (using  the add command; see node `Adding
3126         files' in the CVS manual) will be silently deleted—even if it is non-
3127         empty!
3128
3129

release output

3131       Before  release  releases your sources it will print a one-line message
3132       for any file that is not up-to-date.
3133
3134
3135
3136       U file
3137
3138
3139
3140
3141       P file
3142
3143         There exists a newer revision of this file in the repository, and you
3144         have  not modified your local copy of the file (U and P mean the same
3145         thing).
3146
3147
3148
3149       A file
3150
3151         The file has been added to your private copy of the sources, but  has
3152         not yet been committed to the repository.  If you delete your copy of
3153         the sources this file will be lost.
3154
3155
3156
3157       R file
3158
3159         The file has been removed from your private copy of the sources,  but
3160         has  not yet been removed from the repository, since you have not yet
3161         committed the removal.  see node `commit' in the CVS manual.
3162
3163
3164
3165       M file
3166
3167         The file is modified in your working directory.  There might also  be
3168         a newer revision inside the repository.
3169
3170
3171
3172       ? file
3173
3174         file  is  in  your working directory, but does not correspond to any‐
3175         thing in the source repository, and is not in the list of  files  for
3176         cvs  to  ignore  (see  the description of the -I option, and see node
3177         `cvsignore' in the CVS manual).  If you remove your working  sources,
3178         this file will be lost.
3179
3180

release examples

3182       Release  the  tc  directory,  and delete your local working copy of the
3183       files.
3184
3185
3186         $ cd ..         # You must stand immediately above the
3187
3188                         # sources when you issue cvs release.
3189         $ cvs release -d tc
3190         You have [0] altered files in this repository.
3191         Are you sure you want to release (and delete) directory `tc': y
3192         $
3193
3194
3195
3196
3197

update

3199   Bring work tree in sync with repository
3200       · update [-ACdflPpR] [-I name] [-j rev [-j rev]] [-k kflag] [-r  tag|-D
3201         date] [-W spec] files...
3202
3203       · Requires: repository, working directory.
3204
3205       · Changes: working directory.
3206
3207         After  you've run checkout to create your private copy of source from
3208         the common repository, other developers will  continue  changing  the
3209         central  source.   From  time  to time, when it is convenient in your
3210         development process, you can use the update command from within  your
3211         working  directory  to reconcile your work with any revisions applied
3212         to the source repository since your last checkout or update.
3213
3214

update options

3216       These standard options are available  with  update  (see  node  `Common
3217       options' in the CVS manual, for a complete description of them):
3218
3219
3220
3221       -D date
3222
3223         Use  the  most  recent  revision  no later than date.  This option is
3224         sticky, and implies -P.  See see node `Sticky tags' in the  CVS  man‐
3225         ual, for more information on sticky tags/dates.
3226
3227
3228
3229       -f
3230
3231         Only  useful  with the -D date or -r tag flags.  If no matching revi‐
3232         sion is found, retrieve the most recent revision (instead of ignoring
3233         the file).
3234
3235
3236
3237       -k kflag
3238
3239         Process keywords according to kflag.  See see node `Keyword substitu‐
3240         tion' in the CVS manual.  This option is sticky;  future  updates  of
3241         this  file  in  this  working directory will use the same kflag.  The
3242         status command can be viewed to see the sticky options.  See see node
3243         `Invoking  CVS' in the CVS manual, for more information on the status
3244         command.
3245
3246
3247
3248       -l
3249
3250         Local; run only in current working directory.   see  node  `Recursive
3251         behavior' in the CVS manual.
3252
3253
3254
3255       -P
3256
3257         Prune  empty  directories.   See see node `Moving directories' in the
3258         CVS manual.
3259
3260
3261
3262       -p
3263
3264         Pipe files to the standard output.
3265
3266
3267
3268       -R
3269
3270         Update directories recursively (default).  see node `Recursive behav‐
3271         ior' in the CVS manual.
3272
3273
3274
3275       -r rev
3276
3277         Retrieve  revision/tag  rev.   This option is sticky, and implies -P.
3278         See see node `Sticky tags' in the CVS manual, for more information on
3279         sticky tags/dates.
3280
3281         These special options are also available with update.
3282
3283
3284
3285       -A
3286
3287         Reset  any  sticky tags, dates, or -k options.  Does not reset sticky
3288         -k options on modified files.  See see node `Sticky tags' in the  CVS
3289         manual, for more information on sticky tags/dates.
3290
3291
3292
3293       -C
3294
3295         Overwrite  locally  modified files with clean copies from the reposi‐
3296         tory (the modified file is saved in .#file.revision, however).
3297
3298
3299
3300       -d
3301
3302         Create any directories that exist in the repository if they're  miss‐
3303         ing from the working directory.  Normally, update acts only on direc‐
3304         tories and files that were already enrolled in  your  working  direc‐
3305         tory.
3306
3307         This  is  useful  for  updating  directories that were created in the
3308         repository since the initial checkout; but it has an unfortunate side
3309         effect.   If  you  deliberately  avoided  certain  directories in the
3310         repository when you created your working  directory  (either  through
3311         use  of a module name or by listing explicitly the files and directo‐
3312         ries you wanted on the command line), then updating with -d will cre‐
3313         ate those directories, which may not be what you want.
3314
3315
3316
3317       -I name
3318
3319         Ignore  files whose names match name (in your working directory) dur‐
3320         ing the update.  You can specify -I more than  once  on  the  command
3321         line  to specify several files to ignore.  Use -I ! to avoid ignoring
3322         any files at all.  see node `cvsignore' in the CVS manual, for  other
3323         ways to make cvs ignore some files.
3324
3325
3326
3327       -Wspec
3328
3329         Specify  file  names  that should be filtered during update.  You can
3330         use this option repeatedly.
3331
3332         spec can be a file name pattern of the same type that you can specify
3333         in the .cvswrappers file. see node `Wrappers' in the CVS manual.
3334
3335
3336
3337       -jrevision
3338
3339         With  two  -j options, merge changes from the revision specified with
3340         the first -j option to the  revision  specified  with  the  second  j
3341         option, into the working directory.
3342
3343         With  one  -j option, merge changes from the ancestor revision to the
3344         revision specified with the -j option, into  the  working  directory.
3345         The  ancestor  revision  is the common ancestor of the revision which
3346         the working directory is based on, and the revision specified in  the
3347         -j option.
3348
3349         Note  that using a single -j tagname option rather than -j branchname
3350         to merge changes from a branch will often not remove files which were
3351         removed  on  the branch.  see node `Merging adds and removals' in the
3352         CVS manual, for more.
3353
3354         In addition, each -j option can contain an optional  date  specifica‐
3355         tion which, when used with branches, can limit the chosen revision to
3356         one within a specific date.  An optional date is specified by  adding
3357         a colon (:) to the tag: -jSymbolic_Tag:Date_Specifier.
3358
3359         see node `Branching and merging' in the CVS manual.
3360
3361
3362

update output

3364       update  and  checkout keep you informed of their progress by printing a
3365       line for each file, preceded by one character indicating the status  of
3366       the file:
3367
3368
3369
3370       U file
3371
3372         The file was brought up to date with respect to the repository.  This
3373         is done for any file that exists in the repository but  not  in  your
3374         working directory, and for files that you haven't changed but are not
3375         the most recent versions available in the repository.
3376
3377
3378
3379       P file
3380
3381         Like U, but the cvs server sends a patch instead of an  entire  file.
3382         This accomplishes the same thing as U using less bandwidth.
3383
3384
3385
3386       A file
3387
3388         The file has been added to your private copy of the sources, and will
3389         be added to the source repository when you run commit  on  the  file.
3390         This is a reminder to you that the file needs to be committed.
3391
3392
3393
3394       R file
3395
3396         The  file has been removed from your private copy of the sources, and
3397         will be removed from the source repository when you run commit on the
3398         file.  This is a reminder to you that the file needs to be committed.
3399
3400
3401
3402       M file
3403
3404         The file is modified in  your  working  directory.
3405
3406         M can indicate one of two states for a file you're working on: either
3407         there were no modifications to the same file in  the  repository,  so
3408         that  your  file  remains as you last saw it; or there were modifica‐
3409         tions in the repository as well as in your copy, but they were merged
3410         successfully, without conflict, in your working directory.
3411
3412         cvs  will  print  some  messages if it merges your work, and a backup
3413         copy of your working file (as it looked before you ran  update)  will
3414         be made.  The exact name of that file is printed while update runs.
3415
3416
3417
3418       C file
3419
3420         A  conflict  was  detected while trying to merge your changes to file
3421         with changes from the source repository.   file  (the  copy  in  your
3422         working  directory)  is now the result of attempting to merge the two
3423         revisions; an unmodified copy of your file is also  in  your  working
3424         directory,  with the name .#file.revision where revision is the revi‐
3425         sion that your modified file started from.  Resolve the  conflict  as
3426         described  in  see node `Conflicts example' in the CVS manual.  (Note
3427         that some systems automatically purge files that  begin  with  .#  if
3428         they  have not been accessed for a few days.  If you intend to keep a
3429         copy of your original file, it is a very good  idea  to  rename  it.)
3430         Under vms, the file name starts with __ rather than .#.
3431
3432
3433
3434       ? file
3435
3436         file  is  in  your working directory, but does not correspond to any‐
3437         thing in the source repository, and is not in the list of  files  for
3438         cvs  to  ignore  (see  the description of the -I option, and see node
3439         `cvsignore' in the CVS manual).
3440

AUTHORS

3442       Dick Grune
3443              Original author of  the  cvs  shell  script  version  posted  to
3444              comp.sources.unix  in  the  volume6  release  of December, 1986.
3445              Credited with much of the cvs conflict resolution algorithms.
3446
3447       Brian Berliner
3448              Coder and designer of the cvs program  itself  in  April,  1989,
3449              based on the original work done by Dick.
3450
3451       Jeff Polk
3452              Helped Brian with the design of the cvs module and vendor branch
3453              support and author of the checkin(1) shell script (the  ancestor
3454              of cvs import).
3455
3456       Larry Jones, Derek R. Price, and Mark D. Baushke
3457              Have helped maintain cvs for many years.
3458
3459       And many others too numerous to mention here.
3460

SEE ALSO

3462       The most comprehensive manual for CVS is Version Management with CVS by
3463       Per Cederqvist et al.  Depending on your system, you may be able to get
3464       it  with the info CVS command or it may be available as cvs.pdf (Porta‐
3465       ble  Document  Format),  cvs.ps  (PostScript),   cvs.texinfo   (Texinfo
3466       source), or cvs.html.
3467
3468       For CVS updates, more information on documentation, software related to
3469       CVS, development of CVS, and more, see:
3470
3471           http://cvs.nongnu.org
3472
3473 ci(1), co(1), cvs(5), cvsbug(8), diff(1), grep(1),  patch(1),  rcs(1),  rcsd‐
3474 iff(1), rcsmerge(1), rlog(1).
3475
3476
3477
3478                                                                        CVS(1)
Impressum