Annotation of src/usr.bin/cvs/cvs.1, Revision 1.20
1.20 ! jmc 1: .\" $OpenBSD: cvs.1,v 1.19 2004/12/22 21:41:10 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 .
141: .It Ic annotate
142: Show last revision where each line was modified.
143: .Pp
144: Aliases:
145: .Ic ann .
1.11 jmc 146: .It Xo Ic checkout
1.7 jfb 147: .Op Fl c
148: .Op Ar module ...
149: .Xc
150: .Pp
151: The
1.11 jmc 152: .Ic checkout
1.7 jfb 153: command is used to create a local copy of one or more modules present on the
154: target CVS repository.
1.13 jmc 155: .Pp
156: Aliases:
157: .Ic co ,
158: .Ic get .
1.11 jmc 159: .It Xo Ic commit
1.3 jfb 160: .Op Fl flnR
1.8 jmc 161: .Op Fl F Ar logfile
1.1 jfb 162: .Op Fl m Ar msg
1.3 jfb 163: .Op Fl r Ar rev
1.4 jfb 164: .Op Ar file ...
1.3 jfb 165: .Xc
1.7 jfb 166: .Pp
1.1 jfb 167: The
1.11 jmc 168: .Ic commit
1.1 jfb 169: command is used to send local changes back to the server and update the
170: repository's information to reflect the changes.
1.13 jmc 171: .Pp
172: Aliases:
173: .Ic ci ,
174: .Ic com .
1.11 jmc 175: .It Xo Ic diff Op Fl cilu
1.3 jfb 176: .Op Fl D Ar date
177: .Op Fl r Ar rev
1.4 jfb 178: .Op Ar file ...
1.3 jfb 179: .Xc
1.7 jfb 180: .Pp
1.3 jfb 181: The
1.11 jmc 182: .Ic diff
1.3 jfb 183: command is very similar to the
184: .Xr diff 1
1.5 jfb 185: program, except that the differential comparisons that it generates are
1.3 jfb 186: between local or remote revisions of files stored in the CVS repository.
1.13 jmc 187: .Pp
188: Aliases:
189: .Ic di ,
190: .Ic dif .
191: .It Ic edit
192: Get ready to edit a watched file.
193: .It Ic editors
194: See who is editing a watched file.
195: .It Ic export
196: Export sources from CVS;
197: similar to
198: .Ic checkout .
199: .Pp
200: Aliases:
201: .Ic ex ,
202: .Ic exp .
203: .It Ic history
204: Show repository access history.
205: .Pp
206: Aliases:
207: .Ic hi ,
208: .Ic his .
209: .It Ic import
210: Import sources into CVS using vendor branches.
211: .Pp
212: Aliases:
213: .Ic im ,
214: .Ic imp .
215: .It Ic init
216: Create a CVS repository if it doesn't exist.
217: .It Ic kserver
218: Start a Kerberos authentication server.
219: .It Ic log
220: Print out history information for files.
221: .Pp
222: Aliases:
223: .Ic lo .
224: .It Ic login
225: Prompt for password for authenticating server.
226: .It Ic logout
227: Remove entry in .cvspass for remote repository.
228: .It Ic rdiff
229: Create
230: .Xr patch 1
231: format diffs between releases.
232: .It Ic release
233: Indicate that a module is no longer in use.
1.18 xsa 234: .It Xo Ic remove
235: .Op Fl flR
236: .Op Ar file ...
237: .Xc
238: The
239: .Ic remove
240: command is used to inform
241: .Nm
242: that
243: .Ar file
244: is scheduled to be removed from the repository.
245: Files are not actually removed from the repository until the
246: .Ic commit
247: command has been run subsequently.
248: .Pp
249: Aliases:
1.19 xsa 250: .Ic rm ,
251: .Ic delete .
1.13 jmc 252: .It Ic rlog
253: Print out history information for a module.
254: .It Ic rtag
255: Add a symbolic link to a module.
256: .It Ic server
257: Server mode.
258: .It Ic status
259: Display status information on checked out files.
260: .Pp
261: Aliases:
262: .Ic st ,
263: .Ic stat .
264: .It Ic tag
265: Add a symbolic tag to checked out version of files.
266: .Pp
267: Aliases:
268: .Ic ta ,
269: .Ic freeze .
270: .It Ic unedit
271: Undo an
272: .Ic edit
273: command.
1.11 jmc 274: .It Xo Ic update
1.3 jfb 275: .Op Fl ACdP
1.4 jfb 276: .Op Ar file ...
1.3 jfb 277: .Xc
1.7 jfb 278: .Pp
1.3 jfb 279: The
1.11 jmc 280: .Ic update
1.17 david 281: command is used to merge any of the changes that have occurred on the remote
1.3 jfb 282: repository into the local one where the command was run.
283: .Pp
284: The
285: .Fl A
1.8 jmc 286: flag resets any sticky tags, dates, or kopts that have been set on the tree.
1.3 jfb 287: The
288: .Fl l
289: flag is used to specify a local change only and disables the recursive
290: behaviour.
291: The
292: .Fl P
293: flag causes
294: .Nm
295: to prune any directories that have become empty as a result of the update.
1.13 jmc 296: .Pp
297: Aliases:
298: .Ic up ,
299: .Ic upd .
1.11 jmc 300: .It Ic version
1.3 jfb 301: Causes
302: .Nm
303: to print its version information.
1.14 jfb 304: If this command is issued within a local copy of a remote repository or
305: if either the
306: .Ev CVSROOT
307: environment variable or the
308: .Fl d
309: flag specify a remote repository,
1.3 jfb 310: .Nm
311: will also connect to the server and ask it to print its version information.
1.13 jmc 312: .Pp
313: Aliases:
314: .Ic ve ,
315: .Ic ver .
316: .It Ic watch
317: Set watches.
318: .It Ic watchers
319: See who is watching a file.
1.1 jfb 320: .El
321: .Sh ENVIRONMENT
322: .Bl -tag -width CVS_CLIENT_LOG
1.8 jmc 323: .It Ev CVS_CLIENT_LOG
324: This variable enables logging of all communications between the client and
325: server when running in non-local mode.
326: If set, this environment variable must contain a base path from which two
327: paths will be generated by appending ".in" to the value for the server's
328: input and ".out" for the server's output.
1.1 jfb 329: .It Ev CVS_RSH
330: Name of the program to use when connecting to the server through a remote
331: shell.
332: The default is to use the
333: .Xr ssh 1
334: program.
335: .It Ev CVS_SERVER
336: If set, gives the name of the program to invoke as a
337: .Nm
338: server when using remote shell.
339: The default is to use `cvs'.
340: .It Ev CVSEDITOR
341: Name of the editor to use when editing commit messages.
1.8 jmc 342: Checked before
343: .Ev EDITOR
344: and
345: .Ev VISUAL .
346: .It Ev CVSROOT
347: When set, this variable should contain the string pointing to the root
348: directory of the CVS repository.
349: The contents of this variable are ignored when the
350: .Fl d
351: option is given or if `Root' files exist in the checked-out copy.
1.1 jfb 352: .It Ev EDITOR
1.9 jmc 353: Name of the editor to use when editing commit messages.
354: This is traditionally a line-oriented editor,
355: such as
356: .Xr ex 1 .
1.1 jfb 357: .It Ev VISUAL
1.9 jmc 358: Name of the editor to use when editing commit messages.
359: This is traditionally a screen-oriented editor,
360: such as
361: .Xr vi 1 .
1.8 jmc 362: .El
363: .Sh FILES
364: .Bl -tag -width Ds
365: .It Pa $HOME/.cvsrc
366: File containing a list of implicit options to pass to certain commands.
367: This file is read on startup unless the
368: .Fl f
369: option is specified.
370: .It Pa $CVSROOT/CVSROOT
371: Directory containing repository administrative files.
372: .It Pa $CVSROOT/CVSROOT/loginfo
373: File containing associations between modules and handlers for
374: post-commit logging.
1.1 jfb 375: .El
376: .Sh SEE ALSO
377: .Xr diff 1 ,
1.15 jmc 378: .Xr gzip 1 ,
1.1 jfb 379: .Xr patch 1 ,
1.8 jmc 380: .Xr rcs 1 ,
1.16 jmc 381: .Xr cvsrc 5 ,
1.1 jfb 382: .Xr cvsd 8
1.8 jmc 383: .Sh HISTORY
384: The OpenCVS project is a BSD-licensed rewrite of the original
385: Concurrent Versioning System written by Jean-Francois Brousseau.
386: The original CVS code was written in large parts by Dick Grune,
387: Brian Berliner and Jeff Polk.
388: .Sh AUTHORS
389: .An Jean-Francois Brousseau
390: .An Vincent Labrecque
391: .An Joris Vink
1.2 jfb 392: .Sh CAVEATS
393: This CVS implementation does not fully conform to the GNU CVS version.
1.3 jfb 394: In some cases, this was done explicitly because GNU CVS has inconsistencies
1.2 jfb 395: or ambiguous behaviour.
1.3 jfb 396: Some things have also been left out or modified to enhance the overall
397: security of the system.
398: .Pp
399: Among other things, support for the pserver connection mechanism has been
400: dropped because of security issues with the authentication mechanism.