Annotation of src/usr.bin/cvs/cvs.1, Revision 1.23
1.23 ! xsa 1: .\" $OpenBSD: cvs.1,v 1.22 2005/01/07 18:45:13 jmc 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.11 jmc 178: .It Xo Ic diff Op Fl cilu
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.
285: .It Ic status
286: Display status information on checked out files.
287: .Pp
288: Aliases:
289: .Ic st ,
290: .Ic stat .
1.21 jmc 291: .It Xo Ic tag
292: .Op Fl bdl
293: .Op Fl r Ar old_tag
294: .Op Ar symbolic_tag
295: .Op Ar file ...
296: .Xc
297: .Pp
298: Add a symbolic tag to a checked out version of
299: .Ar file .
300: .Pp
301: The
302: .Fl b
303: flag is used to specify a branch tag.
304: If the
305: .Fl d
306: flag is specified the tag will be deleted.
307: The
308: .Fl l
309: flag is used to specify a local change only and disables the recursive
310: behaviour.
311: If the
312: .Fl r
313: flag is used,
314: .Nm
315: will only tag the files with
316: .Ar symbolic_tag
317: if they are already tagged with
318: .Ar old_tag .
319: When done, it will remove the old tag
320: leaving only the new tag behind on exactly the same files.
1.13 jmc 321: .Pp
322: Aliases:
323: .Ic ta ,
324: .Ic freeze .
325: .It Ic unedit
326: Undo an
327: .Ic edit
328: command.
1.11 jmc 329: .It Xo Ic update
1.3 jfb 330: .Op Fl ACdP
1.4 jfb 331: .Op Ar file ...
1.3 jfb 332: .Xc
1.7 jfb 333: .Pp
1.3 jfb 334: The
1.11 jmc 335: .Ic update
1.17 david 336: command is used to merge any of the changes that have occurred on the remote
1.3 jfb 337: repository into the local one where the command was run.
338: .Pp
339: The
340: .Fl A
1.8 jmc 341: flag resets any sticky tags, dates, or kopts that have been set on the tree.
1.3 jfb 342: The
343: .Fl l
344: flag is used to specify a local change only and disables the recursive
345: behaviour.
346: The
347: .Fl P
348: flag causes
349: .Nm
350: to prune any directories that have become empty as a result of the update.
1.13 jmc 351: .Pp
352: Aliases:
353: .Ic up ,
354: .Ic upd .
1.11 jmc 355: .It Ic version
1.3 jfb 356: Causes
357: .Nm
358: to print its version information.
1.14 jfb 359: If this command is issued within a local copy of a remote repository or
360: if either the
361: .Ev CVSROOT
362: environment variable or the
363: .Fl d
364: flag specify a remote repository,
1.3 jfb 365: .Nm
366: will also connect to the server and ask it to print its version information.
1.13 jmc 367: .Pp
368: Aliases:
369: .Ic ve ,
370: .Ic ver .
371: .It Ic watch
372: Set watches.
373: .It Ic watchers
374: See who is watching a file.
1.1 jfb 375: .El
376: .Sh ENVIRONMENT
377: .Bl -tag -width CVS_CLIENT_LOG
1.8 jmc 378: .It Ev CVS_CLIENT_LOG
379: This variable enables logging of all communications between the client and
380: server when running in non-local mode.
381: If set, this environment variable must contain a base path from which two
382: paths will be generated by appending ".in" to the value for the server's
383: input and ".out" for the server's output.
1.1 jfb 384: .It Ev CVS_RSH
385: Name of the program to use when connecting to the server through a remote
386: shell.
387: The default is to use the
388: .Xr ssh 1
389: program.
390: .It Ev CVS_SERVER
391: If set, gives the name of the program to invoke as a
392: .Nm
393: server when using remote shell.
394: The default is to use `cvs'.
395: .It Ev CVSEDITOR
396: Name of the editor to use when editing commit messages.
1.8 jmc 397: Checked before
398: .Ev EDITOR
399: and
400: .Ev VISUAL .
401: .It Ev CVSROOT
402: When set, this variable should contain the string pointing to the root
403: directory of the CVS repository.
404: The contents of this variable are ignored when the
405: .Fl d
406: option is given or if `Root' files exist in the checked-out copy.
1.1 jfb 407: .It Ev EDITOR
1.9 jmc 408: Name of the editor to use when editing commit messages.
409: This is traditionally a line-oriented editor,
410: such as
411: .Xr ex 1 .
1.1 jfb 412: .It Ev VISUAL
1.9 jmc 413: Name of the editor to use when editing commit messages.
414: This is traditionally a screen-oriented editor,
415: such as
416: .Xr vi 1 .
1.8 jmc 417: .El
418: .Sh FILES
419: .Bl -tag -width Ds
420: .It Pa $HOME/.cvsrc
421: File containing a list of implicit options to pass to certain commands.
422: This file is read on startup unless the
423: .Fl f
424: option is specified.
425: .It Pa $CVSROOT/CVSROOT
426: Directory containing repository administrative files.
427: .It Pa $CVSROOT/CVSROOT/loginfo
428: File containing associations between modules and handlers for
429: post-commit logging.
1.1 jfb 430: .El
431: .Sh SEE ALSO
432: .Xr diff 1 ,
1.15 jmc 433: .Xr gzip 1 ,
1.1 jfb 434: .Xr patch 1 ,
1.8 jmc 435: .Xr rcs 1 ,
1.16 jmc 436: .Xr cvsrc 5 ,
1.1 jfb 437: .Xr cvsd 8
1.8 jmc 438: .Sh HISTORY
439: The OpenCVS project is a BSD-licensed rewrite of the original
440: Concurrent Versioning System written by Jean-Francois Brousseau.
441: The original CVS code was written in large parts by Dick Grune,
442: Brian Berliner and Jeff Polk.
443: .Sh AUTHORS
444: .An Jean-Francois Brousseau
445: .An Vincent Labrecque
446: .An Joris Vink
1.2 jfb 447: .Sh CAVEATS
448: This CVS implementation does not fully conform to the GNU CVS version.
1.3 jfb 449: In some cases, this was done explicitly because GNU CVS has inconsistencies
1.2 jfb 450: or ambiguous behaviour.
1.3 jfb 451: Some things have also been left out or modified to enhance the overall
452: security of the system.
453: .Pp
454: Among other things, support for the pserver connection mechanism has been
455: dropped because of security issues with the authentication mechanism.