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