Annotation of src/usr.bin/cvs/cvs.1, Revision 1.25
1.25 ! xsa 1: .\" $OpenBSD: cvs.1,v 1.24 2005/01/13 23:39:42 jfb 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 .
141: .It Ic annotate
1.23 xsa 142: For each line of any files specified, show information about its
143: last revision.
144: The information given is the last revision when a modification occurred,
145: the author's name, and the date of the revision.
1.13 jmc 146: .Pp
147: Aliases:
148: .Ic ann .
1.11 jmc 149: .It Xo Ic checkout
1.7 jfb 150: .Op Fl c
151: .Op Ar module ...
152: .Xc
153: .Pp
154: The
1.11 jmc 155: .Ic checkout
1.7 jfb 156: command is used to create a local copy of one or more modules present on the
157: target CVS repository.
1.13 jmc 158: .Pp
159: Aliases:
160: .Ic co ,
161: .Ic get .
1.11 jmc 162: .It Xo Ic commit
1.3 jfb 163: .Op Fl flnR
1.8 jmc 164: .Op Fl F Ar logfile
1.1 jfb 165: .Op Fl m Ar msg
1.3 jfb 166: .Op Fl r Ar rev
1.4 jfb 167: .Op Ar file ...
1.3 jfb 168: .Xc
1.7 jfb 169: .Pp
1.1 jfb 170: The
1.11 jmc 171: .Ic commit
1.1 jfb 172: command is used to send local changes back to the server and update the
173: repository's information to reflect the changes.
1.13 jmc 174: .Pp
175: Aliases:
176: .Ic ci ,
177: .Ic com .
1.24 jfb 178: .It Xo Ic diff Op Fl cilNpu
1.3 jfb 179: .Op Fl D Ar date
180: .Op Fl r Ar rev
1.4 jfb 181: .Op Ar file ...
1.3 jfb 182: .Xc
1.7 jfb 183: .Pp
1.3 jfb 184: The
1.11 jmc 185: .Ic diff
1.3 jfb 186: command is very similar to the
187: .Xr diff 1
1.5 jfb 188: program, except that the differential comparisons that it generates are
1.3 jfb 189: between local or remote revisions of files stored in the CVS repository.
1.13 jmc 190: .Pp
191: Aliases:
192: .Ic di ,
193: .Ic dif .
194: .It Ic edit
195: Get ready to edit a watched file.
196: .It Ic editors
197: See who is editing a watched file.
198: .It Ic export
199: Export sources from CVS;
200: similar to
201: .Ic checkout .
202: .Pp
203: Aliases:
204: .Ic ex ,
205: .Ic exp .
206: .It Ic history
207: Show repository access history.
208: .Pp
209: Aliases:
210: .Ic hi ,
211: .Ic his .
1.22 jmc 212: .It Xo Ic import
213: .Op Fl b Ar branch
214: .Op Fl m Ar msg
215: .Ar repository
216: .Ar vendortag
217: .Ar releasetag
218: .Xc
219: .Pp
1.13 jmc 220: Import sources into CVS using vendor branches.
1.22 jmc 221: .Pp
222: The
223: .Fl b
224: flag specifies the first-level branch number.
225: The
226: .Fl m
227: flag specifies the log message to send.
228: .Pp
229: At least three arguments are required:
230: .Ar repository
231: specifies the location of the sources to be imported;
232: .Ar vendortag
233: is a tag for the entire branch;
234: .Ar releasetag
235: is used to identify the files you created with
236: .Nm
237: .Ic import .
1.13 jmc 238: .Pp
239: Aliases:
240: .Ic im ,
241: .Ic imp .
242: .It Ic init
243: Create a CVS repository if it doesn't exist.
244: .It Ic kserver
245: Start a Kerberos authentication server.
246: .It Ic log
247: Print out history information for files.
248: .Pp
249: Aliases:
250: .Ic lo .
251: .It Ic login
252: Prompt for password for authenticating server.
253: .It Ic logout
254: Remove entry in .cvspass for remote repository.
255: .It Ic rdiff
256: Create
257: .Xr patch 1
258: format diffs between releases.
259: .It Ic release
260: Indicate that a module is no longer in use.
1.18 xsa 261: .It Xo Ic remove
262: .Op Fl flR
263: .Op Ar file ...
264: .Xc
265: The
266: .Ic remove
267: command is used to inform
268: .Nm
269: that
270: .Ar file
271: is scheduled to be removed from the repository.
272: Files are not actually removed from the repository until the
273: .Ic commit
274: command has been run subsequently.
275: .Pp
276: Aliases:
1.19 xsa 277: .Ic rm ,
278: .Ic delete .
1.13 jmc 279: .It Ic rlog
280: Print out history information for a module.
281: .It Ic rtag
282: Add a symbolic link to a module.
283: .It Ic server
284: Server mode.
1.25 ! xsa 285: .It Xo Ic status
! 286: .Op Fl lRv
! 287: .Op Ar file ...
! 288: .Xc
! 289: The
! 290: .Ic status
! 291: command is used to display the state of checked out files.
! 292: .Pp
! 293: The
! 294: .Fl l
! 295: flag is used to limit the scope of the search to the local directory
! 296: only and to disable recursive behaviour, which can be requested with the
! 297: .Fl R
! 298: flag.
! 299: The
! 300: .Fl v
! 301: flag causes the symbolic tags for the file to be displayed.
! 302: .Pp
! 303: The following are the different possible states:
! 304: .Bl -tag -width "Unresolved ConflictXX"
! 305: .It Cm Locally Added
! 306: The file has been added with the
! 307: .Ic add
! 308: command, but has not been committed to the repository with the
! 309: .Ic commit
! 310: command.
! 311: .It Cm Locally Modified
! 312: The file is up to date, but has been locally modified since then.
! 313: .It Cm Locally Removed
! 314: The file has been removed with the
! 315: .Ic remove
! 316: command, but has not been committed to the repository with the
! 317: .Ic commit
! 318: command.
! 319: .It Cm Needs Checkout
! 320: The file has not been modified; a new version is available.
! 321: .It Cm Needs Merge
! 322: The file has been modified and a newer version is available.
! 323: A merge is necessary.
! 324: .It Cm Needs Patch
! 325: Same as
! 326: .Ic Needs Checkout
! 327: but, in client-server mode, only the differences are sent to save
! 328: network resources.
! 329: .It Cm Unresolved Conflict
! 330: A merge has been done, but unresolved conflicts still remain.
! 331: .It Cm Up-to-date
! 332: The file is up to date.
! 333: .El
1.13 jmc 334: .Pp
335: Aliases:
336: .Ic st ,
337: .Ic stat .
1.21 jmc 338: .It Xo Ic tag
339: .Op Fl bdl
340: .Op Fl r Ar old_tag
341: .Op Ar symbolic_tag
342: .Op Ar file ...
343: .Xc
344: .Pp
345: Add a symbolic tag to a checked out version of
346: .Ar file .
347: .Pp
348: The
349: .Fl b
350: flag is used to specify a branch tag.
351: If the
352: .Fl d
353: flag is specified the tag will be deleted.
354: The
355: .Fl l
356: flag is used to specify a local change only and disables the recursive
357: behaviour.
358: If the
359: .Fl r
360: flag is used,
361: .Nm
362: will only tag the files with
363: .Ar symbolic_tag
364: if they are already tagged with
365: .Ar old_tag .
366: When done, it will remove the old tag
367: leaving only the new tag behind on exactly the same files.
1.13 jmc 368: .Pp
369: Aliases:
370: .Ic ta ,
371: .Ic freeze .
372: .It Ic unedit
373: Undo an
374: .Ic edit
375: command.
1.11 jmc 376: .It Xo Ic update
1.3 jfb 377: .Op Fl ACdP
1.4 jfb 378: .Op Ar file ...
1.3 jfb 379: .Xc
1.7 jfb 380: .Pp
1.3 jfb 381: The
1.11 jmc 382: .Ic update
1.17 david 383: command is used to merge any of the changes that have occurred on the remote
1.3 jfb 384: repository into the local one where the command was run.
385: .Pp
386: The
387: .Fl A
1.8 jmc 388: flag resets any sticky tags, dates, or kopts that have been set on the tree.
1.3 jfb 389: The
390: .Fl l
391: flag is used to specify a local change only and disables the recursive
392: behaviour.
393: The
394: .Fl P
395: flag causes
396: .Nm
397: to prune any directories that have become empty as a result of the update.
1.13 jmc 398: .Pp
399: Aliases:
400: .Ic up ,
401: .Ic upd .
1.11 jmc 402: .It Ic version
1.3 jfb 403: Causes
404: .Nm
405: to print its version information.
1.14 jfb 406: If this command is issued within a local copy of a remote repository or
407: if either the
408: .Ev CVSROOT
409: environment variable or the
410: .Fl d
411: flag specify a remote repository,
1.3 jfb 412: .Nm
413: will also connect to the server and ask it to print its version information.
1.13 jmc 414: .Pp
415: Aliases:
416: .Ic ve ,
417: .Ic ver .
418: .It Ic watch
419: Set watches.
420: .It Ic watchers
421: See who is watching a file.
1.1 jfb 422: .El
423: .Sh ENVIRONMENT
424: .Bl -tag -width CVS_CLIENT_LOG
1.8 jmc 425: .It Ev CVS_CLIENT_LOG
426: This variable enables logging of all communications between the client and
427: server when running in non-local mode.
428: If set, this environment variable must contain a base path from which two
429: paths will be generated by appending ".in" to the value for the server's
430: input and ".out" for the server's output.
1.1 jfb 431: .It Ev CVS_RSH
432: Name of the program to use when connecting to the server through a remote
433: shell.
434: The default is to use the
435: .Xr ssh 1
436: program.
437: .It Ev CVS_SERVER
438: If set, gives the name of the program to invoke as a
439: .Nm
440: server when using remote shell.
441: The default is to use `cvs'.
442: .It Ev CVSEDITOR
443: Name of the editor to use when editing commit messages.
1.8 jmc 444: Checked before
445: .Ev EDITOR
446: and
447: .Ev VISUAL .
448: .It Ev CVSROOT
449: When set, this variable should contain the string pointing to the root
450: directory of the CVS repository.
451: The contents of this variable are ignored when the
452: .Fl d
453: option is given or if `Root' files exist in the checked-out copy.
1.1 jfb 454: .It Ev EDITOR
1.9 jmc 455: Name of the editor to use when editing commit messages.
456: This is traditionally a line-oriented editor,
457: such as
458: .Xr ex 1 .
1.1 jfb 459: .It Ev VISUAL
1.9 jmc 460: Name of the editor to use when editing commit messages.
461: This is traditionally a screen-oriented editor,
462: such as
463: .Xr vi 1 .
1.8 jmc 464: .El
465: .Sh FILES
466: .Bl -tag -width Ds
467: .It Pa $HOME/.cvsrc
468: File containing a list of implicit options to pass to certain commands.
469: This file is read on startup unless the
470: .Fl f
471: option is specified.
472: .It Pa $CVSROOT/CVSROOT
473: Directory containing repository administrative files.
474: .It Pa $CVSROOT/CVSROOT/loginfo
475: File containing associations between modules and handlers for
476: post-commit logging.
1.1 jfb 477: .El
478: .Sh SEE ALSO
479: .Xr diff 1 ,
1.15 jmc 480: .Xr gzip 1 ,
1.1 jfb 481: .Xr patch 1 ,
1.8 jmc 482: .Xr rcs 1 ,
1.16 jmc 483: .Xr cvsrc 5 ,
1.1 jfb 484: .Xr cvsd 8
1.8 jmc 485: .Sh HISTORY
486: The OpenCVS project is a BSD-licensed rewrite of the original
487: Concurrent Versioning System written by Jean-Francois Brousseau.
488: The original CVS code was written in large parts by Dick Grune,
489: Brian Berliner and Jeff Polk.
490: .Sh AUTHORS
491: .An Jean-Francois Brousseau
492: .An Vincent Labrecque
493: .An Joris Vink
1.2 jfb 494: .Sh CAVEATS
495: This CVS implementation does not fully conform to the GNU CVS version.
1.3 jfb 496: In some cases, this was done explicitly because GNU CVS has inconsistencies
1.2 jfb 497: or ambiguous behaviour.
1.3 jfb 498: Some things have also been left out or modified to enhance the overall
499: security of the system.
500: .Pp
501: Among other things, support for the pserver connection mechanism has been
502: dropped because of security issues with the authentication mechanism.