[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.27

1.27    ! xsa         1: .\"    $OpenBSD: cvs.1,v 1.26 2005/01/16 11:10:36 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.
                    333: .Pp
                    334: Aliases:
1.19      xsa       335: .Ic rm ,
                    336: .Ic delete .
1.13      jmc       337: .It Ic rlog
                    338: Print out history information for a module.
                    339: .It Ic rtag
                    340: Add a symbolic link to a module.
                    341: .It Ic server
                    342: Server mode.
1.25      xsa       343: .It Xo Ic status
                    344: .Op Fl lRv
                    345: .Op Ar file ...
                    346: .Xc
                    347: The
                    348: .Ic status
                    349: command is used to display the state of checked out files.
                    350: .Pp
                    351: The
                    352: .Fl l
                    353: flag is used to limit the scope of the search to the local directory
                    354: only and to disable recursive behaviour, which can be requested with the
                    355: .Fl R
                    356: flag.
                    357: The
                    358: .Fl v
                    359: flag causes the symbolic tags for the file to be displayed.
                    360: .Pp
                    361: The following are the different possible states:
                    362: .Bl -tag -width "Unresolved ConflictXX"
                    363: .It Cm Locally Added
                    364: The file has been added with the
                    365: .Ic add
                    366: command, but has not been committed to the repository with the
                    367: .Ic commit
                    368: command.
                    369: .It Cm Locally Modified
                    370: The file is up to date, but has been locally modified since then.
                    371: .It Cm Locally Removed
                    372: The file has been removed with the
                    373: .Ic remove
                    374: command, but has not been committed to the repository with the
                    375: .Ic commit
                    376: command.
                    377: .It Cm Needs Checkout
                    378: The file has not been modified; a new version is available.
                    379: .It Cm Needs Merge
                    380: The file has been modified and a newer version is available.
                    381: A merge is necessary.
                    382: .It Cm Needs Patch
                    383: Same as
                    384: .Ic Needs Checkout
                    385: but, in client-server mode, only the differences are sent to save
                    386: network resources.
                    387: .It Cm Unresolved Conflict
                    388: A merge has been done, but unresolved conflicts still remain.
                    389: .It Cm Up-to-date
                    390: The file is up to date.
                    391: .El
1.13      jmc       392: .Pp
                    393: Aliases:
                    394: .Ic st ,
                    395: .Ic stat .
1.21      jmc       396: .It Xo Ic tag
                    397: .Op Fl bdl
                    398: .Op Fl r Ar old_tag
                    399: .Op Ar symbolic_tag
                    400: .Op Ar file ...
                    401: .Xc
                    402: .Pp
                    403: Add a symbolic tag to a checked out version of
                    404: .Ar file .
                    405: .Pp
                    406: The
                    407: .Fl b
                    408: flag is used to specify a branch tag.
                    409: If the
                    410: .Fl d
                    411: flag is specified the tag will be deleted.
                    412: The
                    413: .Fl l
                    414: flag is used to specify a local change only and disables the recursive
                    415: behaviour.
                    416: If the
                    417: .Fl r
                    418: flag is used,
                    419: .Nm
                    420: will only tag the files with
                    421: .Ar symbolic_tag
                    422: if they are already tagged with
                    423: .Ar old_tag .
                    424: When done, it will remove the old tag
                    425: leaving only the new tag behind on exactly the same files.
1.13      jmc       426: .Pp
                    427: Aliases:
                    428: .Ic ta ,
                    429: .Ic freeze .
                    430: .It Ic unedit
                    431: Undo an
                    432: .Ic edit
                    433: command.
1.11      jmc       434: .It Xo Ic update
1.3       jfb       435: .Op Fl ACdP
1.4       jfb       436: .Op Ar file ...
1.3       jfb       437: .Xc
1.7       jfb       438: .Pp
1.3       jfb       439: The
1.11      jmc       440: .Ic update
1.17      david     441: command is used to merge any of the changes that have occurred on the remote
1.3       jfb       442: repository into the local one where the command was run.
                    443: .Pp
                    444: The
                    445: .Fl A
1.8       jmc       446: flag resets any sticky tags, dates, or kopts that have been set on the tree.
1.3       jfb       447: The
                    448: .Fl l
                    449: flag is used to specify a local change only and disables the recursive
                    450: behaviour.
                    451: The
                    452: .Fl P
                    453: flag causes
                    454: .Nm
                    455: to prune any directories that have become empty as a result of the update.
1.13      jmc       456: .Pp
                    457: Aliases:
                    458: .Ic up ,
                    459: .Ic upd .
1.11      jmc       460: .It Ic version
1.3       jfb       461: Causes
                    462: .Nm
                    463: to print its version information.
1.14      jfb       464: If this command is issued within a local copy of a remote repository or
                    465: if either the
                    466: .Ev CVSROOT
                    467: environment variable or the
                    468: .Fl d
                    469: flag specify a remote repository,
1.3       jfb       470: .Nm
                    471: will also connect to the server and ask it to print its version information.
1.13      jmc       472: .Pp
                    473: Aliases:
                    474: .Ic ve ,
                    475: .Ic ver .
                    476: .It Ic watch
                    477: Set watches.
                    478: .It Ic watchers
                    479: See who is watching a file.
1.1       jfb       480: .El
                    481: .Sh ENVIRONMENT
                    482: .Bl -tag -width CVS_CLIENT_LOG
1.8       jmc       483: .It Ev CVS_CLIENT_LOG
                    484: This variable enables logging of all communications between the client and
                    485: server when running in non-local mode.
                    486: If set, this environment variable must contain a base path from which two
                    487: paths will be generated by appending ".in" to the value for the server's
                    488: input and ".out" for the server's output.
1.1       jfb       489: .It Ev CVS_RSH
                    490: Name of the program to use when connecting to the server through a remote
                    491: shell.
                    492: The default is to use the
                    493: .Xr ssh 1
                    494: program.
                    495: .It Ev CVS_SERVER
                    496: If set, gives the name of the program to invoke as a
                    497: .Nm
                    498: server when using remote shell.
                    499: The default is to use `cvs'.
                    500: .It Ev CVSEDITOR
                    501: Name of the editor to use when editing commit messages.
1.8       jmc       502: Checked before
                    503: .Ev EDITOR
                    504: and
                    505: .Ev VISUAL .
                    506: .It Ev CVSROOT
                    507: When set, this variable should contain the string pointing to the root
                    508: directory of the CVS repository.
                    509: The contents of this variable are ignored when the
                    510: .Fl d
                    511: option is given or if `Root' files exist in the checked-out copy.
1.1       jfb       512: .It Ev EDITOR
1.9       jmc       513: Name of the editor to use when editing commit messages.
                    514: This is traditionally a line-oriented editor,
                    515: such as
                    516: .Xr ex 1 .
1.1       jfb       517: .It Ev VISUAL
1.9       jmc       518: Name of the editor to use when editing commit messages.
                    519: This is traditionally a screen-oriented editor,
                    520: such as
                    521: .Xr vi 1 .
1.8       jmc       522: .El
                    523: .Sh FILES
                    524: .Bl -tag -width Ds
                    525: .It Pa $HOME/.cvsrc
                    526: File containing a list of implicit options to pass to certain commands.
                    527: This file is read on startup unless the
                    528: .Fl f
                    529: option is specified.
                    530: .It Pa $CVSROOT/CVSROOT
                    531: Directory containing repository administrative files.
                    532: .It Pa $CVSROOT/CVSROOT/loginfo
                    533: File containing associations between modules and handlers for
                    534: post-commit logging.
1.1       jfb       535: .El
                    536: .Sh SEE ALSO
                    537: .Xr diff 1 ,
1.15      jmc       538: .Xr gzip 1 ,
1.1       jfb       539: .Xr patch 1 ,
1.8       jmc       540: .Xr rcs 1 ,
1.16      jmc       541: .Xr cvsrc 5 ,
1.1       jfb       542: .Xr cvsd 8
1.8       jmc       543: .Sh HISTORY
                    544: The OpenCVS project is a BSD-licensed rewrite of the original
                    545: Concurrent Versioning System written by Jean-Francois Brousseau.
                    546: The original CVS code was written in large parts by Dick Grune,
                    547: Brian Berliner and Jeff Polk.
                    548: .Sh AUTHORS
                    549: .An Jean-Francois Brousseau
                    550: .An Vincent Labrecque
                    551: .An Joris Vink
1.2       jfb       552: .Sh CAVEATS
                    553: This CVS implementation does not fully conform to the GNU CVS version.
1.3       jfb       554: In some cases, this was done explicitly because GNU CVS has inconsistencies
1.2       jfb       555: or ambiguous behaviour.
1.3       jfb       556: Some things have also been left out or modified to enhance the overall
                    557: security of the system.
                    558: .Pp
                    559: Among other things, support for the pserver connection mechanism has been
                    560: dropped because of security issues with the authentication mechanism.