xref: /openbsd-src/gnu/usr.bin/cvs/doc/cvs.info-7 (revision b2ea75c1b17e1a9a339660e7ed45cd24946b230e)
1This is cvs.info, produced by makeinfo version 4.0 from ./cvs.texinfo.
2
3START-INFO-DIR-ENTRY
4* CVS: (cvs).          Concurrent Versions System
5END-INFO-DIR-ENTRY
6
7   Copyright (C) 1992, 1993 Signum Support AB Copyright (C) 1993, 1994
8Free Software Foundation, Inc.
9
10   Permission is granted to make and distribute verbatim copies of this
11manual provided the copyright notice and this permission notice are
12preserved on all copies.
13
14   Permission is granted to copy and distribute modified versions of
15this manual under the conditions for verbatim copying, provided also
16that the entire resulting derived work is distributed under the terms
17of a permission notice identical to this one.
18
19   Permission is granted to copy and distribute translations of this
20manual into another language, under the above conditions for modified
21versions, except that this permission notice may be stated in a
22translation approved by the Free Software Foundation.
23
24
25File: cvs.info,  Node: Invoking CVS,  Next: Administrative files,  Prev: CVS commands,  Up: Top
26
27Quick reference to CVS commands
28*******************************
29
30   This appendix describes how to invoke CVS, with references to where
31each command or feature is described in detail.  For other references
32run the `cvs --help' command, or see *Note Index::.
33
34   A CVS command looks like:
35
36     cvs [ GLOBAL_OPTIONS ] COMMAND [ COMMAND_OPTIONS ] [ COMMAND_ARGS ]
37
38   Global options:
39
40`--allow-root=ROOTDIR'
41     Specify legal CVSROOT directory (server only) (not in CVS 1.9 and
42     older).  See *Note Password authentication server::.
43
44`-a'
45     Authenticate all communication (client only) (not in CVS 1.9 and
46     older).  See *Note Global options::.
47
48`-b'
49     Specify RCS location (CVS 1.9 and older).  See *Note Global
50     options::.
51
52`-d ROOT'
53     Specify the CVSROOT.  See *Note Repository::.
54
55`-e EDITOR'
56     Edit messages with EDITOR.  See *Note Committing your changes::.
57
58`-f'
59     Do not read the `~/.cvsrc' file.  See *Note Global options::.
60
61`-H'
62`--help'
63     Print a help message.  See *Note Global options::.
64
65`-l'
66     Do not log in `$CVSROOT/CVSROOT/history' file.  See *Note Global
67     options::.
68
69`-n'
70     Do not change any files.  See *Note Global options::.
71
72`-Q'
73     Be really quiet.  See *Note Global options::.
74
75`-q'
76     Be somewhat quiet.  See *Note Global options::.
77
78`-r'
79     Make new working files read-only.  See *Note Global options::.
80
81`-s VARIABLE=VALUE'
82     Set a user variable.  See *Note Variables::.
83
84`-T TEMPDIR'
85     Put temporary files in TEMPDIR.  See *Note Global options::.
86
87`-t'
88     Trace CVS execution.  See *Note Global options::.
89
90`-v'
91
92`--version'
93     Display version and copyright information for CVS.
94
95`-w'
96     Make new working files read-write.  See *Note Global options::.
97
98`-x'
99     Encrypt all communication (client only).  See *Note Global
100     options::.
101
102`-z GZIP-LEVEL'
103     Set the compression level (client only).  See *Note Global
104     options::.
105
106   Keyword expansion modes (*note Substitution modes::):
107
108     -kkv  $Id: cvs.info-7,v 1.1.1.12 2001/02/10 19:03:19 tholo Exp $
109     -kkvl $Id: cvs.info-7,v 1.1.1.12 2001/02/10 19:03:19 tholo Exp $
110     -kk   $Id: cvs.info-7,v 1.1.1.12 2001/02/10 19:03:19 tholo Exp $
111     -kv   file1,v 1.1 1993/12/09 03:21:13 joe Exp
112     -ko   no expansion
113     -kb   no expansion, file is binary
114
115   Keywords (*note Keyword list::):
116
117     $Author: tholo $
118     $Date: 2001/02/10 19:03:19 $
119     $Header: /home/cvs/src/gnu/usr.bin/cvs/doc/cvs.info-7,v 1.1.1.12 2001/02/10 19:03:19 tholo Exp $
120     $Id: cvs.info-7,v 1.1.1.12 2001/02/10 19:03:19 tholo Exp $
121     $Locker:  $
122     $Name:  $
123     $RCSfile: cvs.info-7,v $
124     $Revision: 1.1.1.12 $
125     $Source: /home/cvs/src/gnu/usr.bin/cvs/doc/cvs.info-7,v $
126     $State: Exp $
127     $Log: cvs.info-7,v $
128     Revision 1.1.1.12  2001/02/10 19:03:19  tholo
129     Latest from Cyclic Software
130
131     Revision 1.1  1993/12/09 03:30:17  joe
132     Initial revision
133
134   Commands, command options, and command arguments:
135
136`add [OPTIONS] [FILES...]'
137     Add a new file/directory.  See *Note Adding files::.
138
139    `-k KFLAG'
140          Set keyword expansion.
141
142    `-m MSG'
143          Set file description.
144
145`admin [OPTIONS] [FILES...]'
146     Administration of history files in the repository.  See *Note
147     admin::.
148
149    `-b[REV]'
150          Set default branch.  See *Note Reverting local changes::.
151
152    `-cSTRING'
153          Set comment leader.
154
155    `-kSUBST'
156          Set keyword substitution.  See *Note Keyword substitution::.
157
158    `-l[REV]'
159          Lock revision REV, or latest revision.
160
161    `-mREV:MSG'
162          Replace the log message of revision REV with MSG.
163
164    `-oRANGE'
165          Delete revisions from the repository.  See *Note admin
166          options::.
167
168    `-q'
169          Run quietly; do not print diagnostics.
170
171    `-sSTATE[:REV]'
172          Set the state.
173
174    `-t'
175          Set file description from standard input.
176
177    `-tFILE'
178          Set file description from FILE.
179
180    `-t-STRING'
181          Set file description to STRING.
182
183    `-u[REV]'
184          Unlock revision REV, or latest revision.
185
186`annotate [OPTIONS] [FILES...]'
187     Show last revision where each line was modified.  See *Note
188     annotate::.
189
190    `-D DATE'
191          Annotate the most recent revision no later than DATE.  See
192          *Note Common options::.
193
194    `-f'
195          Use head revision if tag/date not found.  See *Note Common
196          options::.
197
198    `-l'
199          Local; run only in current working directory.  *Note
200          Recursive behavior::.
201
202    `-R'
203          Operate recursively (default).  *Note Recursive behavior::.
204
205    `-r TAG'
206          Annotate revision TAG.  See *Note Common options::.
207
208`checkout [OPTIONS] MODULES...'
209     Get a copy of the sources.  See *Note checkout::.
210
211    `-A'
212          Reset any sticky tags/date/options.  See *Note Sticky tags::
213          and *Note Keyword substitution::.
214
215    `-c'
216          Output the module database.  See *Note checkout options::.
217
218    `-D DATE'
219          Check out revisions as of DATE (is sticky).  See *Note Common
220          options::.
221
222    `-d DIR'
223          Check out into DIR.  See *Note checkout options::.
224
225    `-f'
226          Use head revision if tag/date not found.  See *Note Common
227          options::.
228
229    `-j REV'
230          Merge in changes.  See *Note checkout options::.
231
232    `-k KFLAG'
233          Use KFLAG keyword expansion.  See *Note Substitution modes::.
234
235    `-l'
236          Local; run only in current working directory.  *Note
237          Recursive behavior::.
238
239    `-N'
240          Don't "shorten" module paths if -d specified.  See *Note
241          checkout options::.
242
243    `-n'
244          Do not run module program (if any).  See *Note checkout
245          options::.
246
247    `-P'
248          Prune empty directories.  See *Note Moving directories::.
249
250    `-p'
251          Check out files to standard output (avoids stickiness).  See
252          *Note checkout options::.
253
254    `-R'
255          Operate recursively (default).  *Note Recursive behavior::.
256
257    `-r TAG'
258          Checkout revision TAG (is sticky).  See *Note Common
259          options::.
260
261    `-s'
262          Like -c, but include module status.  See *Note checkout
263          options::.
264
265`commit [OPTIONS] [FILES...]'
266     Check changes into the repository.  See *Note commit::.
267
268    `-F FILE'
269          Read log message from FILE.  See *Note commit options::.
270
271    `-f'
272          Force the file to be committed; disables recursion.  See
273          *Note commit options::.
274
275    `-l'
276          Local; run only in current working directory.  See *Note
277          Recursive behavior::.
278
279    `-m MSG'
280          Use MSG as log message.  See *Note commit options::.
281
282    `-n'
283          Do not run module program (if any).  See *Note commit
284          options::.
285
286    `-R'
287          Operate recursively (default).  *Note Recursive behavior::.
288
289    `-r REV'
290          Commit to REV.  See *Note commit options::.
291
292`diff [OPTIONS] [FILES...]'
293     Show differences between revisions.  See *Note diff::.  In
294     addition to the options shown below, accepts a wide variety of
295     options to control output style, for example `-c' for context
296     diffs.
297
298    `-D DATE1'
299          Diff revision for date against working file.  See *Note diff
300          options::.
301
302    `-D DATE2'
303          Diff REV1/DATE1 against DATE2.  See *Note diff options::.
304
305    `-l'
306          Local; run only in current working directory.  See *Note
307          Recursive behavior::.
308
309    `-N'
310          Include diffs for added and removed files.  See *Note diff
311          options::.
312
313    `-R'
314          Operate recursively (default).  *Note Recursive behavior::.
315
316    `-r REV1'
317          Diff revision for REV1 against working file.  See *Note diff
318          options::.
319
320    `-r REV2'
321          Diff REV1/DATE1 against REV2.  See *Note diff options::.
322
323`edit [OPTIONS] [FILES...]'
324     Get ready to edit a watched file.  See *Note Editing files::.
325
326    `-a ACTIONS'
327          Specify actions for temporary watch, where ACTIONS is `edit',
328          `unedit', `commit', `all', or `none'.  See *Note Editing
329          files::.
330
331    `-l'
332          Local; run only in current working directory.  See *Note
333          Recursive behavior::.
334
335    `-R'
336          Operate recursively (default).  *Note Recursive behavior::.
337
338`editors [OPTIONS] [FILES...]'
339     See who is editing a watched file.  See *Note Watch information::.
340
341    `-l'
342          Local; run only in current working directory.  See *Note
343          Recursive behavior::.
344
345    `-R'
346          Operate recursively (default).  *Note Recursive behavior::.
347
348`export [OPTIONS] MODULES...'
349     Export files from CVS.  See *Note export::.
350
351    `-D DATE'
352          Check out revisions as of DATE.  See *Note Common options::.
353
354    `-d DIR'
355          Check out into DIR.  See *Note export options::.
356
357    `-f'
358          Use head revision if tag/date not found.  See *Note Common
359          options::.
360
361    `-k KFLAG'
362          Use KFLAG keyword expansion.  See *Note Substitution modes::.
363
364    `-l'
365          Local; run only in current working directory.  *Note
366          Recursive behavior::.
367
368    `-N'
369          Don't "shorten" module paths if -d specified.  See *Note
370          export options::.
371
372    `-n'
373          Do not run module program (if any).  See *Note export
374          options::.
375
376    `-P'
377          Prune empty directories.  See *Note Moving directories::.
378
379    `-R'
380          Operate recursively (default).  *Note Recursive behavior::.
381
382    `-r TAG'
383          Checkout revision TAG.  See *Note Common options::.
384
385`history [OPTIONS] [FILES...]'
386     Show repository access history.  See *Note history::.
387
388    `-a'
389          All users (default is self).  See *Note history options::.
390
391    `-b STR'
392          Back to record with STR in module/file/repos field.  See
393          *Note history options::.
394
395    `-c'
396          Report on committed (modified) files.  See *Note history
397          options::.
398
399    `-D DATE'
400          Since DATE.  See *Note history options::.
401
402    `-e'
403          Report on all record types.  See *Note history options::.
404
405    `-l'
406          Last modified (committed or modified report).  See *Note
407          history options::.
408
409    `-m MODULE'
410          Report on MODULE (repeatable).  See *Note history options::.
411
412    `-n MODULE'
413          In MODULE.  See *Note history options::.
414
415    `-o'
416          Report on checked out modules.  See *Note history options::.
417
418    `-r REV'
419          Since revision REV.  See *Note history options::.
420
421    `-T'
422          Produce report on all TAGs.  See *Note history options::.
423
424    `-t TAG'
425          Since tag record placed in history file (by anyone).  See
426          *Note history options::.
427
428    `-u USER'
429          For user USER (repeatable).  See *Note history options::.
430
431    `-w'
432          Working directory must match.  See *Note history options::.
433
434    `-x TYPES'
435          Report on TYPES, one or more of `TOEFWUCGMAR'.  See *Note
436          history options::.
437
438    `-z ZONE'
439          Output for time zone ZONE.  See *Note history options::.
440
441`import [OPTIONS] REPOSITORY VENDOR-TAG RELEASE-TAGS...'
442     Import files into CVS, using vendor branches.  See *Note import::.
443
444    `-b BRA'
445          Import to vendor branch BRA.  See *Note Multiple vendor
446          branches::.
447
448    `-d'
449          Use the file's modification time as the time of import.  See
450          *Note import options::.
451
452    `-k KFLAG'
453          Set default keyword substitution mode.  See *Note import
454          options::.
455
456    `-m MSG'
457          Use MSG for log message.  See *Note import options::.
458
459    `-I IGN'
460          More files to ignore (! to reset).  See *Note import
461          options::.
462
463    `-W SPEC'
464          More wrappers.  See *Note import options::.
465
466`init'
467     Create a CVS repository if it doesn't exist.  See *Note Creating a
468     repository::.
469
470`log [OPTIONS] [FILES...]'
471     Print out history information for files.  See *Note log::.
472
473    `-b'
474          Only list revisions on the default branch.  See *Note log
475          options::.
476
477    `-d DATES'
478          Specify dates (D1<D2 for range, D for latest before).  See
479          *Note log options::.
480
481    `-h'
482          Only print header.  See *Note log options::.
483
484    `-l'
485          Local; run only in current working directory.  See *Note
486          Recursive behavior::.
487
488    `-N'
489          Do not list tags.  See *Note log options::.
490
491    `-R'
492          Only print name of RCS file.  See *Note log options::.
493
494    `-rREVS'
495          Only list revisions REVS.  See *Note log options::.
496
497    `-s STATES'
498          Only list revisions with specified states.  See *Note log
499          options::.
500
501    `-t'
502          Only print header and descriptive text.  See *Note log
503          options::.
504
505    `-wLOGINS'
506          Only list revisions checked in by specified logins.  See
507          *Note log options::.
508
509`login'
510     Prompt for password for authenticating server.  See *Note Password
511     authentication client::.
512
513`logout'
514     Remove stored password for authenticating server.  See *Note
515     Password authentication client::.
516
517`rdiff [OPTIONS] MODULES...'
518     Show differences between releases.  See *Note rdiff::.
519
520    `-c'
521          Context diff output format (default).  See *Note rdiff
522          options::.
523
524    `-D DATE'
525          Select revisions based on DATE.  See *Note Common options::.
526
527    `-f'
528          Use head revision if tag/date not found.  See *Note Common
529          options::.
530
531    `-l'
532          Local; run only in current working directory.  See *Note
533          Recursive behavior::.
534
535    `-R'
536          Operate recursively (default).  *Note Recursive behavior::.
537
538    `-r REV'
539          Select revisions based on REV.  See *Note Common options::.
540
541    `-s'
542          Short patch - one liner per file.  See *Note rdiff options::.
543
544    `-t'
545          Top two diffs - last change made to the file.  See *Note diff
546          options::.
547
548    `-u'
549          Unidiff output format.  See *Note rdiff options::.
550
551    `-V VERS'
552          Use RCS Version VERS for keyword expansion (obsolete).  See
553          *Note rdiff options::.
554
555`release [OPTIONS] DIRECTORY'
556     Indicate that a directory is no longer in use.  See *Note
557     release::.
558
559    `-d'
560          Delete the given directory.  See *Note release options::.
561
562`remove [OPTIONS] [FILES...]'
563     Remove an entry from the repository.  See *Note Removing files::.
564
565    `-f'
566          Delete the file before removing it.  See *Note Removing
567          files::.
568
569    `-l'
570          Local; run only in current working directory.  See *Note
571          Recursive behavior::.
572
573    `-R'
574          Operate recursively (default).  *Note Recursive behavior::.
575
576`rtag [OPTIONS] TAG MODULES...'
577     Add a symbolic tag to a module.  See *Note Revisions:: and *Note
578     Branching and merging::.
579
580    `-a'
581          Clear tag from removed files that would not otherwise be
582          tagged.  See *Note Tagging add/remove::.
583
584    `-b'
585          Create a branch named TAG.  See *Note Branching and merging::.
586
587    `-D DATE'
588          Tag revisions as of DATE.  See *Note Tagging by date/tag::.
589
590    `-d'
591          Delete TAG.  See *Note Modifying tags::.
592
593    `-F'
594          Move TAG if it already exists.  See *Note Modifying tags::.
595
596    `-f'
597          Force a head revision match if tag/date not found.  See *Note
598          Tagging by date/tag::.
599
600    `-l'
601          Local; run only in current working directory.  See *Note
602          Recursive behavior::.
603
604    `-n'
605          No execution of tag program.  See *Note Common options::.
606
607    `-R'
608          Operate recursively (default).  *Note Recursive behavior::.
609
610    `-r REV'
611          Tag existing tag REV.  See *Note Tagging by date/tag::.
612
613`status [OPTIONS] FILES...'
614     Display status information in a working directory.  See *Note File
615     status::.
616
617    `-l'
618          Local; run only in current working directory.  See *Note
619          Recursive behavior::.
620
621    `-R'
622          Operate recursively (default).  *Note Recursive behavior::.
623
624    `-v'
625          Include tag information for file.  See *Note Tags::.
626
627`tag [OPTIONS] TAG [FILES...]'
628     Add a symbolic tag to checked out version of files.  See *Note
629     Revisions:: and *Note Branching and merging::.
630
631    `-b'
632          Create a branch named TAG.  See *Note Branching and merging::.
633
634    `-c'
635          Check that working files are unmodified.  See *Note Tagging
636          the working directory::.
637
638    `-D DATE'
639          Tag revisions as of DATE.  See *Note Tagging by date/tag::.
640
641    `-d'
642          Delete TAG.  See *Note Modifying tags::.
643
644    `-F'
645          Move TAG if it already exists.  See *Note Modifying tags::.
646
647    `-f'
648          Force a head revision match if tag/date not found.  See *Note
649          Tagging by date/tag::.
650
651    `-l'
652          Local; run only in current working directory.  See *Note
653          Recursive behavior::.
654
655    `-R'
656          Operate recursively (default).  *Note Recursive behavior::.
657
658    `-r REV'
659          Tag existing tag REV.  See *Note Tagging by date/tag::.
660
661`unedit [OPTIONS] [FILES...]'
662     Undo an edit command.  See *Note Editing files::.
663
664    `-a ACTIONS'
665          Specify actions for temporary watch, where ACTIONS is `edit',
666          `unedit', `commit', `all', or `none'.  See *Note Editing
667          files::.
668
669    `-l'
670          Local; run only in current working directory.  See *Note
671          Recursive behavior::.
672
673    `-R'
674          Operate recursively (default).  *Note Recursive behavior::.
675
676`update [OPTIONS] [FILES...]'
677     Bring work tree in sync with repository.  See *Note update::.
678
679    `-A'
680          Reset any sticky tags/date/options.  See *Note Sticky tags::
681          and *Note Keyword substitution::.
682
683    `-C'
684          Overwrite locally modified files with clean copies from the
685          repository (the modified file is saved in `.#FILE.REVISION',
686          however).
687
688    `-D DATE'
689          Check out revisions as of DATE (is sticky).  See *Note Common
690          options::.
691
692    `-d'
693          Create directories.  See *Note update options::.
694
695    `-f'
696          Use head revision if tag/date not found.  See *Note Common
697          options::.
698
699    `-I IGN'
700          More files to ignore (! to reset).  See *Note import
701          options::.
702
703    `-j REV'
704          Merge in changes.  See *Note update options::.
705
706    `-k KFLAG'
707          Use KFLAG keyword expansion.  See *Note Substitution modes::.
708
709    `-l'
710          Local; run only in current working directory.  *Note
711          Recursive behavior::.
712
713    `-P'
714          Prune empty directories.  See *Note Moving directories::.
715
716    `-p'
717          Check out files to standard output (avoids stickiness).  See
718          *Note update options::.
719
720    `-R'
721          Operate recursively (default).  *Note Recursive behavior::.
722
723    `-r TAG'
724          Checkout revision TAG (is sticky).  See *Note Common
725          options::.
726
727    `-W SPEC'
728          More wrappers.  See *Note import options::.
729
730`version'
731     Display the version of CVS being used.  If the repository is
732     remote, display both the client and server versions.
733
734`watch [on|off|add|remove] [OPTIONS] [FILES...]'
735     on/off: turn on/off read-only checkouts of files.  See *Note
736     Setting a watch::.
737
738     add/remove: add or remove notification on actions.  See *Note
739     Getting Notified::.
740
741    `-a ACTIONS'
742          Specify actions for temporary watch, where ACTIONS is `edit',
743          `unedit', `commit', `all', or `none'.  See *Note Editing
744          files::.
745
746    `-l'
747          Local; run only in current working directory.  See *Note
748          Recursive behavior::.
749
750    `-R'
751          Operate recursively (default).  *Note Recursive behavior::.
752
753`watchers [OPTIONS] [FILES...]'
754     See who is watching a file.  See *Note Watch information::.
755
756    `-l'
757          Local; run only in current working directory.  See *Note
758          Recursive behavior::.
759
760    `-R'
761          Operate recursively (default).  *Note Recursive behavior::.
762
763
764File: cvs.info,  Node: Administrative files,  Next: Environment variables,  Prev: Invoking CVS,  Up: Top
765
766Reference manual for Administrative files
767*****************************************
768
769   Inside the repository, in the directory `$CVSROOT/CVSROOT', there
770are a number of supportive files for CVS.  You can use CVS in a limited
771fashion without any of them, but if they are set up properly they can
772help make life easier.  For a discussion of how to edit them, see *Note
773Intro administrative files::.
774
775   The most important of these files is the `modules' file, which
776defines the modules inside the repository.
777
778* Menu:
779
780* modules::                     Defining modules
781* Wrappers::                    Specify binary-ness based on file name
782* commit files::                The commit support files
783* commitinfo::                  Pre-commit checking
784* verifymsg::                   How are log messages evaluated?
785* editinfo::                    Specifying how log messages are created
786                                (obsolete)
787* loginfo::                     Where should log messages be sent?
788* rcsinfo::                     Templates for the log messages
789* cvsignore::                   Ignoring files via cvsignore
790* checkoutlist::                Adding your own administrative files
791* history file::                History information
792* Variables::                   Various variables are expanded
793* config::                      Miscellaneous CVS configuration
794
795
796File: cvs.info,  Node: modules,  Next: Wrappers,  Up: Administrative files
797
798The modules file
799================
800
801   The `modules' file records your definitions of names for collections
802of source code.  CVS will use these definitions if you use CVS to
803update the modules file (use normal commands like `add', `commit', etc).
804
805   The `modules' file may contain blank lines and comments (lines
806beginning with `#') as well as module definitions.  Long lines can be
807continued on the next line by specifying a backslash (`\') as the last
808character on the line.
809
810   There are three basic types of modules: alias modules, regular
811modules, and ampersand modules.  The difference between them is the way
812that they map files in the repository to files in the working
813directory.  In all of the following examples, the top-level repository
814contains a directory called `first-dir', which contains two files,
815`file1' and `file2', and a directory `sdir'.  `first-dir/sdir' contains
816a file `sfile'.
817
818* Menu:
819
820* Alias modules::             The simplest kind of module
821* Regular modules::
822* Ampersand modules::
823* Excluding directories::     Excluding directories from a module
824* Module options::            Regular and ampersand modules can take options
825* Module program options::    How the modules ``program options'' programs
826                              are run.
827
828
829File: cvs.info,  Node: Alias modules,  Next: Regular modules,  Up: modules
830
831Alias modules
832-------------
833
834   Alias modules are the simplest kind of module:
835
836`MNAME -a ALIASES...'
837     This represents the simplest way of defining a module MNAME.  The
838     `-a' flags the definition as a simple alias: CVS will treat any
839     use of MNAME (as a command argument) as if the list of names
840     ALIASES had been specified instead.  ALIASES may contain either
841     other module names or paths.  When you use paths in aliases,
842     `checkout' creates all intermediate directories in the working
843     directory, just as if the path had been specified explicitly in
844     the CVS arguments.
845
846   For example, if the modules file contains:
847
848     amodule -a first-dir
849
850then the following two commands are equivalent:
851
852     $ cvs co amodule
853     $ cvs co first-dir
854
855and they each would provide output such as:
856
857     cvs checkout: Updating first-dir
858     U first-dir/file1
859     U first-dir/file2
860     cvs checkout: Updating first-dir/sdir
861     U first-dir/sdir/sfile
862
863
864File: cvs.info,  Node: Regular modules,  Next: Ampersand modules,  Prev: Alias modules,  Up: modules
865
866Regular modules
867---------------
868
869`MNAME [ options ] DIR [ FILES... ]'
870     In the simplest case, this form of module definition reduces to
871     `MNAME DIR'.  This defines all the files in directory DIR as
872     module mname.  DIR is a relative path (from `$CVSROOT') to a
873     directory of source in the source repository.  In this case, on
874     checkout, a single directory called MNAME is created as a working
875     directory; no intermediate directory levels are used by default,
876     even if DIR was a path involving several directory levels.
877
878   For example, if a module is defined by:
879
880     regmodule first-dir
881
882then regmodule will contain the files from first-dir:
883
884     $ cvs co regmodule
885     cvs checkout: Updating regmodule
886     U regmodule/file1
887     U regmodule/file2
888     cvs checkout: Updating regmodule/sdir
889     U regmodule/sdir/sfile
890     $
891
892   By explicitly specifying files in the module definition after DIR,
893you can select particular files from directory DIR.  Here is an example:
894
895     regfiles first-dir/sdir sfile
896
897With this definition, getting the regfiles module will create a single
898working directory `regfiles' containing the file listed, which comes
899from a directory deeper in the CVS source repository:
900
901     $ cvs co regfiles
902     U regfiles/sfile
903     $
904
905
906File: cvs.info,  Node: Ampersand modules,  Next: Excluding directories,  Prev: Regular modules,  Up: modules
907
908Ampersand modules
909-----------------
910
911   A module definition can refer to other modules by including
912`&MODULE' in its definition.
913     MNAME [ options ] &MODULE...
914
915   Then getting the module creates a subdirectory for each such module,
916in the directory containing the module.  For example, if modules
917contains
918
919     ampermod &first-dir
920
921   then a checkout will create an `ampermod' directory which contains a
922directory called `first-dir', which in turns contains all the
923directories and files which live there.  For example, the command
924
925     $ cvs co ampermod
926
927will create the following files:
928
929     ampermod/first-dir/file1
930     ampermod/first-dir/file2
931     ampermod/first-dir/sdir/sfile
932
933   There is one quirk/bug: the messages that CVS prints omit the
934`ampermod', and thus do not correctly display the location to which it
935is checking out the files:
936
937     $ cvs co ampermod
938     cvs checkout: Updating first-dir
939     U first-dir/file1
940     U first-dir/file2
941     cvs checkout: Updating first-dir/sdir
942     U first-dir/sdir/sfile
943     $
944
945   Do not rely on this buggy behavior; it may get fixed in a future
946release of CVS.
947
948
949File: cvs.info,  Node: Excluding directories,  Next: Module options,  Prev: Ampersand modules,  Up: modules
950
951Excluding directories
952---------------------
953
954   An alias module may exclude particular directories from other
955modules by using an exclamation mark (`!') before the name of each
956directory to be excluded.
957
958   For example, if the modules file contains:
959
960     exmodule -a !first-dir/sdir first-dir
961
962   then checking out the module `exmodule' will check out everything in
963`first-dir' except any files in the subdirectory `first-dir/sdir'.
964
965
966File: cvs.info,  Node: Module options,  Next: Module program options,  Prev: Excluding directories,  Up: modules
967
968Module options
969--------------
970
971   Either regular modules or ampersand modules can contain options,
972which supply additional information concerning the module.
973
974`-d NAME'
975     Name the working directory something other than the module name.
976
977`-e PROG'
978     Specify a program PROG to run whenever files in a module are
979     exported.  PROG runs with a single argument, the module name.
980
981`-i PROG'
982     Specify a program PROG to run whenever files in a module are
983     committed.  PROG runs with a single argument, the full pathname of
984     the affected directory in a source repository.  The `commitinfo',
985     `loginfo', and `verifymsg' files provide other ways to call a
986     program on commit.
987
988`-o PROG'
989     Specify a program PROG to run whenever files in a module are
990     checked out.  PROG runs with a single argument, the module name.
991
992`-s STATUS'
993     Assign a status to the module.  When the module file is printed
994     with `cvs checkout -s' the modules are sorted according to
995     primarily module status, and secondarily according to the module
996     name.  This option has no other meaning.  You can use this option
997     for several things besides status: for instance, list the person
998     that is responsible for this module.
999
1000`-t PROG'
1001     Specify a program PROG to run whenever files in a module are
1002     tagged with `rtag'.  PROG runs with two arguments: the module name
1003     and the symbolic tag specified to `rtag'.  It is not run when
1004     `tag' is executed.  Generally you will find that taginfo is a
1005     better solution (*note user-defined logging::).
1006
1007`-u PROG'
1008     Specify a program PROG to run whenever `cvs update' is executed
1009     from the top-level directory of the checked-out module.  PROG runs
1010     with a single argument, the full path to the source repository for
1011     this module.
1012
1013   You should also see *note Module program options:: about how the
1014"program options" programs are run.
1015
1016
1017File: cvs.info,  Node: Module program options,  Prev: Module options,  Up: modules
1018
1019How the modules file "program options" programs are run
1020-------------------------------------------------------
1021
1022For checkout, rtag, and export, the program is server-based, and as
1023such the following applies:-
1024
1025   If using remote access methods (pserver, ext, etc.), CVS will
1026execute this program on the server from a temporary directory. The path
1027is searched for this program.
1028
1029   If using "local access" (on a local or remote NFS filesystem, i.e.
1030repository set just to a path), the program will be executed from the
1031newly checked-out tree, if found there, or alternatively searched for
1032in the path if not.
1033
1034The commit and update programs are locally-based, and are run as
1035follows:-
1036
1037   The program is always run locally. One must re-checkout the tree one
1038is using if these options are updated in the modules administrative
1039file. The file CVS/Checkin.prog contains the value of the option `-i'
1040set in the modules file, and similarly for the file CVS/Update.prog and
1041`-u'. The program is always executed from the top level of the
1042checked-out copy on the client. Again, the program is first searched
1043for in the checked-out copy and then using the path.
1044
1045   The programs are all run after the operation has effectively
1046completed.
1047
1048
1049File: cvs.info,  Node: Wrappers,  Next: commit files,  Prev: modules,  Up: Administrative files
1050
1051The cvswrappers file
1052====================
1053
1054   Wrappers refers to a CVS feature which lets you control certain
1055settings based on the name of the file which is being operated on.  The
1056settings are `-k' for binary files, and `-m' for nonmergeable text
1057files.
1058
1059   The `-m' option specifies the merge methodology that should be used
1060when a non-binary file is updated.  `MERGE' means the usual CVS
1061behavior: try to merge the files.  `COPY' means that `cvs update' will
1062refuse to merge files, as it also does for files specified as binary
1063with `-kb' (but if the file is specified as binary, there is no need to
1064specify `-m 'COPY'').  CVS will provide the user with the two versions
1065of the files, and require the user using mechanisms outside CVS, to
1066insert any necessary changes.  *WARNING*: do not use `COPY' with CVS
10671.9 or earlier-such versions of CVS will copy one version of your file
1068over the other, wiping out the previous contents.  The `-m' wrapper
1069option only affects behavior when merging is done on update; it does
1070not affect how files are stored.  See *Note Binary files::, for more on
1071binary files.
1072
1073   The basic format of the file `cvswrappers' is:
1074
1075     wildcard     [option value][option value]...
1076
1077     where option is one of
1078     -m           update methodology      value: MERGE or COPY
1079     -k           keyword expansion       value: expansion mode
1080
1081     and value is a single-quote delimited value.
1082
1083   For example, the following command imports a directory, treating
1084files whose name ends in `.exe' as binary:
1085
1086     cvs import -I ! -W "*.exe -k 'b'" first-dir vendortag reltag
1087
1088
1089File: cvs.info,  Node: commit files,  Next: commitinfo,  Prev: Wrappers,  Up: Administrative files
1090
1091The commit support files
1092========================
1093
1094   The `-i' flag in the `modules' file can be used to run a certain
1095program whenever files are committed (*note modules::).  The files
1096described in this section provide other, more flexible, ways to run
1097programs whenever something is committed.
1098
1099   There are three kind of programs that can be run on commit.  They
1100are specified in files in the repository, as described below.  The
1101following table summarizes the file names and the purpose of the
1102corresponding programs.
1103
1104`commitinfo'
1105     The program is responsible for checking that the commit is
1106     allowed.  If it exits with a non-zero exit status the commit will
1107     be aborted.
1108
1109`verifymsg'
1110     The specified program is used to evaluate the log message, and
1111     possibly verify that it contains all required fields.  This is
1112     most useful in combination with the `rcsinfo' file, which can hold
1113     a log message template (*note rcsinfo::).
1114
1115`editinfo'
1116     The specified program is used to edit the log message, and
1117     possibly verify that it contains all required fields.  This is
1118     most useful in combination with the `rcsinfo' file, which can hold
1119     a log message template (*note rcsinfo::).  (obsolete)
1120
1121`loginfo'
1122     The specified program is called when the commit is complete.  It
1123     receives the log message and some additional information and can
1124     store the log message in a file, or mail it to appropriate
1125     persons, or maybe post it to a local newsgroup, or...  Your
1126     imagination is the limit!
1127
1128* Menu:
1129
1130* syntax::                      The common syntax
1131
1132
1133File: cvs.info,  Node: syntax,  Up: commit files
1134
1135The common syntax
1136-----------------
1137
1138   The administrative files such as `commitinfo', `loginfo', `rcsinfo',
1139`verifymsg', etc., all have a common format.  The purpose of the files
1140are described later on.  The common syntax is described here.
1141
1142   Each line contains the following:
1143   * A regular expression.  This is a basic regular expression in the
1144     syntax used by GNU emacs.
1145
1146   * A whitespace separator--one or more spaces and/or tabs.
1147
1148   * A file name or command-line template.
1149
1150Blank lines are ignored.  Lines that start with the character `#' are
1151treated as comments.  Long lines unfortunately can _not_ be broken in
1152two parts in any way.
1153
1154   The first regular expression that matches the current directory name
1155in the repository is used.  The rest of the line is used as a file name
1156or command-line as appropriate.
1157
1158
1159File: cvs.info,  Node: commitinfo,  Next: verifymsg,  Prev: commit files,  Up: Administrative files
1160
1161Commitinfo
1162==========
1163
1164   The `commitinfo' file defines programs to execute whenever `cvs
1165commit' is about to execute.  These programs are used for pre-commit
1166checking to verify that the modified, added and removed files are really
1167ready to be committed.  This could be used, for instance, to verify
1168that the changed files conform to to your site's standards for coding
1169practice.
1170
1171   As mentioned earlier, each line in the `commitinfo' file consists of
1172a regular expression and a command-line template.  The template can
1173include a program name and any number of arguments you wish to supply
1174to it.  The full path to the current source repository is appended to
1175the template, followed by the file names of any files involved in the
1176commit (added, removed, and modified files).
1177
1178   The first line with a regular expression matching the directory
1179within the repository will be used.  If the command returns a non-zero
1180exit status the commit will be aborted.
1181
1182   If the repository name does not match any of the regular expressions
1183in this file, the `DEFAULT' line is used, if it is specified.
1184
1185   All occurrences of the name `ALL' appearing as a regular expression
1186are used in addition to the first matching regular expression or the
1187name `DEFAULT'.
1188
1189   Note: when CVS is accessing a remote repository, `commitinfo' will
1190be run on the _remote_ (i.e., server) side, not the client side (*note
1191Remote repositories::).
1192
1193
1194File: cvs.info,  Node: verifymsg,  Next: editinfo,  Prev: commitinfo,  Up: Administrative files
1195
1196Verifying log messages
1197======================
1198
1199   Once you have entered a log message, you can evaluate that message
1200to check for specific content, such as a bug ID.  Use the `verifymsg'
1201file to specify a program that is used to verify the log message.  This
1202program could be a simple script that checks that the entered message
1203contains the required fields.
1204
1205   The `verifymsg' file is often most useful together with the
1206`rcsinfo' file, which can be used to specify a log message template.
1207
1208   Each line in the `verifymsg' file consists of a regular expression
1209and a command-line template.  The template must include a program name,
1210and can include any number of arguments.  The full path to the current
1211log message template file is appended to the template.
1212
1213   One thing that should be noted is that the `ALL' keyword is not
1214supported.  If more than one matching line is found, the first one is
1215used.  This can be useful for specifying a default verification script
1216in a directory, and then overriding it in a subdirectory.
1217
1218   If the repository name does not match any of the regular expressions
1219in this file, the `DEFAULT' line is used, if it is specified.
1220
1221   If the verification script exits with a non-zero exit status, the
1222commit is aborted.
1223
1224   Note that the verification script cannot change the log message; it
1225can merely accept it or reject it.
1226
1227   The following is a little silly example of a `verifymsg' file,
1228together with the corresponding `rcsinfo' file, the log message
1229template and an verification  script.  We begin with the log message
1230template.  We want to always record a bug-id number on the first line
1231of the log message.  The rest of log message is free text.  The
1232following template is found in the file `/usr/cvssupport/tc.template'.
1233
1234     BugId:
1235
1236   The script `/usr/cvssupport/bugid.verify' is used to evaluate the
1237log message.
1238
1239     #!/bin/sh
1240     #
1241     #       bugid.verify filename
1242     #
1243     #  Verify that the log message contains a valid bugid
1244     #  on the first line.
1245     #
1246     if head -1 < $1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then
1247         exit 0
1248     else
1249         echo "No BugId found."
1250         exit 1
1251     fi
1252
1253   The `verifymsg' file contains this line:
1254
1255     ^tc     /usr/cvssupport/bugid.verify
1256
1257   The `rcsinfo' file contains this line:
1258
1259     ^tc     /usr/cvssupport/tc.template
1260
1261
1262File: cvs.info,  Node: editinfo,  Next: loginfo,  Prev: verifymsg,  Up: Administrative files
1263
1264Editinfo
1265========
1266
1267   _NOTE:_ The `editinfo' feature has been rendered obsolete.  To set a
1268default editor for log messages use the `EDITOR' environment variable
1269(*note Environment variables::) or the `-e' global option (*note Global
1270options::).  See *Note verifymsg::, for information on the use of the
1271`verifymsg' feature for evaluating log messages.
1272
1273   If you want to make sure that all log messages look the same way,
1274you can use the `editinfo' file to specify a program that is used to
1275edit the log message.  This program could be a custom-made editor that
1276always enforces a certain style of the log message, or maybe a simple
1277shell script that calls an editor, and checks that the entered message
1278contains the required fields.
1279
1280   If no matching line is found in the `editinfo' file, the editor
1281specified in the environment variable `$CVSEDITOR' is used instead.  If
1282that variable is not set, then the environment variable `$EDITOR' is
1283used instead.  If that variable is not set a default will be used.  See
1284*Note Committing your changes::.
1285
1286   The `editinfo' file is often most useful together with the `rcsinfo'
1287file, which can be used to specify a log message template.
1288
1289   Each line in the `editinfo' file consists of a regular expression
1290and a command-line template.  The template must include a program name,
1291and can include any number of arguments.  The full path to the current
1292log message template file is appended to the template.
1293
1294   One thing that should be noted is that the `ALL' keyword is not
1295supported.  If more than one matching line is found, the first one is
1296used.  This can be useful for specifying a default edit script in a
1297module, and then overriding it in a subdirectory.
1298
1299   If the repository name does not match any of the regular expressions
1300in this file, the `DEFAULT' line is used, if it is specified.
1301
1302   If the edit script exits with a non-zero exit status, the commit is
1303aborted.
1304
1305   Note: when CVS is accessing a remote repository, or when the `-m' or
1306`-F' options to `cvs commit' are used, `editinfo' will not be consulted.
1307There is no good workaround for this; use `verifymsg' instead.
1308
1309* Menu:
1310
1311* editinfo example::            Editinfo example
1312
1313
1314File: cvs.info,  Node: editinfo example,  Up: editinfo
1315
1316Editinfo example
1317----------------
1318
1319   The following is a little silly example of a `editinfo' file,
1320together with the corresponding `rcsinfo' file, the log message
1321template and an editor script.  We begin with the log message template.
1322We want to always record a bug-id number on the first line of the log
1323message.  The rest of log message is free text.  The following template
1324is found in the file `/usr/cvssupport/tc.template'.
1325
1326     BugId:
1327
1328   The script `/usr/cvssupport/bugid.edit' is used to edit the log
1329message.
1330
1331     #!/bin/sh
1332     #
1333     #       bugid.edit filename
1334     #
1335     #  Call $EDITOR on FILENAME, and verify that the
1336     #  resulting file contains a valid bugid on the first
1337     #  line.
1338     if [ "x$EDITOR" = "x" ]; then EDITOR=vi; fi
1339     if [ "x$CVSEDITOR" = "x" ]; then CVSEDITOR=$EDITOR; fi
1340     $CVSEDITOR $1
1341     until head -1|grep '^BugId:[ ]*[0-9][0-9]*$' < $1
1342     do  echo -n  "No BugId found.  Edit again? ([y]/n)"
1343         read ans
1344         case ${ans} in
1345             n*) exit 1;;
1346         esac
1347         $CVSEDITOR $1
1348     done
1349
1350   The `editinfo' file contains this line:
1351
1352     ^tc     /usr/cvssupport/bugid.edit
1353
1354   The `rcsinfo' file contains this line:
1355
1356     ^tc     /usr/cvssupport/tc.template
1357
1358
1359File: cvs.info,  Node: loginfo,  Next: rcsinfo,  Prev: editinfo,  Up: Administrative files
1360
1361Loginfo
1362=======
1363
1364   The `loginfo' file is used to control where `cvs commit' log
1365information is sent.  The first entry on a line is a regular expression
1366which is tested against the directory that the change is being made to,
1367relative to the `$CVSROOT'.  If a match is found, then the remainder of
1368the line is a filter program that should expect log information on its
1369standard input.
1370
1371   If the repository name does not match any of the regular expressions
1372in this file, the `DEFAULT' line is used, if it is specified.
1373
1374   All occurrences of the name `ALL' appearing as a regular expression
1375are used in addition to the first matching regular expression or
1376`DEFAULT'.
1377
1378   The first matching regular expression is used.
1379
1380   *Note commit files::, for a description of the syntax of the
1381`loginfo' file.
1382
1383   The user may specify a format string as part of the filter.  The
1384string is composed of a `%' followed by a space, or followed by a single
1385format character, or followed by a set of format characters surrounded
1386by `{' and `}' as separators.  The format characters are:
1387
1388s
1389     file name
1390
1391V
1392     old version number (pre-checkin)
1393
1394v
1395     new version number (post-checkin)
1396
1397   All other characters that appear in a format string expand to an
1398empty field (commas separating fields are still provided).
1399
1400   For example, some valid format strings are `%', `%s', `%{s}', and
1401`%{sVv}'.
1402
1403   The output will be a string of tokens separated by spaces.  For
1404backwards compatibility, the first token will be the repository
1405subdirectory.  The rest of the tokens will be comma-delimited lists of
1406the information requested in the format string.  For example, if
1407`/u/src/master/yoyodyne/tc' is the repository, `%{sVv}' is the format
1408string, and three files (ChangeLog, Makefile, foo.c) were modified, the
1409output might be:
1410
1411     yoyodyne/tc ChangeLog,1.1,1.2 Makefile,1.3,1.4 foo.c,1.12,1.13
1412
1413   As another example, `%{}' means that only the name of the repository
1414will be generated.
1415
1416   Note: when CVS is accessing a remote repository, `loginfo' will be
1417run on the _remote_ (i.e., server) side, not the client side (*note
1418Remote repositories::).
1419
1420* Menu:
1421
1422* loginfo example::             Loginfo example
1423* Keeping a checked out copy::  Updating a tree on every checkin
1424
1425
1426File: cvs.info,  Node: loginfo example,  Next: Keeping a checked out copy,  Up: loginfo
1427
1428Loginfo example
1429---------------
1430
1431   The following `loginfo' file, together with the tiny shell-script
1432below, appends all log messages to the file
1433`$CVSROOT/CVSROOT/commitlog', and any commits to the administrative
1434files (inside the `CVSROOT' directory) are also logged in
1435`/usr/adm/cvsroot-log'.  Commits to the `prog1' directory are mailed to
1436ceder.
1437
1438     ALL             /usr/local/bin/cvs-log $CVSROOT/CVSROOT/commitlog $USER
1439     ^CVSROOT        /usr/local/bin/cvs-log /usr/adm/cvsroot-log
1440     ^prog1          Mail -s %s ceder
1441
1442   The shell-script `/usr/local/bin/cvs-log' looks like this:
1443
1444     #!/bin/sh
1445     (echo "------------------------------------------------------";
1446      echo -n $2"  ";
1447      date;
1448      echo;
1449      cat) >> $1
1450
1451
1452File: cvs.info,  Node: Keeping a checked out copy,  Prev: loginfo example,  Up: loginfo
1453
1454Keeping a checked out copy
1455--------------------------
1456
1457   It is often useful to maintain a directory tree which contains files
1458which correspond to the latest version in the repository.  For example,
1459other developers might want to refer to the latest sources without
1460having to check them out, or you might be maintaining a web site with
1461CVS and want every checkin to cause the files used by the web server to
1462be updated.
1463
1464   The way to do this is by having loginfo invoke `cvs update'.  Doing
1465so in the naive way will cause a problem with locks, so the `cvs update'
1466must be run in the background.  Here is an example for unix (this
1467should all be on one line):
1468
1469     ^cyclic-pages		(date; cat; (sleep 2; cd /u/www/local-docs;
1470      cvs -q update -d) &) >> $CVSROOT/CVSROOT/updatelog 2>&1
1471
1472   This will cause checkins to repository directories starting with
1473`cyclic-pages' to update the checked out tree in `/u/www/local-docs'.
1474
1475
1476File: cvs.info,  Node: rcsinfo,  Next: cvsignore,  Prev: loginfo,  Up: Administrative files
1477
1478Rcsinfo
1479=======
1480
1481   The `rcsinfo' file can be used to specify a form to edit when
1482filling out the commit log.  The `rcsinfo' file has a syntax similar to
1483the `verifymsg', `commitinfo' and `loginfo' files.  *Note syntax::.
1484Unlike the other files the second part is _not_ a command-line
1485template.  Instead, the part after the regular expression should be a
1486full pathname to a file containing the log message template.
1487
1488   If the repository name does not match any of the regular expressions
1489in this file, the `DEFAULT' line is used, if it is specified.
1490
1491   All occurrences of the name `ALL' appearing as a regular expression
1492are used in addition to the first matching regular expression or
1493`DEFAULT'.
1494
1495   The log message template will be used as a default log message.  If
1496you specify a log message with `cvs commit -m MESSAGE' or `cvs commit -f
1497FILE' that log message will override the template.
1498
1499   *Note verifymsg::, for an example `rcsinfo' file.
1500
1501   When CVS is accessing a remote repository, the contents of `rcsinfo'
1502at the time a directory is first checked out will specify a template
1503which does not then change.  If you edit `rcsinfo' or its templates,
1504you may need to check out a new working directory.
1505
1506