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