summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/cvs.1
blob: 0a0709549f1d4a49fa648137f0aba43cc313333e (plain)
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
.\"	$OpenBSD: cvs.1,v 1.27 2005/01/17 22:48:14 xsa Exp $
.\"
.\" Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. The name of the author may not be used to endorse or promote products
.\"    derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
.\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
.\" EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLUDING, BUT NOT LIMITED TO,
.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd May 16, 2004
.Dt CVS 1
.Os
.Sh NAME
.Nm cvs
.Nd OpenCVS Concurrent Versioning System client
.Sh SYNOPSIS
.Nm
.Op Fl flQqtv
.Op Fl d Ar root
.Op Fl e Ar editor
.Xo
.Oo Fl s
.Ar var Ns = Ns Ar val Oc
.Xc
.Op Fl z Ar level
.Ar command Op Ar ...
.Sh DESCRIPTION
The
.Nm
program acts as both client and server for the use of and administration of
a CVS source repository.
CVS is used to maintain version information on files that are kept in a
repository.
Although it is more commonly used to track changes in source code, there
are no real limitations to the type of files that you can store in a
repository.
.Pp
Unless the
.Fl f
option is specified,
.Nm
reads its startup configuration file
.Pa .cvsrc
from the home directory of the user who invoked it.
This file is used to specify implicit options passed to
.Nm
or one of its commands whenever it is invoked.
See
.Xr cvsrc 5
for further information.
.Pp
The following options are supported:
.Bl -tag -width "-e editorXX"
.It Fl d Ar root
Use
.Ar root
as the path to the root directory of the CVS repository.
The value must specify an absolute path.
.It Fl e Ar editor
Use the program
.Ar editor
whenever editing log information.
This option overrides the environment variables CVSEDITOR, VISUAL, and EDITOR.
.It Fl f
Do not read the user's configuration file on startup.
.It Fl l
Suppress logging of history information.
.It Fl Q
Be extra quiet.
Only error messages will be displayed.
.It Fl q
Be quiet about reporting.
.It Fl s Ar var Ns = Ns Ar val
Set the value of the internal variable
.Ar var
to the string
.Ar val .
.It Fl t
Trace program execution.
.It Fl v
Display version information and exit.
.It Fl z Ar level
Specify the compression level to
.Xr gzip 1
when transferring files.
The compression level ranges from 1 to 9,
with 1 being the fastest,
and 9 providing the best level of compression.
The default is 6.
.El
.Sh COMMANDS
The following commands are supported by
.Nm .
.Bl -tag -width "xxxxxxxxxxxx"
.It Xo Ic add Op Fl m Ar msg
.Ar file Op ...
.Xc
.Pp
Before a file is known to CVS, it must be added to the repository using
this command.
Adding a file does not actually publish the contents of the
file, so you must
.Ic commit
the first revision in order to let other users see the file with the
.Ic update
or
.Ic checkout
commands.
.Pp
Although adding a file does not involve a log message, it is possible to
specify one to include with the action, using the
.Fl m
option.
.Pp
Aliases:
.Ic ad ,
.Ic new .
.It Ic admin
Administration front-end for
.Xr rcs 1 .
.Pp
Aliases:
.Ic adm ,
.Ic rcs .
.It Xo Ic annotate
.Op Fl flR
.Oo Fl D Ar date \*(Ba
.Fl r Ar rev Oc
.Op Ar file ...
.Xc
.Pp
For each line of any files specified, show information about its
last revision.
The information given is the last revision when a modification occurred,
the author's name, and the date of the revision.
.Pp
The
.Fl f
flag is used to force the use of the head revision if the specified
tag or date is not found.
This can be used in combination with
.Fl D
or
.Fl r
to ensure that there is some output from the
.Ic annotate
command, even if only to show Revision 1.1 of the file.
The
.Fl l
flag is used to limit the scope of the search to the local directory
only and to disable recursive behaviour, which can be requested with the
.Fl R
flag.
The
.Fl D
flag shows the annotations as of the latest revision no later than
.Ar date .
The
.Fl r
flag shows annotations as of revision
.Ar rev
(can be a revision number or a tag).
.Pp
Aliases:
.Ic ann .
.It Xo Ic checkout
.Op Fl c
.Op Ar module ...
.Xc
.Pp
The
.Ic checkout
command is used to create a local copy of one or more modules present on the
target CVS repository.
.Pp
Aliases:
.Ic co ,
.Ic get .
.It Xo Ic commit
.Op Fl flnR
.Oo Fl F Ar logfile \*(Ba
.Fl m Ar msg Oc
.Op Fl r Ar rev
.Op Ar file ...
.Xc
.Pp
The
.Ic commit
command is used to send local changes back to the server and update the
repository's information to reflect the changes.
.Pp
The
.Fl l
flag is used to limit the scope of the search to the local directory only.
Sometimes one might want to force a file to be committed, even though
it is unchanged: this can be done using the
.Fl f
flag, which also has the effect of disabling recursive behaviour,
which can be requested with the
.Fl R
flag.
When using the
.Fl n
flag, programs listed in the CVSROOT/modules file do not get executed.
The
.Fl m
flag can be used to specify a log message on the command line which
suppresses the editor invocation, or use the
.Fl F
flag to specify a
.Ar file
as argument which contains the log message.
The
.Fl r
flag can be used to commit to a particular symbolic or numerical revision.
.Pp
Aliases:
.Ic ci ,
.Ic com .
.It Xo Ic diff Op Fl cilNpu
.Op Fl D Ar date
.Op Fl r Ar rev
.Op Ar file ...
.Xc
.Pp
The
.Ic diff
command is very similar to the
.Xr diff 1
program, except that the differential comparisons that it generates are
between local or remote revisions of files stored in the CVS repository.
.Pp
Aliases:
.Ic di ,
.Ic dif .
.It Ic edit
Get ready to edit a watched file.
.It Ic editors
See who is editing a watched file.
.It Ic export
Export sources from CVS;
similar to
.Ic checkout .
.Pp
Aliases:
.Ic ex ,
.Ic exp .
.It Ic history
Show repository access history.
.Pp
Aliases:
.Ic hi ,
.Ic his .
.It Xo Ic import
.Op Fl b Ar branch
.Op Fl m Ar msg
.Ar repository
.Ar vendortag
.Ar releasetag
.Xc
.Pp
Import sources into CVS using vendor branches.
.Pp
The
.Fl b
flag specifies the first-level branch number.
The
.Fl m
flag specifies the log message to send.
.Pp
At least three arguments are required:
.Ar repository
specifies the location of the sources to be imported;
.Ar vendortag
is a tag for the entire branch;
.Ar releasetag
is used to identify the files you created with
.Nm
.Ic import .
.Pp
Aliases:
.Ic im ,
.Ic imp .
.It Ic init
Create a CVS repository if it doesn't exist.
.It Ic kserver
Start a Kerberos authentication server.
.It Ic log
Print out history information for files.
.Pp
Aliases:
.Ic lo .
.It Ic login
Prompt for password for authenticating server.
.It Ic logout
Remove entry in .cvspass for remote repository.
.It Ic rdiff
Create
.Xr patch 1
format diffs between releases.
.It Ic release
Indicate that a module is no longer in use.
.It Xo Ic remove
.Op Fl flR
.Op Ar file ...
.Xc
The
.Ic remove
command is used to inform
.Nm
that
.Ar file
is scheduled to be removed from the repository.
Files are not actually removed from the repository until the
.Ic commit
command has been run subsequently.
.Pp
Aliases:
.Ic rm ,
.Ic delete .
.It Ic rlog
Print out history information for a module.
.It Ic rtag
Add a symbolic link to a module.
.It Ic server
Server mode.
.It Xo Ic status
.Op Fl lRv
.Op Ar file ...
.Xc
The
.Ic status
command is used to display the state of checked out files.
.Pp
The
.Fl l
flag is used to limit the scope of the search to the local directory
only and to disable recursive behaviour, which can be requested with the
.Fl R
flag.
The
.Fl v
flag causes the symbolic tags for the file to be displayed.
.Pp
The following are the different possible states:
.Bl -tag -width "Unresolved ConflictXX"
.It Cm Locally Added
The file has been added with the
.Ic add
command, but has not been committed to the repository with the
.Ic commit
command.
.It Cm Locally Modified
The file is up to date, but has been locally modified since then.
.It Cm Locally Removed
The file has been removed with the
.Ic remove
command, but has not been committed to the repository with the
.Ic commit
command.
.It Cm Needs Checkout
The file has not been modified; a new version is available.
.It Cm Needs Merge
The file has been modified and a newer version is available.
A merge is necessary.
.It Cm Needs Patch
Same as
.Ic Needs Checkout
but, in client-server mode, only the differences are sent to save
network resources.
.It Cm Unresolved Conflict
A merge has been done, but unresolved conflicts still remain.
.It Cm Up-to-date
The file is up to date.
.El
.Pp
Aliases:
.Ic st ,
.Ic stat .
.It Xo Ic tag
.Op Fl bdl
.Op Fl r Ar old_tag
.Op Ar symbolic_tag
.Op Ar file ...
.Xc
.Pp
Add a symbolic tag to a checked out version of
.Ar file .
.Pp
The
.Fl b
flag is used to specify a branch tag.
If the
.Fl d
flag is specified the tag will be deleted.
The
.Fl l
flag is used to specify a local change only and disables the recursive
behaviour.
If the
.Fl r
flag is used,
.Nm
will only tag the files with
.Ar symbolic_tag
if they are already tagged with
.Ar old_tag .
When done, it will remove the old tag
leaving only the new tag behind on exactly the same files.
.Pp
Aliases:
.Ic ta ,
.Ic freeze .
.It Ic unedit
Undo an
.Ic edit
command.
.It Xo Ic update
.Op Fl ACdP
.Op Ar file ...
.Xc
.Pp
The
.Ic update
command is used to merge any of the changes that have occurred on the remote
repository into the local one where the command was run.
.Pp
The
.Fl A
flag resets any sticky tags, dates, or kopts that have been set on the tree.
The
.Fl l
flag is used to specify a local change only and disables the recursive
behaviour.
The
.Fl P
flag causes
.Nm
to prune any directories that have become empty as a result of the update.
.Pp
Aliases:
.Ic up ,
.Ic upd .
.It Ic version
Causes
.Nm
to print its version information.
If this command is issued within a local copy of a remote repository or
if either the
.Ev CVSROOT
environment variable or the
.Fl d
flag specify a remote repository,
.Nm
will also connect to the server and ask it to print its version information.
.Pp
Aliases:
.Ic ve ,
.Ic ver .
.It Ic watch
Set watches.
.It Ic watchers
See who is watching a file.
.El
.Sh ENVIRONMENT
.Bl -tag -width CVS_CLIENT_LOG
.It Ev CVS_CLIENT_LOG
This variable enables logging of all communications between the client and
server when running in non-local mode.
If set, this environment variable must contain a base path from which two
paths will be generated by appending ".in" to the value for the server's
input and ".out" for the server's output.
.It Ev CVS_RSH
Name of the program to use when connecting to the server through a remote
shell.
The default is to use the
.Xr ssh 1
program.
.It Ev CVS_SERVER
If set, gives the name of the program to invoke as a
.Nm
server when using remote shell.
The default is to use `cvs'.
.It Ev CVSEDITOR
Name of the editor to use when editing commit messages.
Checked before
.Ev EDITOR
and
.Ev VISUAL .
.It Ev CVSROOT
When set, this variable should contain the string pointing to the root
directory of the CVS repository.
The contents of this variable are ignored when the
.Fl d
option is given or if `Root' files exist in the checked-out copy.
.It Ev EDITOR
Name of the editor to use when editing commit messages.
This is traditionally a line-oriented editor,
such as
.Xr ex 1 .
.It Ev VISUAL
Name of the editor to use when editing commit messages.
This is traditionally a screen-oriented editor,
such as
.Xr vi 1 .
.El
.Sh FILES
.Bl -tag -width Ds
.It Pa $HOME/.cvsrc
File containing a list of implicit options to pass to certain commands.
This file is read on startup unless the
.Fl f
option is specified.
.It Pa $CVSROOT/CVSROOT
Directory containing repository administrative files.
.It Pa $CVSROOT/CVSROOT/loginfo
File containing associations between modules and handlers for
post-commit logging.
.El
.Sh SEE ALSO
.Xr diff 1 ,
.Xr gzip 1 ,
.Xr patch 1 ,
.Xr rcs 1 ,
.Xr cvsrc 5 ,
.Xr cvsd 8
.Sh HISTORY
The OpenCVS project is a BSD-licensed rewrite of the original
Concurrent Versioning System written by Jean-Francois Brousseau.
The original CVS code was written in large parts by Dick Grune,
Brian Berliner and Jeff Polk.
.Sh AUTHORS
.An Jean-Francois Brousseau
.An Vincent Labrecque
.An Joris Vink
.Sh CAVEATS
This CVS implementation does not fully conform to the GNU CVS version.
In some cases, this was done explicitly because GNU CVS has inconsistencies
or ambiguous behaviour.
Some things have also been left out or modified to enhance the overall
security of the system.
.Pp
Among other things, support for the pserver connection mechanism has been
dropped because of security issues with the authentication mechanism.