[BACK]Return to cvs.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / cvs

Annotation of src/usr.bin/cvs/cvs.1, Revision 1.28

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