Annotation of src/usr.bin/cvs/cvs.1, Revision 1.15
1.15 ! jmc 1: .\" $OpenBSD: cvs.1,v 1.14 2004/12/08 00:43:44 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.15 ! jmc 37: .Op Fl z Ar level
1.1 jfb 38: .Ar command Op Ar ...
39: .Sh DESCRIPTION
40: The
41: .Nm
42: program acts as both client and server for the use of and administration of
43: a CVS source repository.
44: CVS is used to maintain version information on files that are kept in a
45: repository.
46: Although it is more commonly used to track changes in source code, there
47: are no real limitations to the type of files that you can store in a
48: repository.
49: .Pp
1.7 jfb 50: Unless the
51: .Fl f
52: option is specified,
53: .Nm
54: reads its startup configuration file
55: .Pa .cvsrc
56: from the home directory of the user who invoked it.
57: This file is used to specify implicit options passed to
58: .Nm
59: or one of its commands whenever it is invoked.
60: Each command should be specified on a separate line along with the arguments.
61: For example, the following two lines:
62: .Pp
63: .Bl -item -compact -offset indent
64: .It
65: cvs -q
66: .It
67: diff -u
68: .El
69: .Pp
70: specify that
71: .Nm
72: should always run in quiet mode and the
1.11 jmc 73: .Ic diff
1.7 jfb 74: command should always produce unified output.
75: .Pp
1.1 jfb 76: The following options are supported:
1.15 ! jmc 77: .Bl -tag -width "-e editorXX"
1.1 jfb 78: .It Fl d Ar root
79: Use
80: .Ar root
81: as the path to the root directory of the CVS repository.
82: The value must specify an absolute path.
83: .It Fl e Ar editor
84: Use the program
85: .Ar editor
86: whenever editing log information.
1.8 jmc 87: This option overrides the environment variables CVSEDITOR, VISUAL, and EDITOR.
1.1 jfb 88: .It Fl f
1.7 jfb 89: Do not read the user's configuration file on startup.
1.1 jfb 90: .It Fl l
91: Suppress logging of history information.
92: .It Fl Q
93: Be extra quiet.
94: Only error messages will be displayed.
95: .It Fl q
96: Be quiet about reporting.
1.15 ! jmc 97: .It Fl t
! 98: Trace program execution.
1.1 jfb 99: .It Fl v
100: Display version information and exit.
1.15 ! jmc 101: .It Fl z Ar level
! 102: Specify the compression level to
! 103: .Xr gzip 1
! 104: when transferring files.
! 105: The compression level ranges from 1 to 9,
! 106: with 1 being the fastest,
! 107: and 9 providing the best level of compression.
! 108: The default is 6.
1.1 jfb 109: .El
110: .Sh COMMANDS
1.3 jfb 111: The following commands are supported by
112: .Nm .
1.7 jfb 113: .Bl -tag -width "xxxxxxxxxxxx"
1.11 jmc 114: .It Xo Ic add Op Fl m Ar msg
1.1 jfb 115: .Ar file Op ...
1.3 jfb 116: .Xc
1.7 jfb 117: .Pp
1.1 jfb 118: Before a file is known to CVS, it must be added to the repository using
119: this command.
120: Adding a file does not actually publish the contents of the
1.7 jfb 121: file, so you must
1.11 jmc 122: .Ic commit
1.7 jfb 123: the first revision in order to let other users see the file with the
1.11 jmc 124: .Ic update
1.4 jfb 125: or
1.11 jmc 126: .Ic checkout
1.4 jfb 127: commands.
1.1 jfb 128: .Pp
1.7 jfb 129: Although adding a file does not involve a log message, it is possible to
130: specify one to include with the action, using the
131: .Fl m
132: option.
1.13 jmc 133: .Pp
134: Aliases:
135: .Ic ad ,
136: .Ic new .
137: .It Ic admin
138: Administration front-end for
139: .Xr rcs 1 .
140: .Pp
141: Aliases:
142: .Ic adm ,
143: .Ic rcs .
144: .It Ic annotate
145: Show last revision where each line was modified.
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 .
212: .It Ic import
213: Import sources into CVS using vendor branches.
214: .Pp
215: Aliases:
216: .Ic im ,
217: .Ic imp .
218: .It Ic init
219: Create a CVS repository if it doesn't exist.
220: .It Ic kserver
221: Start a Kerberos authentication server.
222: .It Ic log
223: Print out history information for files.
224: .Pp
225: Aliases:
226: .Ic lo .
227: .It Ic login
228: Prompt for password for authenticating server.
229: .It Ic logout
230: Remove entry in .cvspass for remote repository.
231: .It Ic rdiff
232: Create
233: .Xr patch 1
234: format diffs between releases.
235: .It Ic release
236: Indicate that a module is no longer in use.
237: .It Ic remove
238: Remove an entry from the repository.
239: .It Ic rlog
240: Print out history information for a module.
241: .It Ic rtag
242: Add a symbolic link to a module.
243: .It Ic server
244: Server mode.
245: .It Ic status
246: Display status information on checked out files.
247: .Pp
248: Aliases:
249: .Ic st ,
250: .Ic stat .
251: .It Ic tag
252: Add a symbolic tag to checked out version of files.
253: .Pp
254: Aliases:
255: .Ic ta ,
256: .Ic freeze .
257: .It Ic unedit
258: Undo an
259: .Ic edit
260: command.
1.11 jmc 261: .It Xo Ic update
1.3 jfb 262: .Op Fl ACdP
1.4 jfb 263: .Op Ar file ...
1.3 jfb 264: .Xc
1.7 jfb 265: .Pp
1.3 jfb 266: The
1.11 jmc 267: .Ic update
1.3 jfb 268: command is used to merge any of the changes that have occured on the remote
269: repository into the local one where the command was run.
270: .Pp
271: The
272: .Fl A
1.8 jmc 273: flag resets any sticky tags, dates, or kopts that have been set on the tree.
1.3 jfb 274: The
275: .Fl l
276: flag is used to specify a local change only and disables the recursive
277: behaviour.
278: The
279: .Fl P
280: flag causes
281: .Nm
282: to prune any directories that have become empty as a result of the update.
1.13 jmc 283: .Pp
284: Aliases:
285: .Ic up ,
286: .Ic upd .
1.11 jmc 287: .It Ic version
1.3 jfb 288: Causes
289: .Nm
290: to print its version information.
1.14 jfb 291: If this command is issued within a local copy of a remote repository or
292: if either the
293: .Ev CVSROOT
294: environment variable or the
295: .Fl d
296: flag specify a remote repository,
1.3 jfb 297: .Nm
298: will also connect to the server and ask it to print its version information.
1.13 jmc 299: .Pp
300: Aliases:
301: .Ic ve ,
302: .Ic ver .
303: .It Ic watch
304: Set watches.
305: .It Ic watchers
306: See who is watching a file.
1.1 jfb 307: .El
308: .Sh ENVIRONMENT
309: .Bl -tag -width CVS_CLIENT_LOG
1.8 jmc 310: .It Ev CVS_CLIENT_LOG
311: This variable enables logging of all communications between the client and
312: server when running in non-local mode.
313: If set, this environment variable must contain a base path from which two
314: paths will be generated by appending ".in" to the value for the server's
315: input and ".out" for the server's output.
1.1 jfb 316: .It Ev CVS_RSH
317: Name of the program to use when connecting to the server through a remote
318: shell.
319: The default is to use the
320: .Xr ssh 1
321: program.
322: .It Ev CVS_SERVER
323: If set, gives the name of the program to invoke as a
324: .Nm
325: server when using remote shell.
326: The default is to use `cvs'.
327: .It Ev CVSEDITOR
328: Name of the editor to use when editing commit messages.
1.8 jmc 329: Checked before
330: .Ev EDITOR
331: and
332: .Ev VISUAL .
333: .It Ev CVSROOT
334: When set, this variable should contain the string pointing to the root
335: directory of the CVS repository.
336: The contents of this variable are ignored when the
337: .Fl d
338: option is given or if `Root' files exist in the checked-out copy.
1.1 jfb 339: .It Ev EDITOR
1.9 jmc 340: Name of the editor to use when editing commit messages.
341: This is traditionally a line-oriented editor,
342: such as
343: .Xr ex 1 .
1.1 jfb 344: .It Ev VISUAL
1.9 jmc 345: Name of the editor to use when editing commit messages.
346: This is traditionally a screen-oriented editor,
347: such as
348: .Xr vi 1 .
1.8 jmc 349: .El
350: .Sh FILES
351: .Bl -tag -width Ds
352: .It Pa $HOME/.cvsrc
353: File containing a list of implicit options to pass to certain commands.
354: This file is read on startup unless the
355: .Fl f
356: option is specified.
357: .It Pa $CVSROOT/CVSROOT
358: Directory containing repository administrative files.
359: .It Pa $CVSROOT/CVSROOT/loginfo
360: File containing associations between modules and handlers for
361: post-commit logging.
1.1 jfb 362: .El
363: .Sh SEE ALSO
364: .Xr diff 1 ,
1.15 ! jmc 365: .Xr gzip 1 ,
1.1 jfb 366: .Xr patch 1 ,
1.8 jmc 367: .Xr rcs 1 ,
1.1 jfb 368: .Xr cvsd 8
1.8 jmc 369: .Sh HISTORY
370: The OpenCVS project is a BSD-licensed rewrite of the original
371: Concurrent Versioning System written by Jean-Francois Brousseau.
372: The original CVS code was written in large parts by Dick Grune,
373: Brian Berliner and Jeff Polk.
374: .Sh AUTHORS
375: .An Jean-Francois Brousseau
376: .An Vincent Labrecque
377: .An Joris Vink
1.2 jfb 378: .Sh CAVEATS
379: This CVS implementation does not fully conform to the GNU CVS version.
1.3 jfb 380: In some cases, this was done explicitly because GNU CVS has inconsistencies
1.2 jfb 381: or ambiguous behaviour.
1.3 jfb 382: Some things have also been left out or modified to enhance the overall
383: security of the system.
384: .Pp
385: Among other things, support for the pserver connection mechanism has been
386: dropped because of security issues with the authentication mechanism.