Annotation of src/usr.bin/cvs/cvs.1, Revision 1.29
1.29 ! xsa 1: .\" $OpenBSD: cvs.1,v 1.28 2005/01/18 15:16:27 xsa Exp $
1.1 jfb 2: .\"
3: .\" Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
4: .\" All rights reserved.
5: .\"
6: .\" Redistribution and use in source and binary forms, with or without
7: .\" modification, are permitted provided that the following conditions
8: .\" are met:
9: .\"
10: .\" 1. Redistributions of source code must retain the above copyright
11: .\" notice, this list of conditions and the following disclaimer.
12: .\" 2. The name of the author may not be used to endorse or promote products
13: .\" derived from this software without specific prior written permission.
14: .\"
15: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
16: .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
17: .\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
18: .\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19: .\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20: .\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21: .\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22: .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23: .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24: .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25: .\"
26: .Dd May 16, 2004
27: .Dt CVS 1
28: .Os
29: .Sh NAME
30: .Nm cvs
1.3 jfb 31: .Nd OpenCVS Concurrent Versioning System client
1.1 jfb 32: .Sh SYNOPSIS
33: .Nm
1.15 jmc 34: .Op Fl flQqtv
1.1 jfb 35: .Op Fl d Ar root
36: .Op Fl e Ar editor
1.20 jmc 37: .Xo
38: .Oo Fl s
39: .Ar var Ns = Ns Ar val Oc
40: .Xc
1.15 jmc 41: .Op Fl z Ar level
1.1 jfb 42: .Ar command Op Ar ...
43: .Sh DESCRIPTION
44: The
45: .Nm
46: program acts as both client and server for the use of and administration of
47: a CVS source repository.
48: CVS is used to maintain version information on files that are kept in a
49: repository.
50: Although it is more commonly used to track changes in source code, there
51: are no real limitations to the type of files that you can store in a
52: repository.
53: .Pp
1.7 jfb 54: Unless the
55: .Fl f
56: option is specified,
57: .Nm
58: reads its startup configuration file
59: .Pa .cvsrc
60: from the home directory of the user who invoked it.
61: This file is used to specify implicit options passed to
62: .Nm
63: or one of its commands whenever it is invoked.
1.16 jmc 64: See
65: .Xr cvsrc 5
66: for further information.
1.7 jfb 67: .Pp
1.1 jfb 68: The following options are supported:
1.15 jmc 69: .Bl -tag -width "-e editorXX"
1.1 jfb 70: .It Fl d Ar root
71: Use
72: .Ar root
73: as the path to the root directory of the CVS repository.
74: The value must specify an absolute path.
75: .It Fl e Ar editor
76: Use the program
77: .Ar editor
78: whenever editing log information.
1.8 jmc 79: This option overrides the environment variables CVSEDITOR, VISUAL, and EDITOR.
1.1 jfb 80: .It Fl f
1.7 jfb 81: Do not read the user's configuration file on startup.
1.1 jfb 82: .It Fl l
83: Suppress logging of history information.
84: .It Fl Q
85: Be extra quiet.
86: Only error messages will be displayed.
87: .It Fl q
88: Be quiet about reporting.
1.20 jmc 89: .It Fl s Ar var Ns = Ns Ar val
90: Set the value of the internal variable
91: .Ar var
92: to the string
93: .Ar val .
1.15 jmc 94: .It Fl t
95: Trace program execution.
1.1 jfb 96: .It Fl v
97: Display version information and exit.
1.15 jmc 98: .It Fl z Ar level
99: Specify the compression level to
100: .Xr gzip 1
101: when transferring files.
102: The compression level ranges from 1 to 9,
103: with 1 being the fastest,
104: and 9 providing the best level of compression.
105: The default is 6.
1.1 jfb 106: .El
107: .Sh COMMANDS
1.3 jfb 108: The following commands are supported by
109: .Nm .
1.7 jfb 110: .Bl -tag -width "xxxxxxxxxxxx"
1.11 jmc 111: .It Xo Ic add Op Fl m Ar msg
1.1 jfb 112: .Ar file Op ...
1.3 jfb 113: .Xc
1.7 jfb 114: .Pp
1.1 jfb 115: Before a file is known to CVS, it must be added to the repository using
116: this command.
117: Adding a file does not actually publish the contents of the
1.7 jfb 118: file, so you must
1.11 jmc 119: .Ic commit
1.7 jfb 120: the first revision in order to let other users see the file with the
1.11 jmc 121: .Ic update
1.4 jfb 122: or
1.11 jmc 123: .Ic checkout
1.4 jfb 124: commands.
1.1 jfb 125: .Pp
1.7 jfb 126: Although adding a file does not involve a log message, it is possible to
127: specify one to include with the action, using the
128: .Fl m
129: option.
1.13 jmc 130: .Pp
131: Aliases:
132: .Ic ad ,
133: .Ic new .
134: .It Ic admin
135: Administration front-end for
136: .Xr rcs 1 .
137: .Pp
138: Aliases:
139: .Ic adm ,
140: .Ic rcs .
1.26 xsa 141: .It Xo Ic annotate
142: .Op Fl flR
143: .Oo Fl D Ar date \*(Ba
144: .Fl r Ar rev Oc
145: .Op Ar file ...
146: .Xc
147: .Pp
1.23 xsa 148: For each line of any files specified, show information about its
149: last revision.
150: The information given is the last revision when a modification occurred,
151: the author's name, and the date of the revision.
1.26 xsa 152: .Pp
153: The
154: .Fl f
155: flag is used to force the use of the head revision if the specified
156: tag or date is not found.
157: This can be used in combination with
158: .Fl D
159: or
160: .Fl r
161: to ensure that there is some output from the
162: .Ic annotate
163: command, even if only to show Revision 1.1 of the file.
164: The
165: .Fl l
166: flag is used to limit the scope of the search to the local directory
167: only and to disable recursive behaviour, which can be requested with the
168: .Fl R
169: flag.
170: The
171: .Fl D
172: flag shows the annotations as of the latest revision no later than
173: .Ar date .
174: The
175: .Fl r
176: flag shows annotations as of revision
177: .Ar rev
178: (can be a revision number or a tag).
1.13 jmc 179: .Pp
180: Aliases:
181: .Ic ann .
1.11 jmc 182: .It Xo Ic checkout
1.7 jfb 183: .Op Fl c
184: .Op Ar module ...
185: .Xc
186: .Pp
187: The
1.11 jmc 188: .Ic checkout
1.7 jfb 189: command is used to create a local copy of one or more modules present on the
190: target CVS repository.
1.13 jmc 191: .Pp
192: Aliases:
193: .Ic co ,
194: .Ic get .
1.11 jmc 195: .It Xo Ic commit
1.3 jfb 196: .Op Fl flnR
1.27 xsa 197: .Oo Fl F Ar logfile \*(Ba
198: .Fl m Ar msg Oc
1.3 jfb 199: .Op Fl r Ar rev
1.4 jfb 200: .Op Ar file ...
1.3 jfb 201: .Xc
1.7 jfb 202: .Pp
1.1 jfb 203: The
1.11 jmc 204: .Ic commit
1.1 jfb 205: command is used to send local changes back to the server and update the
206: repository's information to reflect the changes.
1.27 xsa 207: .Pp
208: The
209: .Fl l
210: flag is used to limit the scope of the search to the local directory only.
211: Sometimes one might want to force a file to be committed, even though
212: it is unchanged: this can be done using the
213: .Fl f
214: flag, which also has the effect of disabling recursive behaviour,
215: which can be requested with the
216: .Fl R
217: flag.
218: When using the
219: .Fl n
220: flag, programs listed in the CVSROOT/modules file do not get executed.
221: The
222: .Fl m
223: flag can be used to specify a log message on the command line which
224: suppresses the editor invocation, or use the
225: .Fl F
226: flag to specify a
227: .Ar file
228: as argument which contains the log message.
229: The
230: .Fl r
231: flag can be used to commit to a particular symbolic or numerical revision.
1.13 jmc 232: .Pp
233: Aliases:
234: .Ic ci ,
235: .Ic com .
1.24 jfb 236: .It Xo Ic diff Op Fl cilNpu
1.3 jfb 237: .Op Fl D Ar date
238: .Op Fl r Ar rev
1.4 jfb 239: .Op Ar file ...
1.3 jfb 240: .Xc
1.7 jfb 241: .Pp
1.3 jfb 242: The
1.11 jmc 243: .Ic diff
1.3 jfb 244: command is very similar to the
245: .Xr diff 1
1.5 jfb 246: program, except that the differential comparisons that it generates are
1.3 jfb 247: between local or remote revisions of files stored in the CVS repository.
1.13 jmc 248: .Pp
249: Aliases:
250: .Ic di ,
251: .Ic dif .
252: .It Ic edit
253: Get ready to edit a watched file.
254: .It Ic editors
255: See who is editing a watched file.
256: .It Ic export
257: Export sources from CVS;
258: similar to
259: .Ic checkout .
260: .Pp
261: Aliases:
262: .Ic ex ,
263: .Ic exp .
264: .It Ic history
265: Show repository access history.
266: .Pp
267: Aliases:
268: .Ic hi ,
269: .Ic his .
1.22 jmc 270: .It Xo Ic import
271: .Op Fl b Ar branch
272: .Op Fl m Ar msg
273: .Ar repository
274: .Ar vendortag
275: .Ar releasetag
276: .Xc
277: .Pp
1.13 jmc 278: Import sources into CVS using vendor branches.
1.22 jmc 279: .Pp
280: The
281: .Fl b
282: flag specifies the first-level branch number.
283: The
284: .Fl m
285: flag specifies the log message to send.
286: .Pp
287: At least three arguments are required:
288: .Ar repository
289: specifies the location of the sources to be imported;
290: .Ar vendortag
291: is a tag for the entire branch;
292: .Ar releasetag
293: is used to identify the files you created with
294: .Nm
295: .Ic import .
1.13 jmc 296: .Pp
297: Aliases:
298: .Ic im ,
299: .Ic imp .
300: .It Ic init
301: Create a CVS repository if it doesn't exist.
302: .It Ic kserver
303: Start a Kerberos authentication server.
304: .It Ic log
305: Print out history information for files.
306: .Pp
307: Aliases:
308: .Ic lo .
309: .It Ic login
310: Prompt for password for authenticating server.
311: .It Ic logout
312: Remove entry in .cvspass for remote repository.
313: .It Ic rdiff
314: Create
315: .Xr patch 1
316: format diffs between releases.
317: .It Ic release
318: Indicate that a module is no longer in use.
1.18 xsa 319: .It Xo Ic remove
320: .Op Fl flR
321: .Op Ar file ...
322: .Xc
323: The
324: .Ic remove
325: command is used to inform
326: .Nm
327: that
328: .Ar file
329: is scheduled to be removed from the repository.
330: Files are not actually removed from the repository until the
331: .Ic commit
332: command has been run subsequently.
1.28 xsa 333: .Pp
334: The
335: .Fl f
336: flag locally removes the file.
337: If this flag is not used, the file must be locally removed beforehand for
338: the command to be valid.
339: The
340: .Fl l
341: flag is used to limit the scope of the search to the local directory
342: only and to disable recursive behaviour, which can be requested with the
343: .Fl R
344: flag.
1.18 xsa 345: .Pp
346: Aliases:
1.19 xsa 347: .Ic rm ,
348: .Ic delete .
1.13 jmc 349: .It Ic rlog
350: Print out history information for a module.
351: .It Ic rtag
352: Add a symbolic link to a module.
353: .It Ic server
354: Server mode.
1.25 xsa 355: .It Xo Ic status
356: .Op Fl lRv
357: .Op Ar file ...
358: .Xc
359: The
360: .Ic status
361: command is used to display the state of checked out files.
362: .Pp
363: The
364: .Fl l
365: flag is used to limit the scope of the search to the local directory
366: only and to disable recursive behaviour, which can be requested with the
367: .Fl R
368: flag.
369: The
370: .Fl v
371: flag causes the symbolic tags for the file to be displayed.
372: .Pp
373: The following are the different possible states:
374: .Bl -tag -width "Unresolved ConflictXX"
375: .It Cm Locally Added
376: The file has been added with the
377: .Ic add
378: command, but has not been committed to the repository with the
379: .Ic commit
380: command.
381: .It Cm Locally Modified
382: The file is up to date, but has been locally modified since then.
383: .It Cm Locally Removed
384: The file has been removed with the
385: .Ic remove
386: command, but has not been committed to the repository with the
387: .Ic commit
388: command.
389: .It Cm Needs Checkout
390: The file has not been modified; a new version is available.
391: .It Cm Needs Merge
392: The file has been modified and a newer version is available.
393: A merge is necessary.
394: .It Cm Needs Patch
395: Same as
396: .Ic Needs Checkout
397: but, in client-server mode, only the differences are sent to save
398: network resources.
399: .It Cm Unresolved Conflict
400: A merge has been done, but unresolved conflicts still remain.
401: .It Cm Up-to-date
402: The file is up to date.
403: .El
1.13 jmc 404: .Pp
405: Aliases:
406: .Ic st ,
407: .Ic stat .
1.21 jmc 408: .It Xo Ic tag
409: .Op Fl bdl
410: .Op Fl r Ar old_tag
411: .Op Ar symbolic_tag
412: .Op Ar file ...
413: .Xc
414: .Pp
415: Add a symbolic tag to a checked out version of
416: .Ar file .
417: .Pp
418: The
419: .Fl b
420: flag is used to specify a branch tag.
421: If the
422: .Fl d
423: flag is specified the tag will be deleted.
424: The
425: .Fl l
426: flag is used to specify a local change only and disables the recursive
427: behaviour.
428: If the
429: .Fl r
430: flag is used,
431: .Nm
432: will only tag the files with
433: .Ar symbolic_tag
434: if they are already tagged with
435: .Ar old_tag .
436: When done, it will remove the old tag
437: leaving only the new tag behind on exactly the same files.
1.13 jmc 438: .Pp
439: Aliases:
440: .Ic ta ,
441: .Ic freeze .
442: .It Ic unedit
443: Undo an
444: .Ic edit
445: command.
1.11 jmc 446: .It Xo Ic update
1.3 jfb 447: .Op Fl ACdP
1.4 jfb 448: .Op Ar file ...
1.3 jfb 449: .Xc
1.7 jfb 450: .Pp
1.3 jfb 451: The
1.11 jmc 452: .Ic update
1.17 david 453: command is used to merge any of the changes that have occurred on the remote
1.3 jfb 454: repository into the local one where the command was run.
455: .Pp
456: The
457: .Fl A
1.8 jmc 458: flag resets any sticky tags, dates, or kopts that have been set on the tree.
1.3 jfb 459: The
460: .Fl l
461: flag is used to specify a local change only and disables the recursive
462: behaviour.
463: The
464: .Fl P
465: flag causes
466: .Nm
467: to prune any directories that have become empty as a result of the update.
1.29 ! xsa 468: .Pp
! 469: For each file updated, a single letter prefix is given to
! 470: specify the state of the file.
! 471: The possible prefixes are as follows:
! 472: .Bl -tag -width "XXX"
! 473: .It \&?
! 474: The file is unknown to
! 475: .Nm .
! 476: .It A
! 477: The file has been added with the
! 478: .Ic add
! 479: command, but has not been committed to the repository with the
! 480: .Ic commit
! 481: command.
! 482: .It C
! 483: A merge, with a more recent version of the file, has been done,
! 484: but unresolved conflicts still remain.
! 485: .It M
! 486: The file has been locally modified; if a more recent version
! 487: is available, the merge has been done without conflict.
! 488: .It P
! 489: The same as
! 490: .Sq U ,
! 491: but, in client-server mode, only differences are sent to save network
! 492: resources.
! 493: .It R
! 494: The file has been removed with the
! 495: .Ic remove
! 496: command, but has not been committed to the repository with the
! 497: .Ic commit
! 498: command.
! 499: .It U
! 500: The file is up to date.
! 501: .El
1.13 jmc 502: .Pp
503: Aliases:
504: .Ic up ,
505: .Ic upd .
1.11 jmc 506: .It Ic version
1.3 jfb 507: Causes
508: .Nm
509: to print its version information.
1.14 jfb 510: If this command is issued within a local copy of a remote repository or
511: if either the
512: .Ev CVSROOT
513: environment variable or the
514: .Fl d
515: flag specify a remote repository,
1.3 jfb 516: .Nm
517: will also connect to the server and ask it to print its version information.
1.13 jmc 518: .Pp
519: Aliases:
520: .Ic ve ,
521: .Ic ver .
522: .It Ic watch
523: Set watches.
524: .It Ic watchers
525: See who is watching a file.
1.1 jfb 526: .El
527: .Sh ENVIRONMENT
528: .Bl -tag -width CVS_CLIENT_LOG
1.8 jmc 529: .It Ev CVS_CLIENT_LOG
530: This variable enables logging of all communications between the client and
531: server when running in non-local mode.
532: If set, this environment variable must contain a base path from which two
533: paths will be generated by appending ".in" to the value for the server's
534: input and ".out" for the server's output.
1.1 jfb 535: .It Ev CVS_RSH
536: Name of the program to use when connecting to the server through a remote
537: shell.
538: The default is to use the
539: .Xr ssh 1
540: program.
541: .It Ev CVS_SERVER
542: If set, gives the name of the program to invoke as a
543: .Nm
544: server when using remote shell.
545: The default is to use `cvs'.
546: .It Ev CVSEDITOR
547: Name of the editor to use when editing commit messages.
1.8 jmc 548: Checked before
549: .Ev EDITOR
550: and
551: .Ev VISUAL .
552: .It Ev CVSROOT
553: When set, this variable should contain the string pointing to the root
554: directory of the CVS repository.
555: The contents of this variable are ignored when the
556: .Fl d
557: option is given or if `Root' files exist in the checked-out copy.
1.1 jfb 558: .It Ev EDITOR
1.9 jmc 559: Name of the editor to use when editing commit messages.
560: This is traditionally a line-oriented editor,
561: such as
562: .Xr ex 1 .
1.1 jfb 563: .It Ev VISUAL
1.9 jmc 564: Name of the editor to use when editing commit messages.
565: This is traditionally a screen-oriented editor,
566: such as
567: .Xr vi 1 .
1.8 jmc 568: .El
569: .Sh FILES
570: .Bl -tag -width Ds
571: .It Pa $HOME/.cvsrc
572: File containing a list of implicit options to pass to certain commands.
573: This file is read on startup unless the
574: .Fl f
575: option is specified.
576: .It Pa $CVSROOT/CVSROOT
577: Directory containing repository administrative files.
578: .It Pa $CVSROOT/CVSROOT/loginfo
579: File containing associations between modules and handlers for
580: post-commit logging.
1.1 jfb 581: .El
582: .Sh SEE ALSO
583: .Xr diff 1 ,
1.15 jmc 584: .Xr gzip 1 ,
1.1 jfb 585: .Xr patch 1 ,
1.8 jmc 586: .Xr rcs 1 ,
1.16 jmc 587: .Xr cvsrc 5 ,
1.1 jfb 588: .Xr cvsd 8
1.8 jmc 589: .Sh HISTORY
590: The OpenCVS project is a BSD-licensed rewrite of the original
591: Concurrent Versioning System written by Jean-Francois Brousseau.
592: The original CVS code was written in large parts by Dick Grune,
593: Brian Berliner and Jeff Polk.
594: .Sh AUTHORS
595: .An Jean-Francois Brousseau
596: .An Vincent Labrecque
597: .An Joris Vink
1.2 jfb 598: .Sh CAVEATS
599: This CVS implementation does not fully conform to the GNU CVS version.
1.3 jfb 600: In some cases, this was done explicitly because GNU CVS has inconsistencies
1.2 jfb 601: or ambiguous behaviour.
1.3 jfb 602: Some things have also been left out or modified to enhance the overall
603: security of the system.
604: .Pp
605: Among other things, support for the pserver connection mechanism has been
606: dropped because of security issues with the authentication mechanism.