This is cvs.info, produced by makeinfo version 4.0 from cvs.texinfo. START-INFO-DIR-ENTRY * CVS: (cvs). Concurrent Versions System END-INFO-DIR-ENTRY Copyright (C) 1992, 1993 Signum Support AB Copyright (C) 1993, 1994 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided also that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.  File: cvs.info, Node: Invoking CVS, Next: Administrative files, Prev: CVS commands, Up: Top Quick reference to CVS commands ******************************* This appendix describes how to invoke CVS, with references to where each command or feature is described in detail. For other references run the `cvs --help' command, or see *Note Index::. A CVS command looks like: cvs [ GLOBAL_OPTIONS ] COMMAND [ COMMAND_OPTIONS ] [ COMMAND_ARGS ] Global options: `--allow-root=ROOTDIR' Specify legal CVSROOT directory (server only) (not in CVS 1.9 and older). See *Note Password authentication server::. `-a' Authenticate all communication (client only) (not in CVS 1.9 and older). See *Note Global options::. `-b' Specify RCS location (CVS 1.9 and older). See *Note Global options::. `-d ROOT' Specify the CVSROOT. See *Note Repository::. `-e EDITOR' Edit messages with EDITOR. See *Note Committing your changes::. `-f' Do not read the `~/.cvsrc' file. See *Note Global options::. `-H' `--help' Print a help message. See *Note Global options::. `-l' Do not log in `$CVSROOT/CVSROOT/history' file. See *Note Global options::. `-n' Do not change any files. See *Note Global options::. `-Q' Be really quiet. See *Note Global options::. `-q' Be somewhat quiet. See *Note Global options::. `-r' Make new working files read-only. See *Note Global options::. `-s VARIABLE=VALUE' Set a user variable. See *Note Variables::. `-T TEMPDIR' Put temporary files in TEMPDIR. See *Note Global options::. `-t' Trace CVS execution. See *Note Global options::. `-v' `--version' Display version and copyright information for CVS. `-w' Make new working files read-write. See *Note Global options::. `-x' Encrypt all communication (client only). See *Note Global options::. `-z GZIP-LEVEL' Set the compression level (client only). See *Note Global options::. Keyword expansion modes (*note Substitution modes::): -kkv $Id: cvs.info-7,v 1.3 2001/09/30 19:44:54 tholo Exp $ -kkvl $Id: cvs.info-7,v 1.3 2001/09/30 19:44:54 tholo Exp $ -kk $Id: cvs.info-7,v 1.3 2001/09/30 19:44:54 tholo Exp $ -kv file1,v 1.1 1993/12/09 03:21:13 joe Exp -ko no expansion -kb no expansion, file is binary Keywords (*note Keyword list::): $Author: tholo $ $Date: 2001/09/30 19:44:54 $ $Header: /cvs/OpenBSD/src/gnu/usr.bin/cvs/doc/cvs.info-7,v 1.3 2001/09/30 19:44:54 tholo Exp $ $Id: cvs.info-7,v 1.3 2001/09/30 19:44:54 tholo Exp $ $Locker: $ $Name: $ $RCSfile: cvs.info-7,v $ $Revision: 1.3 $ $Source: /cvs/OpenBSD/src/gnu/usr.bin/cvs/doc/cvs.info-7,v $ $State: Exp $ $Log: cvs.info-7,v $ Revision 1.3 2001/09/30 19:44:54 tholo Revert to distributed version Revision 1.1.1.13 2001/09/28 22:48:51 tholo Latest from Cyclic Software Revision 1.1 1993/12/09 03:30:17 joe Initial revision Commands, command options, and command arguments: `add [OPTIONS] [FILES...]' Add a new file/directory. See *Note Adding files::. `-k KFLAG' Set keyword expansion. `-m MSG' Set file description. `admin [OPTIONS] [FILES...]' Administration of history files in the repository. See *Note admin::. `-b[REV]' Set default branch. See *Note Reverting local changes::. `-cSTRING' Set comment leader. `-kSUBST' Set keyword substitution. See *Note Keyword substitution::. `-l[REV]' Lock revision REV, or latest revision. `-mREV:MSG' Replace the log message of revision REV with MSG. `-oRANGE' Delete revisions from the repository. See *Note admin options::. `-q' Run quietly; do not print diagnostics. `-sSTATE[:REV]' Set the state. `-t' Set file description from standard input. `-tFILE' Set file description from FILE. `-t-STRING' Set file description to STRING. `-u[REV]' Unlock revision REV, or latest revision. `annotate [OPTIONS] [FILES...]' Show last revision where each line was modified. See *Note annotate::. `-D DATE' Annotate the most recent revision no later than DATE. See *Note Common options::. `-f' Use head revision if tag/date not found. See *Note Common options::. `-l' Local; run only in current working directory. *Note Recursive behavior::. `-R' Operate recursively (default). *Note Recursive behavior::. `-r TAG' Annotate revision TAG. See *Note Common options::. `checkout [OPTIONS] MODULES...' Get a copy of the sources. See *Note checkout::. `-A' Reset any sticky tags/date/options. See *Note Sticky tags:: and *Note Keyword substitution::. `-c' Output the module database. See *Note checkout options::. `-D DATE' Check out revisions as of DATE (is sticky). See *Note Common options::. `-d DIR' Check out into DIR. See *Note checkout options::. `-f' Use head revision if tag/date not found. See *Note Common options::. `-j REV' Merge in changes. See *Note checkout options::. `-k KFLAG' Use KFLAG keyword expansion. See *Note Substitution modes::. `-l' Local; run only in current working directory. *Note Recursive behavior::. `-N' Don't "shorten" module paths if -d specified. See *Note checkout options::. `-n' Do not run module program (if any). See *Note checkout options::. `-P' Prune empty directories. See *Note Moving directories::. `-p' Check out files to standard output (avoids stickiness). See *Note checkout options::. `-R' Operate recursively (default). *Note Recursive behavior::. `-r TAG' Checkout revision TAG (is sticky). See *Note Common options::. `-s' Like -c, but include module status. See *Note checkout options::. `commit [OPTIONS] [FILES...]' Check changes into the repository. See *Note commit::. `-F FILE' Read log message from FILE. See *Note commit options::. `-f' Force the file to be committed; disables recursion. See *Note commit options::. `-l' Local; run only in current working directory. See *Note Recursive behavior::. `-m MSG' Use MSG as log message. See *Note commit options::. `-n' Do not run module program (if any). See *Note commit options::. `-R' Operate recursively (default). *Note Recursive behavior::. `-r REV' Commit to REV. See *Note commit options::. `diff [OPTIONS] [FILES...]' Show differences between revisions. See *Note diff::. In addition to the options shown below, accepts a wide variety of options to control output style, for example `-c' for context diffs. `-D DATE1' Diff revision for date against working file. See *Note diff options::. `-D DATE2' Diff REV1/DATE1 against DATE2. See *Note diff options::. `-l' Local; run only in current working directory. See *Note Recursive behavior::. `-N' Include diffs for added and removed files. See *Note diff options::. `-R' Operate recursively (default). *Note Recursive behavior::. `-r REV1' Diff revision for REV1 against working file. See *Note diff options::. `-r REV2' Diff REV1/DATE1 against REV2. See *Note diff options::. `edit [OPTIONS] [FILES...]' Get ready to edit a watched file. See *Note Editing files::. `-a ACTIONS' Specify actions for temporary watch, where ACTIONS is `edit', `unedit', `commit', `all', or `none'. See *Note Editing files::. `-l' Local; run only in current working directory. See *Note Recursive behavior::. `-R' Operate recursively (default). *Note Recursive behavior::. `editors [OPTIONS] [FILES...]' See who is editing a watched file. See *Note Watch information::. `-l' Local; run only in current working directory. See *Note Recursive behavior::. `-R' Operate recursively (default). *Note Recursive behavior::. `export [OPTIONS] MODULES...' Export files from CVS. See *Note export::. `-D DATE' Check out revisions as of DATE. See *Note Common options::. `-d DIR' Check out into DIR. See *Note export options::. `-f' Use head revision if tag/date not found. See *Note Common options::. `-k KFLAG' Use KFLAG keyword expansion. See *Note Substitution modes::. `-l' Local; run only in current working directory. *Note Recursive behavior::. `-N' Don't "shorten" module paths if -d specified. See *Note export options::. `-n' Do not run module program (if any). See *Note export options::. `-P' Prune empty directories. See *Note Moving directories::. `-R' Operate recursively (default). *Note Recursive behavior::. `-r TAG' Checkout revision TAG. See *Note Common options::. `history [OPTIONS] [FILES...]' Show repository access history. See *Note history::. `-a' All users (default is self). See *Note history options::. `-b STR' Back to record with STR in module/file/repos field. See *Note history options::. `-c' Report on committed (modified) files. See *Note history options::. `-D DATE' Since DATE. See *Note history options::. `-e' Report on all record types. See *Note history options::. `-l' Last modified (committed or modified report). See *Note history options::. `-m MODULE' Report on MODULE (repeatable). See *Note history options::. `-n MODULE' In MODULE. See *Note history options::. `-o' Report on checked out modules. See *Note history options::. `-r REV' Since revision REV. See *Note history options::. `-T' Produce report on all TAGs. See *Note history options::. `-t TAG' Since tag record placed in history file (by anyone). See *Note history options::. `-u USER' For user USER (repeatable). See *Note history options::. `-w' Working directory must match. See *Note history options::. `-x TYPES' Report on TYPES, one or more of `TOEFWUCGMAR'. See *Note history options::. `-z ZONE' Output for time zone ZONE. See *Note history options::. `import [OPTIONS] REPOSITORY VENDOR-TAG RELEASE-TAGS...' Import files into CVS, using vendor branches. See *Note import::. `-b BRA' Import to vendor branch BRA. See *Note Multiple vendor branches::. `-d' Use the file's modification time as the time of import. See *Note import options::. `-k KFLAG' Set default keyword substitution mode. See *Note import options::. `-m MSG' Use MSG for log message. See *Note import options::. `-I IGN' More files to ignore (! to reset). See *Note import options::. `-W SPEC' More wrappers. See *Note import options::. `init' Create a CVS repository if it doesn't exist. See *Note Creating a repository::. `log [OPTIONS] [FILES...]' Print out history information for files. See *Note log::. `-b' Only list revisions on the default branch. See *Note log options::. `-d DATES' Specify dates (D1 /dev/null; then exit 0 else echo "No BugId found." exit 1 fi The `verifymsg' file contains this line: ^tc /usr/cvssupport/bugid.verify The `rcsinfo' file contains this line: ^tc /usr/cvssupport/tc.template  File: cvs.info, Node: editinfo, Next: loginfo, Prev: verifymsg, Up: Administrative files Editinfo ======== _NOTE:_ The `editinfo' feature has been rendered obsolete. To set a default editor for log messages use the `EDITOR' environment variable (*note Environment variables::) or the `-e' global option (*note Global options::). See *Note verifymsg::, for information on the use of the `verifymsg' feature for evaluating log messages. If you want to make sure that all log messages look the same way, you can use the `editinfo' file to specify a program that is used to edit the log message. This program could be a custom-made editor that always enforces a certain style of the log message, or maybe a simple shell script that calls an editor, and checks that the entered message contains the required fields. If no matching line is found in the `editinfo' file, the editor specified in the environment variable `$CVSEDITOR' is used instead. If that variable is not set, then the environment variable `$EDITOR' is used instead. If that variable is not set a default will be used. See *Note Committing your changes::. The `editinfo' file is often most useful together with the `rcsinfo' file, which can be used to specify a log message template. Each line in the `editinfo' file consists of a regular expression and a command-line template. The template must include a program name, and can include any number of arguments. The full path to the current log message template file is appended to the template. One thing that should be noted is that the `ALL' keyword is not supported. If more than one matching line is found, the first one is used. This can be useful for specifying a default edit script in a module, and then overriding it in a subdirectory. If the repository name does not match any of the regular expressions in this file, the `DEFAULT' line is used, if it is specified. If the edit script exits with a non-zero exit status, the commit is aborted. Note: when CVS is accessing a remote repository, or when the `-m' or `-F' options to `cvs commit' are used, `editinfo' will not be consulted. There is no good workaround for this; use `verifymsg' instead. * Menu: * editinfo example:: Editinfo example  File: cvs.info, Node: editinfo example, Up: editinfo Editinfo example ---------------- The following is a little silly example of a `editinfo' file, together with the corresponding `rcsinfo' file, the log message template and an editor script. We begin with the log message template. We want to always record a bug-id number on the first line of the log message. The rest of log message is free text. The following template is found in the file `/usr/cvssupport/tc.template'. BugId: The script `/usr/cvssupport/bugid.edit' is used to edit the log message. #!/bin/sh # # bugid.edit filename # # Call $EDITOR on FILENAME, and verify that the # resulting file contains a valid bugid on the first # line. if [ "x$EDITOR" = "x" ]; then EDITOR=vi; fi if [ "x$CVSEDITOR" = "x" ]; then CVSEDITOR=$EDITOR; fi $CVSEDITOR $1 until head -1|grep '^BugId:[ ]*[0-9][0-9]*$' < $1 do echo -n "No BugId found. Edit again? ([y]/n)" read ans case ${ans} in n*) exit 1;; esac $CVSEDITOR $1 done The `editinfo' file contains this line: ^tc /usr/cvssupport/bugid.edit The `rcsinfo' file contains this line: ^tc /usr/cvssupport/tc.template  File: cvs.info, Node: loginfo, Next: rcsinfo, Prev: editinfo, Up: Administrative files Loginfo ======= The `loginfo' file is used to control where `cvs commit' log information is sent. The first entry on a line is a regular expression which is tested against the directory that the change is being made to, relative to the `$CVSROOT'. If a match is found, then the remainder of the line is a filter program that should expect log information on its standard input. If the repository name does not match any of the regular expressions in this file, the `DEFAULT' line is used, if it is specified. All occurrences of the name `ALL' appearing as a regular expression are used in addition to the first matching regular expression or `DEFAULT'. The first matching regular expression is used. *Note commit files::, for a description of the syntax of the `loginfo' file. The user may specify a format string as part of the filter. The string is composed of a `%' followed by a space, or followed by a single format character, or followed by a set of format characters surrounded by `{' and `}' as separators. The format characters are: s file name V old version number (pre-checkin) v new version number (post-checkin) All other characters that appear in a format string expand to an empty field (commas separating fields are still provided). For example, some valid format strings are `%', `%s', `%{s}', and `%{sVv}'. The output will be a string of tokens separated by spaces. For backwards compatibility, the first token will be the repository subdirectory. The rest of the tokens will be comma-delimited lists of the information requested in the format string. For example, if `/u/src/master/yoyodyne/tc' is the repository, `%{sVv}' is the format string, and three files (ChangeLog, Makefile, foo.c) were modified, the output might be: yoyodyne/tc ChangeLog,1.1,1.2 Makefile,1.3,1.4 foo.c,1.12,1.13 As another example, `%{}' means that only the name of the repository will be generated. Note: when CVS is accessing a remote repository, `loginfo' will be run on the _remote_ (i.e., server) side, not the client side (*note Remote repositories::). * Menu: * loginfo example:: Loginfo example * Keeping a checked out copy:: Updating a tree on every checkin  File: cvs.info, Node: loginfo example, Next: Keeping a checked out copy, Up: loginfo Loginfo example --------------- The following `loginfo' file, together with the tiny shell-script below, appends all log messages to the file `$CVSROOT/CVSROOT/commitlog', and any commits to the administrative files (inside the `CVSROOT' directory) are also logged in `/usr/adm/cvsroot-log'. Commits to the `prog1' directory are mailed to ceder. ALL /usr/local/bin/cvs-log $CVSROOT/CVSROOT/commitlog $USER ^CVSROOT /usr/local/bin/cvs-log /usr/adm/cvsroot-log ^prog1 Mail -s %s ceder The shell-script `/usr/local/bin/cvs-log' looks like this: #!/bin/sh (echo "------------------------------------------------------"; echo -n $2" "; date; echo; cat) >> $1  File: cvs.info, Node: Keeping a checked out copy, Prev: loginfo example, Up: loginfo Keeping a checked out copy -------------------------- It is often useful to maintain a directory tree which contains files which correspond to the latest version in the repository. For example, other developers might want to refer to the latest sources without having to check them out, or you might be maintaining a web site with CVS and want every checkin to cause the files used by the web server to be updated. The way to do this is by having loginfo invoke `cvs update'. Doing so in the naive way will cause a problem with locks, so the `cvs update' must be run in the background. Here is an example for unix (this should all be on one line): ^cyclic-pages (date; cat; (sleep 2; cd /u/www/local-docs; cvs -q update -d) &) >> $CVSROOT/CVSROOT/updatelog 2>&1 This will cause checkins to repository directories starting with `cyclic-pages' to update the checked out tree in `/u/www/local-docs'.  File: cvs.info, Node: rcsinfo, Next: cvsignore, Prev: loginfo, Up: Administrative files Rcsinfo ======= The `rcsinfo' file can be used to specify a form to edit when filling out the commit log. The `rcsinfo' file has a syntax similar to the `verifymsg', `commitinfo' and `loginfo' files. *Note syntax::. Unlike the other files the second part is _not_ a command-line template. Instead, the part after the regular expression should be a full pathname to a file containing the log message template. If the repository name does not match any of the regular expressions in this file, the `DEFAULT' line is used, if it is specified. All occurrences of the name `ALL' appearing as a regular expression are used in addition to the first matching regular expression or `DEFAULT'. The log message template will be used as a default log message. If you specify a log message with `cvs commit -m MESSAGE' or `cvs commit -f FILE' that log message will override the template. *Note verifymsg::, for an example `rcsinfo' file. When CVS is accessing a remote repository, the contents of `rcsinfo' at the time a directory is first checked out will specify a template which does not then change. If you edit `rcsinfo' or its templates, you may need to check out a new working directory.