# PaCkAgE DaTaStReAm cvs 1 6120 # end of header 07070100106b7d000081a40000000000000000000000014d58a1fe000000fe000000b600010002ffffffffffffffff0000000c00000000cvs/pkginfoPKG=cvs NAME=cvs 1.11.23 i86pc Solaris 11 VERSION=1.11.23 PSTAMP=14th February 2011 VENDOR=CVS Project EMAIL=http://www.nongnu.org/cvs/ DESC=Concurrent Versions System ARCH=i386 CATEGORY=utility CLASSES=none BASEDIR=/ ISTATES=S s 1 2 3 RSTATES=S s 1 2 3 07070100106b7c000081a40000000000000000000000014d58a1ff00000b53000000b600010002ffffffffffffffff0000000b00000000cvs/pkgmap: 1 6120 1 d none /usr ? ? ? 1 d none /usr/local ? ? ? 1 d none /usr/local/bin 0755 root root 1 f none /usr/local/bin/cvs 0755 root root 1942024 29896 1297654264 1 f none /usr/local/bin/cvsbug 0755 root root 14052 54258 1297654264 1 s none /usr/local/bin/rcs2log=../share/cvs/contrib/rcs2log 1 d none /usr/local/share 0755 root root 1 d none /usr/local/share/cvs 0755 root root 1 d none /usr/local/share/cvs/contrib 0755 root root 1 f none /usr/local/share/cvs/contrib/README 0644 root root 5392 11642 1297654264 1 f none /usr/local/share/cvs/contrib/check_cvs 0755 root root 22874 63913 1297654264 1 f none /usr/local/share/cvs/contrib/clmerge 0755 root root 3880 26480 1297654264 1 f none /usr/local/share/cvs/contrib/cln_hist 0755 root root 2461 58875 1297654264 1 f none /usr/local/share/cvs/contrib/commit_prep 0755 root root 3185 32848 1297654264 1 f none /usr/local/share/cvs/contrib/cvs2vendor 0755 root root 5221 15467 1297654264 1 f none /usr/local/share/cvs/contrib/cvs_acls 0755 root root 38039 21942 1297654264 1 f none /usr/local/share/cvs/contrib/cvscheck 0755 root root 2806 30223 1297654264 1 f none /usr/local/share/cvs/contrib/debug_check_log 0755 root root 4858 53240 1297654264 1 f none /usr/local/share/cvs/contrib/intro.doc 0644 root root 4002 12655 1297654264 1 f none /usr/local/share/cvs/contrib/log 0755 root root 6436 5424 1297654264 1 f none /usr/local/share/cvs/contrib/log_accum 0755 root root 21929 32489 1297654264 1 f none /usr/local/share/cvs/contrib/mfpipe 0755 root root 3428 49036 1297654264 1 f none /usr/local/share/cvs/contrib/pvcs2rcs 0755 root root 37775 14054 1297654264 1 f none /usr/local/share/cvs/contrib/rcs-to-cvs 0755 root root 5122 61958 1297654264 1 f none /usr/local/share/cvs/contrib/rcs2log 0755 root root 19506 35194 1297654264 1 f none /usr/local/share/cvs/contrib/rcslock 0755 root root 8127 54708 1297654264 1 f none /usr/local/share/cvs/contrib/sccs2rcs 0755 root root 10045 36644 1297654264 1 d none /usr/local/share/info 0755 root root 1 f none /usr/local/share/info/cvs.info 0644 root root 6030 46521 1297654264 1 f none /usr/local/share/info/cvs.info-1 0644 root root 298992 34552 1297654264 1 f none /usr/local/share/info/cvs.info-2 0644 root root 181029 24181 1297654264 1 f none /usr/local/share/info/cvsclient.info 0644 root root 93148 38731 1297654264 1 f none /usr/local/share/info/dir 0644 root root 5167 58930 1297654264 1 d none /usr/local/share/man 0755 root root 1 d none /usr/local/share/man/man1 0755 root root 1 f none /usr/local/share/man/man1/cvs.1 0644 root root 112978 64936 1297654264 1 d none /usr/local/share/man/man5 0755 root root 1 f none /usr/local/share/man/man5/cvs.5 0644 root root 13517 40719 1297654264 1 d none /usr/local/share/man/man8 0755 root root 1 f none /usr/local/share/man/man8/cvsbug.8 0644 root root 7129 23237 1297654264 1 i checkinstall 790 2505 1297654328 1 i pkginfo 254 19292 1297654270 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!!07070100106b7d000081a40000000000000000000000014d58a1fe000000fe000000b600010002ffffffffffffffff0000000800000000pkginfoPKG=cvs NAME=cvs 1.11.23 i86pc Solaris 11 VERSION=1.11.23 PSTAMP=14th February 2011 VENDOR=CVS Project EMAIL=http://www.nongnu.org/cvs/ DESC=Concurrent Versions System ARCH=i386 CATEGORY=utility CLASSES=none BASEDIR=/ ISTATES=S s 1 2 3 RSTATES=S s 1 2 3 07070100106b7c000081a40000000000000000000000014d58a1ff00000b53000000b600010002ffffffffffffffff0000000700000000pkgmap: 1 6120 1 d none /usr ? ? ? 1 d none /usr/local ? ? ? 1 d none /usr/local/bin 0755 root root 1 f none /usr/local/bin/cvs 0755 root root 1942024 29896 1297654264 1 f none /usr/local/bin/cvsbug 0755 root root 14052 54258 1297654264 1 s none /usr/local/bin/rcs2log=../share/cvs/contrib/rcs2log 1 d none /usr/local/share 0755 root root 1 d none /usr/local/share/cvs 0755 root root 1 d none /usr/local/share/cvs/contrib 0755 root root 1 f none /usr/local/share/cvs/contrib/README 0644 root root 5392 11642 1297654264 1 f none /usr/local/share/cvs/contrib/check_cvs 0755 root root 22874 63913 1297654264 1 f none /usr/local/share/cvs/contrib/clmerge 0755 root root 3880 26480 1297654264 1 f none /usr/local/share/cvs/contrib/cln_hist 0755 root root 2461 58875 1297654264 1 f none /usr/local/share/cvs/contrib/commit_prep 0755 root root 3185 32848 1297654264 1 f none /usr/local/share/cvs/contrib/cvs2vendor 0755 root root 5221 15467 1297654264 1 f none /usr/local/share/cvs/contrib/cvs_acls 0755 root root 38039 21942 1297654264 1 f none /usr/local/share/cvs/contrib/cvscheck 0755 root root 2806 30223 1297654264 1 f none /usr/local/share/cvs/contrib/debug_check_log 0755 root root 4858 53240 1297654264 1 f none /usr/local/share/cvs/contrib/intro.doc 0644 root root 4002 12655 1297654264 1 f none /usr/local/share/cvs/contrib/log 0755 root root 6436 5424 1297654264 1 f none /usr/local/share/cvs/contrib/log_accum 0755 root root 21929 32489 1297654264 1 f none /usr/local/share/cvs/contrib/mfpipe 0755 root root 3428 49036 1297654264 1 f none /usr/local/share/cvs/contrib/pvcs2rcs 0755 root root 37775 14054 1297654264 1 f none /usr/local/share/cvs/contrib/rcs-to-cvs 0755 root root 5122 61958 1297654264 1 f none /usr/local/share/cvs/contrib/rcs2log 0755 root root 19506 35194 1297654264 1 f none /usr/local/share/cvs/contrib/rcslock 0755 root root 8127 54708 1297654264 1 f none /usr/local/share/cvs/contrib/sccs2rcs 0755 root root 10045 36644 1297654264 1 d none /usr/local/share/info 0755 root root 1 f none /usr/local/share/info/cvs.info 0644 root root 6030 46521 1297654264 1 f none /usr/local/share/info/cvs.info-1 0644 root root 298992 34552 1297654264 1 f none /usr/local/share/info/cvs.info-2 0644 root root 181029 24181 1297654264 1 f none /usr/local/share/info/cvsclient.info 0644 root root 93148 38731 1297654264 1 f none /usr/local/share/info/dir 0644 root root 5167 58930 1297654264 1 d none /usr/local/share/man 0755 root root 1 d none /usr/local/share/man/man1 0755 root root 1 f none /usr/local/share/man/man1/cvs.1 0644 root root 112978 64936 1297654264 1 d none /usr/local/share/man/man5 0755 root root 1 f none /usr/local/share/man/man5/cvs.5 0644 root root 13517 40719 1297654264 1 d none /usr/local/share/man/man8 0755 root root 1 f none /usr/local/share/man/man8/cvsbug.8 0644 root root 7129 23237 1297654264 1 i checkinstall 790 2505 1297654328 1 i pkginfo 254 19292 1297654270 07070100106ba6000041ed0000000000000000000000024d58a1ff00000000000000b600010002ffffffffffffffff0000000800000000install07070100106ba7000081ed0000000000000000000000014d58a23800000316000000b600010002ffffffffffffffff0000001500000000install/checkinstall#!/bin/sh # expected_bits="64" expected_release="5.11" expected_platform="i386" # release=`uname -r` platform=`uname -p` bits=`isainfo -b` # if [ ${platform} != ${expected_platform} ]; then echo "\n\n\n\tThis package must be installed on a ${expected_platform} architecture\n" echo "\tAborting installation.\n\n\n" exit 1 fi if [ ${release} != ${expected_release} ]; then echo "\n\n\n\tThis package must be installed on a ${expected_release} machine\n" echo "\tAborting installation.\n\n\n" exit 1 fi #if [ ${bits} != ${expected_bits} ]; then # echo "\n\n\n\tThis package must be installed on a ${expected_bits} bit machine\n" # echo "\tYour machine is running a ${bits} bit O.S. currently\n" # echo "\tAborting installation.\n\n\n" # exit 1 #fi exit 0 07070100106b7e000041ed0000000000000000000000034d58a1ff00000000000000b600010002ffffffffffffffff0000000500000000root07070100106b7f000041ed0000000000000000000000034d58a1ff00000000000000b600010002ffffffffffffffff0000000900000000root/usr07070100106b80000041ed0000000000000000000000044d58a1ff00000000000000b600010002ffffffffffffffff0000000f00000000root/usr/local07070100106b84000041ed0000000000000000000000054d58a1ff00000000000000b600010002ffffffffffffffff0000001500000000root/usr/local/share07070100106b9f000041ed0000000000000000000000054d58a1ff00000000000000b600010002ffffffffffffffff0000001900000000root/usr/local/share/man07070100106ba0000041ed0000000000000000000000024d58a1ff00000000000000b600010002ffffffffffffffff0000001e00000000root/usr/local/share/man/man107070100106ba1000081a40000000000000000000000014d58a1f80001b952000000b600010002ffffffffffffffff0000002400000000root/usr/local/share/man/man1/cvs.1.\" This is the man page for CVS. It is auto-generated from the .\" cvs.man.header, cvs.texinfo, & cvs.man.footer files. Please make changes .\" there. A full copyright & license notice may also be found in cvs.texinfo. .\" .\" Man page autogeneration, including this header file, is .\" Copyright 2004-2005 The Free Software Foundation, Inc., .\" Derek R. Price, & Ximbiot . .\" .\" This documentation is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2, or (at your option) .\" any later version. .\" .\" This documentation is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this documentation; if not, write to the Free Software .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .de Id .ds Rv \\$3 .ds Dt \\$4 .. .TH CVS 1 "\*(Dt" .\" Full space in nroff; half space in troff .de SP .if n .sp .if t .sp .5 .. .\" quoted command .de ` .RB ` "\|\\$1\|" '\\$2 .. .SH "NAME" cvs \- Concurrent Versions System .SH "SYNOPSIS" .TP \fBcvs\fP [ \fIcvs_options\fP ] .I cvs_command [ .I command_options ] [ .I command_args ] .SH "NOTE" .IX "revision control system" "\fLcvs\fR" .IX cvs "" "\fLcvs\fP \- concurrent versions system" .IX "concurrent versions system \- \fLcvs\fP" .IX "release control system" "cvs command" "" "\fLcvs\fP \- concurrent versions system" .IX "source control system" "cvs command" "" "\fLcvs\fP \- concurrent versions system" .IX revisions "cvs command" "" "\fLcvs\fP \- source control" This manpage is a summary of some of the features of \fBcvs\fP. It is auto-generated from an appendix of the CVS manual. For more in-depth documentation, please consult the Cederqvist manual (via the .B info CVS command or otherwise, as described in the SEE ALSO section of this manpage). Cross-references in this man page refer to nodes in the same. .SH "CVS commands" .SS "Guide to CVS commands" .SP This appendix describes the overall structure of \fBcvs\fR commands, and describes some commands in detail (others are described elsewhere; for a quick reference to \fBcvs\fR commands, see node `Invoking CVS\(aq in the CVS manual). .SP .SH "Structure" .SS "Overall structure of CVS commands" .IX "Structure" .IX "CVS command structure" .IX "Command structure" .IX "Format of CVS commands" .SP The overall format of all \fBcvs\fR commands is: .SP .PD 0 .SP .IP "" 2 cvs [ cvs_options ] cvs_command [ command_options ] [ command_args ] .PD .IP "" 0 .SP .IP "" 0 \fBcvs\fR .IP "" 2 The name of the \fBcvs\fR program. .SP .IP "" 0 \fBcvs_options\fR .IP "" 2 Some options that affect all sub-commands of \fBcvs\fR. These are described below. .SP .IP "" 0 \fBcvs_command\fR .IP "" 2 One of several different sub-commands. Some of the commands have aliases that can be used instead; those aliases are noted in the reference manual for that command. There are only two situations where you may omit \fBcvs_command\fR: \fBcvs -H\fR elicits a list of available commands, and \fBcvs -v\fR displays version information on \fBcvs\fR itself. .SP .IP "" 0 \fBcommand_options\fR .IP "" 2 Options that are specific for the command. .SP .IP "" 0 \fBcommand_args\fR .IP "" 2 Arguments to the commands. .SP There is unfortunately some confusion between \fBcvs_options\fR and \fBcommand_options\fR. When given as a \fBcvs_option\fR, some options only affect some of the commands. When given as a \fBcommand_option\fR it may have a different meaning, and be accepted by more commands. In other words, do not take the above categorization too seriously. Look at the documentation instead. .SP .SH "Exit status" .SS "CVS\(aqs exit status" .IX "Exit status, of CVS" .SP \fBcvs\fR can indicate to the calling environment whether it succeeded or failed by setting its \fIexit status\fR. The exact way of testing the exit status will vary from one operating system to another. For example in a unix shell script the \fB$?\fR variable will be 0 if the last command returned a successful exit status, or greater than 0 if the exit status indicated failure. .SP If \fBcvs\fR is successful, it returns a successful status; if there is an error, it prints an error message and returns a failure status. The one exception to this is the \fBcvs diff\fR command. It will return a successful status if it found no differences, or a failure status if there were differences or if there was an error. Because this behavior provides no good way to detect errors, in the future it is possible that \fBcvs diff\fR will be changed to behave like the other \fBcvs\fR commands. .SP .SH "~/.cvsrc" .SS "Default options and the ~/.cvsrc file" .IX "\&.cvsrc file" .IX "Option defaults" .SP There are some \fBcommand_options\fR that are used so often that you might have set up an alias or some other means to make sure you always specify that option. One example (the one that drove the implementation of the \fB.cvsrc\fR support, actually) is that many people find the default output of the \fBdiff\fR command to be very hard to read, and that either context diffs or unidiffs are much easier to understand. .SP The \fB~/.cvsrc\fR file is a way that you can add default options to \fBcvs_commands\fR within cvs, instead of relying on aliases or other shell scripts. .SP The format of the \fB~/.cvsrc\fR file is simple. The file is searched for a line that begins with the same name as the \fBcvs_command\fR being executed. If a match is found, then the remainder of the line is split up (at whitespace characters) into separate options and added to the command arguments \fIbefore\fR any options from the command line. .SP If a command has two names (e.g., \fBcheckout\fR and \fBco\fR), the official name, not necessarily the one used on the command line, will be used to match against the file. So if this is the contents of the user\(aqs \fB~/.cvsrc\fR file: .SP .PD 0 .SP .IP "" 2 log -N .IP "" 2 diff -uN .IP "" 2 rdiff -u .IP "" 2 update -Pd .IP "" 2 checkout -P .IP "" 2 release -d .PD .IP "" 0 .SP the command \fBcvs checkout foo\fR would have the \fB-P\fR option added to the arguments, as well as \fBcvs co foo\fR. .SP With the example file above, the output from \fBcvs diff foobar\fR will be in unidiff format. \fBcvs diff -c foobar\fR will provide context diffs, as usual. Getting "old" format diffs would be slightly more complicated, because \fBdiff\fR doesn\(aqt have an option to specify use of the "old" format, so you would need \fBcvs -f diff foobar\fR. .SP In place of the command name you can use \fBcvs\fR to specify global options (see node `Global options\(aq in the CVS manual). For example the following line in \fB.cvsrc\fR .SP .PD 0 .SP .IP "" 2 cvs -z6 .PD .IP "" 0 .SP causes \fBcvs\fR to use compression level 6. .SP .SH "Global options" .IX "Options, global" .IX "Global options" .IX "Left-hand options" .SP The available \fBcvs_options\fR (that are given to the left of \fBcvs_command\fR) are: .SP .IP "" 0 \fB--allow-root=\fIrootdir\fB\fR .IP "" 2 Specify legal \fBcvsroot\fR directory. See `Password authentication server\(aq in the CVS manual. .SP .IX "Authentication, stream" .IX "Stream authentication" .IP "" 0 \fB-a\fR .IP "" 2 Authenticate all communication between the client and the server. Only has an effect on the \fBcvs\fR client. As of this writing, this is only implemented when using a GSSAPI connection (see node `GSSAPI authenticated\(aq in the CVS manual). Authentication prevents certain sorts of attacks involving hijacking the active \fBtcp\fR connection. Enabling authentication does not enable encryption. .SP .IX "RCSBIN, overriding" .IX "Overriding RCSBIN" .IP "" 0 \fB-b \fIbindir\fB\fR .IP "" 2 In \fBcvs\fR 1.9.18 and older, this specified that \fBrcs\fR programs are in the \fIbindir\fR directory. Current versions of \fBcvs\fR do not run \fBrcs\fR programs; for compatibility this option is accepted, but it does nothing. .SP .IX "TMPDIR, overriding" .IX "Overriding TMPDIR" .IP "" 0 \fB-T \fItempdir\fB\fR .IP "" 2 Use \fItempdir\fR as the directory where temporary files are located. Overrides the setting of the \fB$TMPDIR\fR environment variable and any precompiled directory. This parameter should be specified as an absolute pathname. (When running client/server, \fB-T\fR affects only the local process; specifying \fB-T\fR for the client has no effect on the server and vice versa.) .SP .IX "CVSROOT, overriding" .IX "Overriding CVSROOT" .IP "" 0 \fB-d \fIcvs_root_directory\fB\fR .IP "" 2 Use \fIcvs_root_directory\fR as the root directory pathname of the repository. Overrides the setting of the \fB$CVSROOT\fR environment variable. See `Repository\(aq in the CVS manual. .SP .IX "EDITOR, overriding" .IX "Overriding EDITOR" .IP "" 0 \fB-e \fIeditor\fB\fR .IP "" 2 Use \fIeditor\fR to enter revision log information. Overrides the setting of the \fB$CVSEDITOR\fR and \fB$EDITOR\fR environment variables. For more information, see `Committing your changes\(aq in the CVS manual. .SP .IP "" 0 \fB-f\fR .IP "" 2 Do not read the \fB~/.cvsrc\fR file. This option is most often used because of the non-orthogonality of the \fBcvs\fR option set. For example, the \fBcvs log\fR option \fB-N\fR (turn off display of tag names) does not have a corresponding option to turn the display on. So if you have \fB-N\fR in the \fB~/.cvsrc\fR entry for \fBlog\fR, you may need to use \fB-f\fR to show the tag names. .SP .IP "" 0 \fB-H\fR .IP "" 2 .IP "" 0 \fB--help\fR .IP "" 2 Display usage information about the specified \fBcvs_command\fR (but do not actually execute the command). If you don\(aqt specify a command name, \fBcvs -H\fR displays overall help for \fBcvs\fR, including a list of other help options. .SP .IX "Read-only mode" .IP "" 0 \fB-n\fR .IP "" 2 Do not change any files. Attempt to execute the \fBcvs_command\fR, but only to issue reports; do not remove, update, or merge any existing files, or create any new files. .SP Note that \fBcvs\fR will not necessarily produce exactly the same output as without \fB-n\fR. In some cases the output will be the same, but in other cases \fBcvs\fR will skip some of the processing that would have been required to produce the exact same output. .SP .IP "" 0 \fB-Q\fR .IP "" 2 Cause the command to be really quiet; the command will only generate output for serious problems. .SP .IP "" 0 \fB-q\fR .IP "" 2 Cause the command to be somewhat quiet; informational messages, such as reports of recursion through subdirectories, are suppressed. .SP .IX "Read-only files, and -r" .IP "" 0 \fB-r\fR .IP "" 2 Make new working files read-only. Same effect as if the \fB$CVSREAD\fR environment variable is set (see node `Environment variables\(aq in the CVS manual). The default is to make working files writable, unless watches are on (see node `Watches\(aq in the CVS manual). .SP .IP "" 0 \fB-s \fIvariable\fB=\fIvalue\fB\fR .IP "" 2 Set a user variable (see node `Variables\(aq in the CVS manual). .SP .IX "Trace" .IP "" 0 \fB-t\fR .IP "" 2 Trace program execution; display messages showing the steps of \fBcvs\fR activity. Particularly useful with \fB-n\fR to explore the potential impact of an unfamiliar command. .SP .IP "" 0 \fB-v\fR .IP "" 2 .IP "" 0 \fB--version\fR .IP "" 2 Display version and copyright information for \fBcvs\fR. .SP .IX "CVSREAD, overriding" .IX "Overriding CVSREAD" .IP "" 0 \fB-w\fR .IP "" 2 Make new working files read-write. Overrides the setting of the \fB$CVSREAD\fR environment variable. Files are created read-write by default, unless \fB$CVSREAD\fR is set or \fB-r\fR is given. .SP .IP "" 0 \fB-x\fR .IP "" 2 .IX "Encryption" Encrypt all communication between the client and the server. Only has an effect on the \fBcvs\fR client. As of this writing, this is only implemented when using a GSSAPI connection (see node `GSSAPI authenticated\(aq in the CVS manual) or a Kerberos connection (see node `Kerberos authenticated\(aq in the CVS manual). Enabling encryption implies that message traffic is also authenticated. Encryption support is not available by default; it must be enabled using a special configure option, \fB--enable-encryption\fR, when you build \fBcvs\fR. .SP .IP "" 0 \fB-z \fIgzip-level\fB\fR .IP "" 2 .IX "Compression" .IX "Gzip" Set the compression level. Valid levels are 1 (high speed, low compression) to 9 (low speed, high compression), or 0 to disable compression (the default). Only has an effect on the \fBcvs\fR client. .SP .SP .SH "Common options" .SS "Common command options" .IX "Common options" .IX "Right-hand options" .SP This section describes the \fBcommand_options\fR that are available across several \fBcvs\fR commands. These options are always given to the right of \fBcvs_command\fR. Not all commands support all of these options; each option is only supported for commands where it makes sense. However, when a command has one of these options you can almost always count on the same behavior of the option as in other commands. (Other command options, which are listed with the individual commands, may have different behavior from one \fBcvs\fR command to the other). .SP \fBThe \fBhistory\fB command is an exception; it supports many options that conflict even with these standard options.\fR .SP .IX "Dates" .IX "Time" .IX "Specifying dates" .IP "" 0 \fB-D \fIdate_spec\fB\fR .IP "" 2 Use the most recent revision no later than \fIdate_spec\fR. \fIdate_spec\fR is a single argument, a date description specifying a date in the past. .SP The specification is \fIsticky\fR when you use it to make a private copy of a source file; that is, when you get a working file using \fB-D\fR, \fBcvs\fR records the date you specified, so that further updates in the same directory will use the same date (for more information on sticky tags/dates, see node `Sticky tags\(aq in the CVS manual). .SP \fB-D\fR is available with the \fBannotate\fR, \fBcheckout\fR, \fBdiff\fR, \fBexport\fR, \fBhistory\fR, \fBrdiff\fR, \fBrtag\fR, and \fBupdate\fR commands. (The \fBhistory\fR command uses this option in a slightly different way; see node `history options\(aq in the CVS manual). .SP .IX "Timezone, in input" .IX "Zone, time, in input" A wide variety of date formats are supported by \fBcvs\fR. The most standard ones are ISO8601 (from the International Standards Organization) and the Internet e-mail standard (specified in RFC822 as amended by RFC1123). .SP ISO8601 dates have many variants but a few examples are: .SP .PD 0 .SP .IP "" 4 1972-09-24 .IP "" 4 1972-09-24 20:05 .PD .IP "" 2 .SP There are a lot more ISO8601 date formats, and \fBcvs\fR accepts many of them, but you probably don\(aqt want to hear the \fIwhole\fR long story :-). .SP In addition to the dates allowed in Internet e-mail itself, \fBcvs\fR also allows some of the fields to be omitted. For example: .SP .PD 0 .SP .IP "" 4 24 Sep 1972 20:05 .IP "" 4 24 Sep .PD .IP "" 2 .SP The date is interpreted as being in the local timezone, unless a specific timezone is specified. .SP These two date formats are preferred. However, \fBcvs\fR currently accepts a wide variety of other date formats. They are intentionally not documented here in any detail, and future versions of \fBcvs\fR might not accept all of them. .SP One such format is \fB\fImonth\fB/\fIday\fB/\fIyear\fB\fR. This may confuse people who are accustomed to having the month and day in the other order; \fB1/4/96\fR is January 4, not April 1. .SP Remember to quote the argument to the \fB-D\fR flag so that your shell doesn\(aqt interpret spaces as argument separators. A command using the \fB-D\fR flag can look like this: .SP .PD 0 .SP .IP "" 4 $ cvs diff -D "1 hour ago" cvs.texinfo .PD .IP "" 2 .SP .IX "Forcing a tag match" .IP "" 0 \fB-f\fR .IP "" 2 When you specify a particular date or tag to \fBcvs\fR commands, they normally ignore files that do not contain the tag (or did not exist prior to the date) that you specified. Use the \fB-f\fR option if you want files retrieved even when there is no match for the tag or date. (The most recent revision of the file will be used). .SP Note that even with \fB-f\fR, a tag that you specify must exist (that is, in some file, not necessary in every file). This is so that \fBcvs\fR will continue to give an error if you mistype a tag name. .SP \fB-f\fR is available with these commands: \fBannotate\fR, \fBcheckout\fR, \fBexport\fR, \fBrdiff\fR, \fBrtag\fR, and \fBupdate\fR. .SP \fBWARNING: The \fBcommit\fB and \fBremove\fB commands also have a \fB-f\fB option, but it has a different behavior for those commands. See `commit options\(aq in the CVS manual, and `Removing files\(aq in the CVS manual.\fR .SP .IP "" 0 \fB-k \fIkflag\fB\fR .IP "" 2 Alter the default processing of keywords. See `Keyword substitution\(aq in the CVS manual, for the meaning of \fIkflag\fR. Your \fIkflag\fR specification is \fIsticky\fR when you use it to create a private copy of a source file; that is, when you use this option with the \fBcheckout\fR or \fBupdate\fR commands, \fBcvs\fR associates your selected \fIkflag\fR with the file, and continues to use it with future update commands on the same file until you specify otherwise. .SP The \fB-k\fR option is available with the \fBadd\fR, \fBcheckout\fR, \fBdiff\fR, \fBrdiff\fR, \fBimport\fR and \fBupdate\fR commands. .SP .IP "" 0 \fB-l\fR .IP "" 2 Local; run only in current working directory, rather than recursing through subdirectories. .SP Available with the following commands: \fBannotate\fR, \fBcheckout\fR, \fBcommit\fR, \fBdiff\fR, \fBedit\fR, \fBeditors\fR, \fBexport\fR, \fBlog\fR, \fBrdiff\fR, \fBremove\fR, \fBrtag\fR, \fBstatus\fR, \fBtag\fR, \fBunedit\fR, \fBupdate\fR, \fBwatch\fR, and \fBwatchers\fR. .SP .IX "Editor, avoiding invocation of" .IX "Avoiding editor invocation" .IP "" 0 \fB-m \fImessage\fB\fR .IP "" 2 Use \fImessage\fR as log information, instead of invoking an editor. .SP Available with the following commands: \fBadd\fR, \fBcommit\fR and \fBimport\fR. .SP .IP "" 0 \fB-n\fR .IP "" 2 Do not run any tag program. (A program can be specified to run in the modules database (see node `modules\(aq in the CVS manual); this option bypasses it). .SP \fBThis is not the same as the \fBcvs -n\fB program option, which you can specify to the left of a cvs command!\fR .SP Available with the \fBcheckout\fR, \fBexport\fR, and \fBrtag\fR commands. .SP .IP "" 0 \fB-P\fR .IP "" 2 Prune empty directories. See `Removing directories\(aq in the CVS manual. .SP .IP "" 0 \fB-p\fR .IP "" 2 Pipe the files retrieved from the repository to standard output, rather than writing them in the current directory. Available with the \fBcheckout\fR and \fBupdate\fR commands. .SP .IP "" 0 \fB-R\fR .IP "" 2 Process directories recursively. This is on by default. .SP Available with the following commands: \fBannotate\fR, \fBcheckout\fR, \fBcommit\fR, \fBdiff\fR, \fBedit\fR, \fBeditors\fR, \fBexport\fR, \fBrdiff\fR, \fBremove\fR, \fBrtag\fR, \fBstatus\fR, \fBtag\fR, \fBunedit\fR, \fBupdate\fR, \fBwatch\fR, and \fBwatchers\fR. .SP .IP "" 0 \fB-r \fItag\fB\fR .IP "" 2 .IX "HEAD, special tag" .IX "BASE, special tag" Use the revision specified by the \fItag\fR argument instead of the default \fIhead\fR revision. As well as arbitrary tags defined with the \fBtag\fR or \fBrtag\fR command, two special tags are always available: \fBHEAD\fR refers to the most recent version available in the repository, and \fBBASE\fR refers to the revision you last checked out into the current working directory. .SP The tag specification is sticky when you use this with \fBcheckout\fR or \fBupdate\fR to make your own copy of a file: \fBcvs\fR remembers the tag and continues to use it on future update commands, until you specify otherwise (for more information on sticky tags/dates, see node `Sticky tags\(aq in the CVS manual). .SP The tag can be either a symbolic or numeric tag, as described in `Tags\(aq in the CVS manual, or the name of a branch, as described in `Branching and merging\(aq in the CVS manual. When a command expects a specific revision, the name of a branch is interpreted as the most recent revision on that branch. .SP Specifying the \fB-q\fR global option along with the \fB-r\fR command option is often useful, to suppress the warning messages when the \fBrcs\fR file does not contain the specified tag. .SP \fBThis is not the same as the overall \fBcvs -r\fB option, which you can specify to the left of a \fBcvs\fB command!\fR .SP \fB-r\fR is available with the \fBannotate\fR, \fBcheckout\fR, \fBcommit\fR, \fBdiff\fR, \fBhistory\fR, \fBexport\fR, \fBrdiff\fR, \fBrtag\fR, and \fBupdate\fR commands. .SP .IP "" 0 \fB-W\fR .IP "" 2 Specify file names that should be filtered. You can use this option repeatedly. The spec can be a file name pattern of the same type that you can specify in the \fB.cvswrappers\fR file. Available with the following commands: \fBimport\fR, and \fBupdate\fR. .SP .SP .SH "add" .SS "Add files and directories to the repository" .IX "add (subcommand)" .SP .IP "\(bu" 2 Synopsis: add [-k rcs-kflag] [-m message] files... .IP "\(bu" 2 Requires: repository, working directory. .IP "\(bu" 2 Changes: repository, working directory. .SP The \fBadd\fR command is used to present new files and directories for addition into the \fBcvs\fR repository. When \fBadd\fR is used on a directory, a new directory is created in the repository immediately. When used on a file, only the working directory is updated. Changes to the repository are not made until the \fBcommit\fR command is used on the newly added file. .SP The \fBadd\fR command also resurrects files that have been previously removed. This can be done before or after the \fBcommit\fR command is used to finalize the removal of files. Resurrected files are restored into the working directory at the time the \fBadd\fR command is executed. .SP .SH "add options" .SP These standard options are supported by \fBadd\fR (see node `Common options\(aq in the CVS manual, for a complete description of them): .SP .IP "" 0 \fB-k \fIkflag\fB\fR .IP "" 2 Process keywords according to \fIkflag\fR. See `Keyword substitution\(aq in the CVS manual. This option is sticky; future updates of this file in this working directory will use the same \fIkflag\fR. The \fBstatus\fR command can be viewed to see the sticky options. For more information on the \fBstatus\fR command, see node `Invoking CVS\(aq in the CVS manual. .SP .IP "" 0 \fB-m \fImessage\fB\fR .IP "" 2 Use \fImessage\fR as the log message, instead of invoking an editor. .SP .SH "add examples" .SP .SS "Adding a directory" .SP .PD 0 .SP .IP "" 2 $ mkdir doc .IP "" 2 $ cvs add doc .IP "" 2 Directory /path/to/repository/doc added to the repository .PD .IP "" 0 .SP .SS "Adding a file" .SP .PD 0 .SP .SP .IP "" 2 $ >TODO .IP "" 2 $ cvs add TODO .IP "" 2 cvs add: scheduling file \`TODO\(aq for addition .IP "" 2 cvs add: use \(aqcvs commit\(aq to add this file permanently .PD .IP "" 0 .SP .SS "Undoing a \fBremove\fR command" .SP .PD 0 .SP .IP "" 2 $ rm -f makefile .IP "" 2 $ cvs remove makefile .IP "" 2 cvs remove: scheduling \`makefile\(aq for removal .IP "" 2 cvs remove: use \(aqcvs commit\(aq to remove this file permanently .IP "" 2 $ cvs add makefile .IP "" 2 U makefile .IP "" 2 cvs add: makefile, version 1.2, resurrected .PD .IP "" 0 .SP .SH "admin" .SS "Administration" .IX "Admin (subcommand)" .SP .IP "\(bu" 2 Requires: repository, working directory. .IP "\(bu" 2 Changes: repository. .IP "\(bu" 2 Synonym: rcs .SP This is the \fBcvs\fR interface to assorted administrative facilities. Some of them have questionable usefulness for \fBcvs\fR but exist for historical purposes. Some of the questionable options are likely to disappear in the future. This command \fIdoes\fR work recursively, so extreme care should be used. .SP .IX "cvsadmin" On unix, if there is a group named \fBcvsadmin\fR, only members of that group can run \fBcvs admin\fR (except for the \fBcvs admin -k\fR command, which can be run by anybody). This group should exist on the server, or any system running the non-client/server \fBcvs\fR. To disallow \fBcvs admin\fR for all users, create a group with no users in it. On NT, the \fBcvsadmin\fR feature does not exist and all users can run \fBcvs admin\fR. .SP .SH "admin options" .SP Some of these options have questionable usefulness for \fBcvs\fR but exist for historical purposes. Some even make it impossible to use \fBcvs\fR until you undo the effect! .SP .IP "" 0 \fB-A\fIoldfile\fB\fR .IP "" 2 Might not work together with \fBcvs\fR. Append the access list of \fIoldfile\fR to the access list of the \fBrcs\fR file. .SP .IP "" 0 \fB-a\fIlogins\fB\fR .IP "" 2 Might not work together with \fBcvs\fR. Append the login names appearing in the comma-separated list \fIlogins\fR to the access list of the \fBrcs\fR file. .SP .IP "" 0 \fB-b[\fIrev\fB]\fR .IP "" 2 Set the default branch to \fIrev\fR. In \fBcvs\fR, you normally do not manipulate default branches; sticky tags (see node `Sticky tags\(aq in the CVS manual) are a better way to decide which branch you want to work on. There is one reason to run \fBcvs admin -b\fR: to revert to the vendor\(aqs version when using vendor branches (see node `Reverting local changes\(aq in the CVS manual). There can be no space between \fB-b\fR and its argument. .SP .IX "Comment leader" .IP "" 0 \fB-c\fIstring\fB\fR .IP "" 2 Sets the comment leader to \fIstring\fR. The comment leader is not used by current versions of \fBcvs\fR or \fBrcs\fR 5.7. Therefore, you can almost surely not worry about it. See `Keyword substitution\(aq in the CVS manual. .SP .IP "" 0 \fB-e[\fIlogins\fB]\fR .IP "" 2 Might not work together with \fBcvs\fR. Erase the login names appearing in the comma-separated list \fIlogins\fR from the access list of the RCS file. If \fIlogins\fR is omitted, erase the entire access list. There can be no space between \fB-e\fR and its argument. .SP .IP "" 0 \fB-I\fR .IP "" 2 Run interactively, even if the standard input is not a terminal. This option does not work with the client/server \fBcvs\fR and is likely to disappear in a future release of \fBcvs\fR. .SP .IP "" 0 \fB-i\fR .IP "" 2 Useless with \fBcvs\fR. This creates and initializes a new \fBrcs\fR file, without depositing a revision. With \fBcvs\fR, add files with the \fBcvs add\fR command (see node `Adding files\(aq in the CVS manual). .SP .IP "" 0 \fB-k\fIsubst\fB\fR .IP "" 2 Set the default keyword substitution to \fIsubst\fR. See `Keyword substitution\(aq in the CVS manual. Giving an explicit \fB-k\fR option to \fBcvs update\fR, \fBcvs export\fR, or \fBcvs checkout\fR overrides this default. .SP .IP "" 0 \fB-l[\fIrev\fB]\fR .IP "" 2 Lock the revision with number \fIrev\fR. If a branch is given, lock the latest revision on that branch. If \fIrev\fR is omitted, lock the latest revision on the default branch. There can be no space between \fB-l\fR and its argument. .SP This can be used in conjunction with the \fBrcslock.pl\fR script in the \fBcontrib\fR directory of the \fBcvs\fR source distribution to provide reserved checkouts (where only one user can be editing a given file at a time). See the comments in that file for details (and see the \fBREADME\fR file in that directory for disclaimers about the unsupported nature of contrib). According to comments in that file, locking must set to strict (which is the default). .SP .IP "" 0 \fB-L\fR .IP "" 2 Set locking to strict. Strict locking means that the owner of an RCS file is not exempt from locking for checkin. For use with \fBcvs\fR, strict locking must be set; see the discussion under the \fB-l\fR option above. .SP .IX "Changing a log message" .IX "Replacing a log message" .IX "Correcting a log message" .IX "Fixing a log message" .IX "Log message, correcting" .IP "" 0 \fB-m\fIrev\fB:\fImsg\fB\fR .IP "" 2 Replace the log message of revision \fIrev\fR with \fImsg\fR. .SP .IP "" 0 \fB-N\fIname\fB[:[\fIrev\fB]]\fR .IP "" 2 Act like \fB-n\fR, except override any previous assignment of \fIname\fR. For use with magic branches, see `Magic branch numbers\(aq in the CVS manual. .SP .IP "" 0 \fB-n\fIname\fB[:[\fIrev\fB]]\fR .IP "" 2 Associate the symbolic name \fIname\fR with the branch or revision \fIrev\fR. It is normally better to use \fBcvs tag\fR or \fBcvs rtag\fR instead. Delete the symbolic name if both \fB:\fR and \fIrev\fR are omitted; otherwise, print an error message if \fIname\fR is already associated with another number. If \fIrev\fR is symbolic, it is expanded before association. A \fIrev\fR consisting of a branch number followed by a \fB.\fR stands for the current latest revision in the branch. A \fB:\fR with an empty \fIrev\fR stands for the current latest revision on the default branch, normally the trunk. For example, \fBcvs admin -n\fIname\fB:\fR associates \fIname\fR with the current latest revision of all the RCS files; this contrasts with \fBcvs admin -n\fIname\fB:$\fR which associates \fIname\fR with the revision numbers extracted from keyword strings in the corresponding working files. .SP .IX "Deleting revisions" .IX "Outdating revisions" .IX "Saving space" .IP "" 0 \fB-o\fIrange\fB\fR .IP "" 2 Deletes (\fIoutdates\fR) the revisions given by \fIrange\fR. .SP Note that this command can be quite dangerous unless you know \fIexactly\fR what you are doing (for example see the warnings below about how the \fIrev1\fR:\fIrev2\fR syntax is confusing). .SP If you are short on disc this option might help you. But think twice before using it\(emthere is no way short of restoring the latest backup to undo this command! If you delete different revisions than you planned, either due to carelessness or (heaven forbid) a \fBcvs\fR bug, there is no opportunity to correct the error before the revisions are deleted. It probably would be a good idea to experiment on a copy of the repository first. .SP Specify \fIrange\fR in one of the following ways: .SP .IP "" 2 \fB\fIrev1\fB::\fIrev2\fB\fR .IP "" 4 Collapse all revisions between rev1 and rev2, so that \fBcvs\fR only stores the differences associated with going from rev1 to rev2, not intermediate steps. For example, after \fB-o 1.3::1.5\fR one can retrieve revision 1.3, revision 1.5, or the differences to get from 1.3 to 1.5, but not the revision 1.4, or the differences between 1.3 and 1.4. Other examples: \fB-o 1.3::1.4\fR and \fB-o 1.3::1.3\fR have no effect, because there are no intermediate revisions to remove. .SP .IP "" 2 \fB::\fIrev\fB\fR .IP "" 4 Collapse revisions between the beginning of the branch containing \fIrev\fR and \fIrev\fR itself. The branchpoint and \fIrev\fR are left intact. For example, \fB-o ::1.3.2.6\fR deletes revision 1.3.2.1, revision 1.3.2.5, and everything in between, but leaves 1.3 and 1.3.2.6 intact. .SP .IP "" 2 \fB\fIrev\fB::\fR .IP "" 4 Collapse revisions between \fIrev\fR and the end of the branch containing \fIrev\fR. Revision \fIrev\fR is left intact but the head revision is deleted. .SP .IP "" 2 \fB\fIrev\fB\fR .IP "" 4 Delete the revision \fIrev\fR. For example, \fB-o 1.3\fR is equivalent to \fB-o 1.2::1.4\fR. .SP .IP "" 2 \fB\fIrev1\fB:\fIrev2\fB\fR .IP "" 4 Delete the revisions from \fIrev1\fR to \fIrev2\fR, inclusive, on the same branch. One will not be able to retrieve \fIrev1\fR or \fIrev2\fR or any of the revisions in between. For example, the command \fBcvs admin -oR_1_01:R_1_02 \&.\fR is rarely useful. It means to delete revisions up to, and including, the tag R_1_02. But beware! If there are files that have not changed between R_1_02 and R_1_03 the file will have \fIthe same\fR numerical revision number assigned to the tags R_1_02 and R_1_03. So not only will it be impossible to retrieve R_1_02; R_1_03 will also have to be restored from the tapes! In most cases you want to specify \fIrev1\fR::\fIrev2\fR instead. .SP .IP "" 2 \fB:\fIrev\fB\fR .IP "" 4 Delete revisions from the beginning of the branch containing \fIrev\fR up to and including \fIrev\fR. .SP .IP "" 2 \fB\fIrev\fB:\fR .IP "" 4 Delete revisions from revision \fIrev\fR, including \fIrev\fR itself, to the end of the branch containing \fIrev\fR. .SP None of the revisions to be deleted may have branches or locks. .SP If any of the revisions to be deleted have symbolic names, and one specifies one of the \fB::\fR syntaxes, then \fBcvs\fR will give an error and not delete any revisions. If you really want to delete both the symbolic names and the revisions, first delete the symbolic names with \fBcvs tag -d\fR, then run \fBcvs admin -o\fR. If one specifies the non-\fB::\fR syntaxes, then \fBcvs\fR will delete the revisions but leave the symbolic names pointing to nonexistent revisions. This behavior is preserved for compatibility with previous versions of \fBcvs\fR, but because it isn\(aqt very useful, in the future it may change to be like the \fB::\fR case. .SP Due to the way \fBcvs\fR handles branches \fIrev\fR cannot be specified symbolically if it is a branch. See `Magic branch numbers\(aq in the CVS manual for an explanation. .SP Make sure that no-one has checked out a copy of the revision you outdate. Strange things will happen if he starts to edit it and tries to check it back in. For this reason, this option is not a good way to take back a bogus commit; commit a new revision undoing the bogus change instead (see node `Merging two revisions\(aq in the CVS manual). .SP .IP "" 0 \fB-q\fR .IP "" 2 Run quietly; do not print diagnostics. .SP .IP "" 0 \fB-s\fIstate\fB[:\fIrev\fB]\fR .IP "" 2 Useful with \fBcvs\fR. Set the state attribute of the revision \fIrev\fR to \fIstate\fR. If \fIrev\fR is a branch number, assume the latest revision on that branch. If \fIrev\fR is omitted, assume the latest revision on the default branch. Any identifier is acceptable for \fIstate\fR. A useful set of states is \fBExp\fR (for experimental), \fBStab\fR (for stable), and \fBRel\fR (for released). By default, the state of a new revision is set to \fBExp\fR when it is created. The state is visible in the output from \fIcvs log\fR (see node `log\(aq in the CVS manual), and in the \fB$\fP\fPLog$\fR and \fB$\fP\fPState$\fR keywords (see node `Keyword substitution\(aq in the CVS manual). Note that \fBcvs\fR uses the \fBdead\fR state for its own purposes (see node `Attic\(aq in the CVS manual); to take a file to or from the \fBdead\fR state use commands like \fBcvs remove\fR and \fBcvs add\fR (see node `Adding and removing\(aq in the CVS manual), not \fBcvs admin -s\fR. .SP .IP "" 0 \fB-t[\fIfile\fB]\fR .IP "" 2 Useful with \fBcvs\fR. Write descriptive text from the contents of the named \fIfile\fR into the RCS file, deleting the existing text. The \fIfile\fR pathname may not begin with \fB-\fR. The descriptive text can be seen in the output from \fBcvs log\fR (see node `log\(aq in the CVS manual). There can be no space between \fB-t\fR and its argument. .SP If \fIfile\fR is omitted, obtain the text from standard input, terminated by end-of-file or by a line containing \fB.\fR by itself. Prompt for the text if interaction is possible; see \fB-I\fR. .SP .IP "" 0 \fB-t-\fIstring\fB\fR .IP "" 2 Similar to \fB-t\fIfile\fB\fR. Write descriptive text from the \fIstring\fR into the \fBrcs\fR file, deleting the existing text. There can be no space between \fB-t\fR and its argument. .SP .IP "" 0 \fB-U\fR .IP "" 2 Set locking to non-strict. Non-strict locking means that the owner of a file need not lock a revision for checkin. For use with \fBcvs\fR, strict locking must be set; see the discussion under the \fB-l\fR option above. .SP .IP "" 0 \fB-u[\fIrev\fB]\fR .IP "" 2 See the option \fB-l\fR above, for a discussion of using this option with \fBcvs\fR. Unlock the revision with number \fIrev\fR. If a branch is given, unlock the latest revision on that branch. If \fIrev\fR is omitted, remove the latest lock held by the caller. Normally, only the locker of a revision may unlock it; somebody else unlocking a revision breaks the lock. This causes the original locker to be sent a \fBcommit\fR notification (see node `Getting Notified\(aq in the CVS manual). There can be no space between \fB-u\fR and its argument. .SP .IP "" 0 \fB-V\fIn\fB\fR .IP "" 2 In previous versions of \fBcvs\fR, this option meant to write an \fBrcs\fR file which would be acceptable to \fBrcs\fR version \fIn\fR, but it is now obsolete and specifying it will produce an error. .SP .IP "" 0 \fB-x\fIsuffixes\fB\fR .IP "" 2 In previous versions of \fBcvs\fR, this was documented as a way of specifying the names of the \fBrcs\fR files. However, \fBcvs\fR has always required that the \fBrcs\fR files used by \fBcvs\fR end in \fB,v\fR, so this option has never done anything useful. .SP .SP .SH "annotate" .SS "What revision modified each line of a file?" .IX "annotate (subcommand)" .SP .IP "\(bu" 2 Synopsis: annotate [options] files\&... .IP "\(bu" 2 Requires: repository. .IP "\(bu" 2 Synonym: blame .IP "\(bu" 2 Changes: nothing. .SP For each file in \fIfiles\fR, print the head revision of the trunk, together with information on the last modification for each line. .SP .SH "annotate options" .SP These standard options are supported by \fBannotate\fR (see node `Common options\(aq in the CVS manual for a complete description of them): .SP .IP "" 0 \fB-l\fR .IP "" 2 Local directory only, no recursion. .SP .IP "" 0 \fB-R\fR .IP "" 2 Process directories recursively. .SP .IP "" 0 \fB-f\fR .IP "" 2 Use head revision if tag/date not found. .SP .IP "" 0 \fB-F\fR .IP "" 2 Annotate binary files. .SP .IP "" 0 \fB-r \fIrevision\fB\fR .IP "" 2 Annotate file as of specified revision/tag. .SP .IP "" 0 \fB-D \fIdate\fB\fR .IP "" 2 Annotate file as of specified date. .SP .SH "annotate example" .SP For example: .SP .PD 0 .SP .IP "" 2 $ cvs annotate ssfile .IP "" 2 Annotations for ssfile .IP "" 2 *************** .IP "" 2 1.1 (mary 27-Mar-96): ssfile line 1 .IP "" 2 1.2 (joe 28-Mar-96): ssfile line 2 .PD .IP "" 0 .SP The file \fBssfile\fR currently contains two lines. The \fBssfile line 1\fR line was checked in by \fBmary\fR on March 27. Then, on March 28, \fBjoe\fR added a line \fBssfile line 2\fR, without modifying the \fBssfile line 1\fR line. This report doesn\(aqt tell you anything about lines which have been deleted or replaced; you need to use \fBcvs diff\fR for that (see node `diff\(aq in the CVS manual). .SP The options to \fBcvs annotate\fR are listed in `Invoking CVS\(aq in the CVS manual, and can be used to select the files and revisions to annotate. The options are described in more detail there and in `Common options\(aq in the CVS manual. .SP .SH "checkout" .SS "Check out sources for editing" .IX "checkout (subcommand)" .IX "co (subcommand)" .SP .IP "\(bu" 2 Synopsis: checkout [options] modules\&... .IP "\(bu" 2 Requires: repository. .IP "\(bu" 2 Changes: working directory. .IP "\(bu" 2 Synonyms: co, get .SP Create or update a working directory containing copies of the source files specified by \fImodules\fR. You must execute \fBcheckout\fR before using most of the other \fBcvs\fR commands, since most of them operate on your working directory. .SP The \fImodules\fR are either symbolic names for some collection of source directories and files, or paths to directories or files in the repository. The symbolic names are defined in the \fBmodules\fR file. See `modules\(aq in the CVS manual. .SP Depending on the modules you specify, \fBcheckout\fR may recursively create directories and populate them with the appropriate source files. You can then edit these source files at any time (regardless of whether other software developers are editing their own copies of the sources); update them to include new changes applied by others to the source repository; or commit your work as a permanent change to the source repository. .SP Note that \fBcheckout\fR is used to create directories. The top-level directory created is always added to the directory where \fBcheckout\fR is invoked, and usually has the same name as the specified module. In the case of a module alias, the created sub-directory may have a different name, but you can be sure that it will be a sub-directory, and that \fBcheckout\fR will show the relative path leading to each file as it is extracted into your private work area (unless you specify the \fB-Q\fR global option). .SP The files created by \fBcheckout\fR are created read-write, unless the \fB-r\fR option to \fBcvs\fR (see node `Global options\(aq in the CVS manual) is specified, the \fBCVSREAD\fR environment variable is specified (see node `Environment variables\(aq in the CVS manual), or a watch is in effect for that file (see node `Watches\(aq in the CVS manual). .SP Note that running \fBcheckout\fR on a directory that was already built by a prior \fBcheckout\fR is also permitted. This is similar to specifying the \fB-d\fR option to the \fBupdate\fR command in the sense that new directories that have been created in the repository will appear in your work area. However, \fBcheckout\fR takes a module name whereas \fBupdate\fR takes a directory name. Also to use \fBcheckout\fR this way it must be run from the top level directory (where you originally ran \fBcheckout\fR from), so before you run \fBcheckout\fR to update an existing directory, don\(aqt forget to change your directory to the top level directory. .SP For the output produced by the \fBcheckout\fR command, see node `update output\(aq in the CVS manual. .SP .SH "checkout options" .SP These standard options are supported by \fBcheckout\fR (see node `Common options\(aq in the CVS manual for a complete description of them): .SP .IP "" 0 \fB-D \fIdate\fB\fR .IP "" 2 Use the most recent revision no later than \fIdate\fR. This option is sticky, and implies \fB-P\fR. See `Sticky tags\(aq in the CVS manual for more information on sticky tags/dates. .SP .IP "" 0 \fB-f\fR .IP "" 2 Only useful with the \fB-D \fIdate\fB\fR or \fB-r \fItag\fB\fR flags. If no matching revision is found, retrieve the most recent revision (instead of ignoring the file). .SP .IP "" 0 \fB-k \fIkflag\fB\fR .IP "" 2 Process keywords according to \fIkflag\fR. See `Keyword substitution\(aq in the CVS manual. This option is sticky; future updates of this file in this working directory will use the same \fIkflag\fR. The \fBstatus\fR command can be viewed to see the sticky options. See `Invoking CVS\(aq in the CVS manual for more information on the \fBstatus\fR command. .SP .IP "" 0 \fB-l\fR .IP "" 2 Local; run only in current working directory. .SP .IP "" 0 \fB-n\fR .IP "" 2 Do not run any checkout program (as specified with the \fB-o\fR option in the modules file; see node `modules\(aq in the CVS manual). .SP .IP "" 0 \fB-P\fR .IP "" 2 Prune empty directories. See `Moving directories\(aq in the CVS manual. .SP .IP "" 0 \fB-p\fR .IP "" 2 Pipe files to the standard output. .SP .IP "" 0 \fB-R\fR .IP "" 2 Checkout directories recursively. This option is on by default. .SP .IP "" 0 \fB-r \fItag\fB\fR .IP "" 2 Use revision \fItag\fR. This option is sticky, and implies \fB-P\fR. See `Sticky tags\(aq in the CVS manual, for more information on sticky tags/dates. .SP In addition to those, you can use these special command options with \fBcheckout\fR: .SP .IP "" 0 \fB-A\fR .IP "" 2 Reset any sticky tags, dates, or \fB-k\fR options. Does not reset sticky \fB-k\fR options on modified files. See `Sticky tags\(aq in the CVS manual for more information on sticky tags/dates. .SP .IP "" 0 \fB-c\fR .IP "" 2 Copy the module file, sorted, to the standard output, instead of creating or modifying any files or directories in your working directory. .SP .IP "" 0 \fB-d \fIdir\fB\fR .IP "" 2 Create a directory called \fIdir\fR for the working files, instead of using the module name. In general, using this flag is equivalent to using \fBmkdir \fIdir\fB; cd \fIdir\fB\fR followed by the checkout command without the \fB-d\fR flag. .SP There is an important exception, however. It is very convenient when checking out a single item to have the output appear in a directory that doesn\(aqt contain empty intermediate directories. In this case \fIonly\fR, \fBcvs\fR tries to \`\`shorten\(aq\(aq pathnames to avoid those empty directories. .SP For example, given a module \fBfoo\fR that contains the file \fBbar.c\fR, the command \fBcvs co -d dir foo\fR will create directory \fBdir\fR and place \fBbar.c\fR inside. Similarly, given a module \fBbar\fR which has subdirectory \fBbaz\fR wherein there is a file \fBquux.c\fR, the command \fBcvs co -d dir bar/baz\fR will create directory \fBdir\fR and place \fBquux.c\fR inside. .SP Using the \fB-N\fR flag will defeat this behavior. Given the same module definitions above, \fBcvs co -N -d dir foo\fR will create directories \fBdir/foo\fR and place \fBbar.c\fR inside, while \fBcvs co -N -d dir bar/baz\fR will create directories \fBdir/bar/baz\fR and place \fBquux.c\fR inside. .SP .IP "" 0 \fB-j \fItag\fB\fR .IP "" 2 With two \fB-j\fR options, merge changes from the revision specified with the first \fB-j\fR option to the revision specified with the second \fBj\fR option, into the working directory. .SP With one \fB-j\fR option, merge changes from the ancestor revision to the revision specified with the \fB-j\fR option, into the working directory. The ancestor revision is the common ancestor of the revision which the working directory is based on, and the revision specified in the \fB-j\fR option. .SP In addition, each -j option can contain an optional date specification which, when used with branches, can limit the chosen revision to one within a specific date. An optional date is specified by adding a colon (:) to the tag: \fB-j\fISymbolic_Tag\fB:\fIDate_Specifier\fB\fR. .SP See `Branching and merging\(aq in the CVS manual. .SP .IP "" 0 \fB-N\fR .IP "" 2 Only useful together with \fB-d \fIdir\fB\fR. With this option, \fBcvs\fR will not \`\`shorten\(aq\(aq module paths in your working directory when you check out a single module. See the \fB-d\fR flag for examples and a discussion. .SP .IP "" 0 \fB-s\fR .IP "" 2 Like \fB-c\fR, but include the status of all modules, and sort it by the status string. See `modules\(aq in the CVS manual, for info about the \fB-s\fR option that is used inside the modules file to set the module status. .SP .SH "checkout examples" .SP Get a copy of the module \fBtc\fR: .SP .PD 0 .SP .IP "" 2 $ cvs checkout tc .PD .IP "" 0 .SP Get a copy of the module \fBtc\fR as it looked one day ago: .SP .PD 0 .SP .IP "" 2 $ cvs checkout -D yesterday tc .PD .IP "" 0 .SP .SH "commit" .SS "Check files into the repository" .IX "commit (subcommand)" .SP .IP "\(bu" 2 Synopsis: commit [-lRf] [-m \(aqlog_message\(aq | -F file] [-r revision] [files\&...] .IP "\(bu" 2 Requires: working directory, repository. .IP "\(bu" 2 Changes: repository. .IP "\(bu" 2 Synonym: ci .SP Use \fBcommit\fR when you want to incorporate changes from your working source files into the source repository. .SP If you don\(aqt specify particular files to commit, all of the files in your working current directory are examined. \fBcommit\fR is careful to change in the repository only those files that you have really changed. By default (or if you explicitly specify the \fB-R\fR option), files in subdirectories are also examined and committed if they have changed; you can use the \fB-l\fR option to limit \fBcommit\fR to the current directory only. .SP \fBcommit\fR verifies that the selected files are up to date with the current revisions in the source repository; it will notify you, and exit without committing, if any of the specified files must be made current first with \fBupdate\fR (see node `update\(aq in the CVS manual). \fBcommit\fR does not call the \fBupdate\fR command for you, but rather leaves that for you to do when the time is right. .SP When all is well, an editor is invoked to allow you to enter a log message that will be written to one or more logging programs (see node `modules\(aq in the CVS manual, and see node `loginfo\(aq in the CVS manual) and placed in the \fBrcs\fR file inside the repository. This log message can be retrieved with the \fBlog\fR command; see node `log\(aq in the CVS manual. You can specify the log message on the command line with the \fB-m \fImessage\fB\fR option, and thus avoid the editor invocation, or use the \fB-F \fIfile\fB\fR option to specify that the argument file contains the log message. .SP .SH "commit options" .SP These standard options are supported by \fBcommit\fR (see node `Common options\(aq in the CVS manual for a complete description of them): .SP .IP "" 0 \fB-l\fR .IP "" 2 Local; run only in current working directory. .SP .IP "" 0 \fB-R\fR .IP "" 2 Commit directories recursively. This is on by default. .SP .IP "" 0 \fB-r \fIrevision\fB\fR .IP "" 2 Commit to \fIrevision\fR. \fIrevision\fR must be either a branch, or a revision on the main trunk that is higher than any existing revision number (see node `Assigning revisions\(aq in the CVS manual). You cannot commit to a specific revision on a branch. .SP \fBcommit\fR also supports these options: .SP .IP "" 0 \fB-F \fIfile\fB\fR .IP "" 2 Read the log message from \fIfile\fR, instead of invoking an editor. .SP .IP "" 0 \fB-f\fR .IP "" 2 Note that this is not the standard behavior of the \fB-f\fR option as defined in `Common options\(aq in the CVS manual. .SP Force \fBcvs\fR to commit a new revision even if you haven\(aqt made any changes to the file. If the current revision of \fIfile\fR is 1.7, then the following two commands are equivalent: .SP .PD 0 .SP .IP "" 4 $ cvs commit -f \fIfile\fR .IP "" 4 $ cvs commit -r 1.8 \fIfile\fR .PD .IP "" 2 .SP The \fB-f\fR option disables recursion (i.e., it implies \fB-l\fR). To force \fBcvs\fR to commit a new revision for all files in all subdirectories, you must use \fB-f -R\fR. .SP .IP "" 0 \fB-m \fImessage\fB\fR .IP "" 2 Use \fImessage\fR as the log message, instead of invoking an editor. .SP .SH "commit examples" .SP .SS "Committing to a branch" .SP You can commit to a branch revision (one that has an even number of dots) with the \fB-r\fR option. To create a branch revision, use the \fB-b\fR option of the \fBrtag\fR or \fBtag\fR commands (see node `Branching and merging\(aq in the CVS manual). Then, either \fBcheckout\fR or \fBupdate\fR can be used to base your sources on the newly created branch. From that point on, all \fBcommit\fR changes made within these working sources will be automatically added to a branch revision, thereby not disturbing main-line development in any way. For example, if you had to create a patch to the 1.2 version of the product, even though the 2.0 version is already under development, you might do: .SP .PD 0 .SP .IP "" 2 $ cvs rtag -b -r FCS1_2 FCS1_2_Patch product_module .IP "" 2 $ cvs checkout -r FCS1_2_Patch product_module .IP "" 2 $ cd product_module .IP "" 2 [[ hack away ]] .IP "" 2 $ cvs commit .PD .IP "" 0 .SP This works automatically since the \fB-r\fR option is sticky. .SP .SS "Creating the branch after editing" .SP Say you have been working on some extremely experimental software, based on whatever revision you happened to checkout last week. If others in your group would like to work on this software with you, but without disturbing main-line development, you could commit your change to a new branch. Others can then checkout your experimental stuff and utilize the full benefit of \fBcvs\fR conflict resolution. The scenario might look like: .SP .PD 0 .SP .IP "" 2 [[ hacked sources are present ]] .IP "" 2 $ cvs tag -b EXPR1 .IP "" 2 $ cvs update -r EXPR1 .IP "" 2 $ cvs commit .PD .IP "" 0 .SP The \fBupdate\fR command will make the \fB-r EXPR1\fR option sticky on all files. Note that your changes to the files will never be removed by the \fBupdate\fR command. The \fBcommit\fR will automatically commit to the correct branch, because the \fB-r\fR is sticky. You could also do like this: .SP .PD 0 .SP .IP "" 2 [[ hacked sources are present ]] .IP "" 2 $ cvs tag -b EXPR1 .IP "" 2 $ cvs commit -r EXPR1 .PD .IP "" 0 .SP but then, only those files that were changed by you will have the \fB-r EXPR1\fR sticky flag. If you hack away, and commit without specifying the \fB-r EXPR1\fR flag, some files may accidentally end up on the main trunk. .SP To work with you on the experimental change, others would simply do .SP .PD 0 .SP .IP "" 2 $ cvs checkout -r EXPR1 whatever_module .PD .IP "" 0 .SP .SH "diff" .SS "Show differences between revisions" .IX "diff (subcommand)" .SP .IP "\(bu" 2 Synopsis: diff [-lR] [-k kflag] [format_options] [[-r rev1 | -D date1] [-r rev2 | -D date2]] [files\&...] .IP "\(bu" 2 Requires: working directory, repository. .IP "\(bu" 2 Changes: nothing. .SP The \fBdiff\fR command is used to compare different revisions of files. The default action is to compare your working files with the revisions they were based on, and report any differences that are found. .SP If any file names are given, only those files are compared. If any directories are given, all files under them will be compared. .SP The exit status for diff is different than for other \fBcvs\fR commands; for details see node `Exit status\(aq in the CVS manual. .SP .SH "diff options" .SP These standard options are supported by \fBdiff\fR (see node `Common options\(aq in the CVS manual for a complete description of them): .SP .IP "" 0 \fB-D \fIdate\fB\fR .IP "" 2 Use the most recent revision no later than \fIdate\fR. See \fB-r\fR for how this affects the comparison. .SP .IP "" 0 \fB-k \fIkflag\fB\fR .IP "" 2 Process keywords according to \fIkflag\fR. See `Keyword substitution\(aq in the CVS manual. .SP .IP "" 0 \fB-l\fR .IP "" 2 Local; run only in current working directory. .SP .IP "" 0 \fB-R\fR .IP "" 2 Examine directories recursively. This option is on by default. .SP .IP "" 0 \fB-r \fItag\fB\fR .IP "" 2 Compare with revision \fItag\fR. Zero, one or two \fB-r\fR options can be present. With no \fB-r\fR option, the working file will be compared with the revision it was based on. With one \fB-r\fR, that revision will be compared to your current working file. With two \fB-r\fR options those two revisions will be compared (and your working file will not affect the outcome in any way). .SP One or both \fB-r\fR options can be replaced by a \fB-D \fIdate\fB\fR option, described above. .SP The following options specify the format of the output. They have the same meaning as in GNU diff. Most options have two equivalent names, one of which is a single letter preceded by \fB-\fR, and the other of which is a long name preceded by \fB--\fR. .SP .IP "" 0 \fB-\fIlines\fB\fR .IP "" 2 Show \fIlines\fR (an integer) lines of context. This option does not specify an output format by itself; it has no effect unless it is combined with \fB-c\fR or \fB-u\fR. This option is obsolete. For proper operation, \fBpatch\fR typically needs at least two lines of context. .SP .IP "" 0 \fB-a\fR .IP "" 2 Treat all files as text and compare them line-by-line, even if they do not seem to be text. .SP .IP "" 0 \fB-b\fR .IP "" 2 Ignore trailing white space and consider all other sequences of one or more white space characters to be equivalent. .SP .IP "" 0 \fB-B\fR .IP "" 2 Ignore changes that just insert or delete blank lines. .SP .IP "" 0 \fB--binary\fR .IP "" 2 Read and write data in binary mode. .SP .IP "" 0 \fB--brief\fR .IP "" 2 Report only whether the files differ, not the details of the differences. .SP .IP "" 0 \fB-c\fR .IP "" 2 Use the context output format. .SP .IP "" 0 \fB-C \fIlines\fB\fR .IP "" 2 .IP "" 0 \fB--context\fR[\fB=\fIlines\fB\fR]\fB\fR .IP "" 2 Use the context output format, showing \fIlines\fR (an integer) lines of context, or three if \fIlines\fR is not given. For proper operation, \fBpatch\fR typically needs at least two lines of context. .SP .IP "" 0 \fB--changed-group-format=\fIformat\fB\fR .IP "" 2 Use \fIformat\fR to output a line group containing differing lines from both files in if-then-else format. See `Line group formats\(aq in the CVS manual. .SP .IP "" 0 \fB-d\fR .IP "" 2 Change the algorithm to perhaps find a smaller set of changes. This makes \fBdiff\fR slower (sometimes much slower). .SP .IP "" 0 \fB-e\fR .IP "" 2 .IP "" 0 \fB--ed\fR .IP "" 2 Make output that is a valid \fBed\fR script. .SP .IP "" 0 \fB--expand-tabs\fR .IP "" 2 Expand tabs to spaces in the output, to preserve the alignment of tabs in the input files. .SP .IP "" 0 \fB-f\fR .IP "" 2 Make output that looks vaguely like an \fBed\fR script but has changes in the order they appear in the file. .SP .IP "" 0 \fB-F \fIregexp\fB\fR .IP "" 2 In context and unified format, for each hunk of differences, show some of the last preceding line that matches \fIregexp\fR. .SP .IP "" 0 \fB--forward-ed\fR .IP "" 2 Make output that looks vaguely like an \fBed\fR script but has changes in the order they appear in the file. .SP .IP "" 0 \fB-H\fR .IP "" 2 Use heuristics to speed handling of large files that have numerous scattered small changes. .SP .IP "" 0 \fB--horizon-lines=\fIlines\fB\fR .IP "" 2 Do not discard the last \fIlines\fR lines of the common prefix and the first \fIlines\fR lines of the common suffix. .SP .IP "" 0 \fB-i\fR .IP "" 2 Ignore changes in case; consider upper- and lower-case letters equivalent. .SP .IP "" 0 \fB-I \fIregexp\fB\fR .IP "" 2 Ignore changes that just insert or delete lines that match \fIregexp\fR. .SP .IP "" 0 \fB--ifdef=\fIname\fB\fR .IP "" 2 Make merged if-then-else output using \fIname\fR. .SP .IP "" 0 \fB--ignore-all-space\fR .IP "" 2 Ignore white space when comparing lines. .SP .IP "" 0 \fB--ignore-blank-lines\fR .IP "" 2 Ignore changes that just insert or delete blank lines. .SP .IP "" 0 \fB--ignore-case\fR .IP "" 2 Ignore changes in case; consider upper- and lower-case to be the same. .SP .IP "" 0 \fB--ignore-matching-lines=\fIregexp\fB\fR .IP "" 2 Ignore changes that just insert or delete lines that match \fIregexp\fR. .SP .IP "" 0 \fB--ignore-space-change\fR .IP "" 2 Ignore trailing white space and consider all other sequences of one or more white space characters to be equivalent. .SP .IP "" 0 \fB--initial-tab\fR .IP "" 2 Output a tab rather than a space before the text of a line in normal or context format. This causes the alignment of tabs in the line to look normal. .SP .IP "" 0 \fB-L \fIlabel\fB\fR .IP "" 2 Use \fIlabel\fR instead of the file name in the context format and unified format headers. .SP .IP "" 0 \fB--label=\fIlabel\fB\fR .IP "" 2 Use \fIlabel\fR instead of the file name in the context format and unified format headers. .SP .IP "" 0 \fB--left-column\fR .IP "" 2 Print only the left column of two common lines in side by side format. .SP .IP "" 0 \fB--line-format=\fIformat\fB\fR .IP "" 2 Use \fIformat\fR to output all input lines in if-then-else format. See `Line formats\(aq in the CVS manual. .SP .IP "" 0 \fB--minimal\fR .IP "" 2 Change the algorithm to perhaps find a smaller set of changes. This makes \fBdiff\fR slower (sometimes much slower). .SP .IP "" 0 \fB-n\fR .IP "" 2 Output RCS-format diffs; like \fB-f\fR except that each command specifies the number of lines affected. .SP .IP "" 0 \fB-N\fR .IP "" 2 .IP "" 0 \fB--new-file\fR .IP "" 2 In directory comparison, if a file is found in only one directory, treat it as present but empty in the other directory. .SP .IP "" 0 \fB--new-group-format=\fIformat\fB\fR .IP "" 2 Use \fIformat\fR to output a group of lines taken from just the second file in if-then-else format. See `Line group formats\(aq in the CVS manual. .SP .IP "" 0 \fB--new-line-format=\fIformat\fB\fR .IP "" 2 Use \fIformat\fR to output a line taken from just the second file in if-then-else format. See `Line formats\(aq in the CVS manual. .SP .IP "" 0 \fB--old-group-format=\fIformat\fB\fR .IP "" 2 Use \fIformat\fR to output a group of lines taken from just the first file in if-then-else format. See `Line group formats\(aq in the CVS manual. .SP .IP "" 0 \fB--old-line-format=\fIformat\fB\fR .IP "" 2 Use \fIformat\fR to output a line taken from just the first file in if-then-else format. See `Line formats\(aq in the CVS manual. .SP .IP "" 0 \fB-p\fR .IP "" 2 Show which C function each change is in. .SP .IP "" 0 \fB--rcs\fR .IP "" 2 Output RCS-format diffs; like \fB-f\fR except that each command specifies the number of lines affected. .SP .IP "" 0 \fB--report-identical-files\fR .IP "" 2 .IP "" 0 \fB-s\fR .IP "" 2 Report when two files are the same. .SP .IP "" 0 \fB--show-c-function\fR .IP "" 2 Show which C function each change is in. .SP .IP "" 0 \fB--show-function-line=\fIregexp\fB\fR .IP "" 2 In context and unified format, for each hunk of differences, show some of the last preceding line that matches \fIregexp\fR. .SP .IP "" 0 \fB--side-by-side\fR .IP "" 2 Use the side by side output format. .SP .IP "" 0 \fB--speed-large-files\fR .IP "" 2 Use heuristics to speed handling of large files that have numerous scattered small changes. .SP .IP "" 0 \fB--suppress-common-lines\fR .IP "" 2 Do not print common lines in side by side format. .SP .IP "" 0 \fB-t\fR .IP "" 2 Expand tabs to spaces in the output, to preserve the alignment of tabs in the input files. .SP .IP "" 0 \fB-T\fR .IP "" 2 Output a tab rather than a space before the text of a line in normal or context format. This causes the alignment of tabs in the line to look normal. .SP .IP "" 0 \fB--text\fR .IP "" 2 Treat all files as text and compare them line-by-line, even if they do not appear to be text. .SP .IP "" 0 \fB-u\fR .IP "" 2 Use the unified output format. .SP .IP "" 0 \fB--unchanged-group-format=\fIformat\fB\fR .IP "" 2 Use \fIformat\fR to output a group of common lines taken from both files in if-then-else format. see node `Line group formats\(aq in the CVS manual. .SP .IP "" 0 \fB--unchanged-line-format=\fIformat\fB\fR .IP "" 2 Use \fIformat\fR to output a line common to both files in if-then-else format. see node `Line formats\(aq in the CVS manual. .SP .IP "" 0 \fB-U \fIlines\fB\fR .IP "" 2 .IP "" 0 \fB--unified\fR[\fB=\fIlines\fB\fR]\fB\fR .IP "" 2 Use the unified output format, showing \fIlines\fR (an integer) lines of context, or three if \fIlines\fR is not given. For proper operation, \fBpatch\fR typically needs at least two lines of context. .SP .IP "" 0 \fB-w\fR .IP "" 2 Ignore white space when comparing lines. .SP .IP "" 0 \fB-W \fIcolumns\fB\fR .IP "" 2 .IP "" 0 \fB--width=\fIcolumns\fB\fR .IP "" 2 Use an output width of \fIcolumns\fR in side by side format. .SP .IP "" 0 \fB-y\fR .IP "" 2 Use the side by side output format. .SP .SH "Line group formats" .SP Line group formats let you specify formats suitable for many applications that allow if-then-else input, including programming languages and text formatting languages. A line group format specifies the output format for a contiguous group of similar lines. .SP For example, the following command compares the TeX file \fBmyfile\fR with the original version from the repository, and outputs a merged file in which old regions are surrounded by \fB\\begin{em}\fR-\fB\\end{em}\fR lines, and new regions are surrounded by \fB\\begin{bf}\fR-\fB\\end{bf}\fR lines. .SP .PD 0 .SP .IP "" 2 cvs diff \\ .IP "" 2 --old-group-format=\(aq\\begin{em} .IP "" 2 %<\\end{em} .IP "" 2 \(aq \\ .IP "" 2 --new-group-format=\(aq\\begin{bf} .IP "" 2 %>\\end{bf} .IP "" 2 \(aq \\ .IP "" 2 myfile .PD .IP "" 0 .SP The following command is equivalent to the above example, but it is a little more verbose, because it spells out the default line group formats. .SP .PD 0 .SP .IP "" 2 cvs diff \\ .IP "" 2 --old-group-format=\(aq\\begin{em} .IP "" 2 %<\\end{em} .IP "" 2 \(aq \\ .IP "" 2 --new-group-format=\(aq\\begin{bf} .IP "" 2 %>\\end{bf} .IP "" 2 \(aq \\ .IP "" 2 --unchanged-group-format=\(aq%=\(aq \\ .IP "" 2 --changed-group-format=\(aq\\begin{em} .IP "" 2 %<\\end{em} .IP "" 2 \\begin{bf} .IP "" 2 %>\\end{bf} .IP "" 2 \(aq \\ .IP "" 2 myfile .PD .IP "" 0 .SP Here is a more advanced example, which outputs a diff listing with headers containing line numbers in a \`\`plain English\(aq\(aq style. .SP .PD 0 .SP .IP "" 2 cvs diff \\ .IP "" 2 --unchanged-group-format=\(aq\(aq \\ .IP "" 2 --old-group-format=\(aq-------- %dn line%(n=1?:s) deleted at %df: .IP "" 2 %<\(aq \\ .IP "" 2 --new-group-format=\(aq-------- %dN line%(N=1?:s) added after %de: .IP "" 2 %>\(aq \\ .IP "" 2 --changed-group-format=\(aq-------- %dn line%(n=1?:s) changed at %df: .IP "" 2 %<-------- to: .IP "" 2 %>\(aq \\ .IP "" 2 myfile .PD .IP "" 0 .SP To specify a line group format, use one of the options listed below. You can specify up to four line group formats, one for each kind of line group. You should quote \fIformat\fR, because it typically contains shell metacharacters. .SP .IP "" 0 \fB--old-group-format=\fIformat\fB\fR .IP "" 2 These line groups are hunks containing only lines from the first file. The default old group format is the same as the changed group format if it is specified; otherwise it is a format that outputs the line group as-is. .SP .IP "" 0 \fB--new-group-format=\fIformat\fB\fR .IP "" 2 These line groups are hunks containing only lines from the second file. The default new group format is same as the changed group format if it is specified; otherwise it is a format that outputs the line group as-is. .SP .IP "" 0 \fB--changed-group-format=\fIformat\fB\fR .IP "" 2 These line groups are hunks containing lines from both files. The default changed group format is the concatenation of the old and new group formats. .SP .IP "" 0 \fB--unchanged-group-format=\fIformat\fB\fR .IP "" 2 These line groups contain lines common to both files. The default unchanged group format is a format that outputs the line group as-is. .SP In a line group format, ordinary characters represent themselves; conversion specifications start with \fB%\fR and have one of the following forms. .SP .IP "" 0 \fB%<\fR .IP "" 2 stands for the lines from the first file, including the trailing newline. Each line is formatted according to the old line format (see node `Line formats\(aq in the CVS manual). .SP .IP "" 0 \fB%>\fR .IP "" 2 stands for the lines from the second file, including the trailing newline. Each line is formatted according to the new line format. .SP .IP "" 0 \fB%=\fR .IP "" 2 stands for the lines common to both files, including the trailing newline. Each line is formatted according to the unchanged line format. .SP .IP "" 0 \fB%%\fR .IP "" 2 stands for \fB%\fR. .SP .IP "" 0 \fB%c\(aq\fIC\fB\(aq\fR .IP "" 2 where \fIC\fR is a single character, stands for \fIC\fR. \fIC\fR may not be a backslash or an apostrophe. For example, \fB%c\(aq:\(aq\fR stands for a colon, even inside the then-part of an if-then-else format, which a colon would normally terminate. .SP .IP "" 0 \fB%c\(aq\\\fIO\fB\(aq\fR .IP "" 2 where \fIO\fR is a string of 1, 2, or 3 octal digits, stands for the character with octal code \fIO\fR. For example, \fB%c\(aq\\0\(aq\fR stands for a null character. .SP .IP "" 0 \fB\fIF\fB\fIn\fB\fR .IP "" 2 where \fIF\fR is a \fBprintf\fR conversion specification and \fIn\fR is one of the following letters, stands for \fIn\fR\(aqs value formatted with \fIF\fR. .SP .IP "" 2 \fBe\fR .IP "" 4 The line number of the line just before the group in the old file. .SP .IP "" 2 \fBf\fR .IP "" 4 The line number of the first line in the group in the old file; equals \fIe\fR + 1. .SP .IP "" 2 \fBl\fR .IP "" 4 The line number of the last line in the group in the old file. .SP .IP "" 2 \fBm\fR .IP "" 4 The line number of the line just after the group in the old file; equals \fIl\fR + 1. .SP .IP "" 2 \fBn\fR .IP "" 4 The number of lines in the group in the old file; equals \fIl\fR - \fIf\fR + 1. .SP .IP "" 2 \fBE, F, L, M, N\fR .IP "" 4 Likewise, for lines in the new file. .SP .SP The \fBprintf\fR conversion specification can be \fB%d\fR, \fB%o\fR, \fB%x\fR, or \fB%X\fR, specifying decimal, octal, lower case hexadecimal, or upper case hexadecimal output respectively. After the \fB%\fR the following options can appear in sequence: a \fB-\fR specifying left-justification; an integer specifying the minimum field width; and a period followed by an optional integer specifying the minimum number of digits. For example, \fB%5dN\fR prints the number of new lines in the group in a field of width 5 characters, using the \fBprintf\fR format \fB"%5d"\fR. .SP .IP "" 0 \fB(\fIA\fB=\fIB\fB?\fIT\fB:\fIE\fB)\fR .IP "" 2 If \fIA\fR equals \fIB\fR then \fIT\fR else \fIE\fR. \fIA\fR and \fIB\fR are each either a decimal constant or a single letter interpreted as above. This format spec is equivalent to \fIT\fR if \fIA\fR\(aqs value equals \fIB\fR\(aqs; otherwise it is equivalent to \fIE\fR. .SP For example, \fB%(N=0?no:%dN) line%(N=1?:s)\fR is equivalent to \fBno lines\fR if \fIN\fR (the number of lines in the group in the new file) is 0, to \fB1 line\fR if \fIN\fR is 1, and to \fB%dN lines\fR otherwise. .SP .SH "Line formats" .SP Line formats control how each line taken from an input file is output as part of a line group in if-then-else format. .SP For example, the following command outputs text with a one-column change indicator to the left of the text. The first column of output is \fB-\fR for deleted lines, \fB|\fR for added lines, and a space for unchanged lines. The formats contain newline characters where newlines are desired on output. .SP .PD 0 .SP .IP "" 2 cvs diff \\ .IP "" 2 --old-line-format=\(aq-%l .IP "" 2 \(aq \\ .IP "" 2 --new-line-format=\(aq|%l .IP "" 2 \(aq \\ .IP "" 2 --unchanged-line-format=\(aq %l .IP "" 2 \(aq \\ .IP "" 2 myfile .PD .IP "" 0 .SP To specify a line format, use one of the following options. You should quote \fIformat\fR, since it often contains shell metacharacters. .SP .IP "" 0 \fB--old-line-format=\fIformat\fB\fR .IP "" 2 formats lines just from the first file. .SP .IP "" 0 \fB--new-line-format=\fIformat\fB\fR .IP "" 2 formats lines just from the second file. .SP .IP "" 0 \fB--unchanged-line-format=\fIformat\fB\fR .IP "" 2 formats lines common to both files. .SP .IP "" 0 \fB--line-format=\fIformat\fB\fR .IP "" 2 formats all lines; in effect, it sets all three above options simultaneously. .SP In a line format, ordinary characters represent themselves; conversion specifications start with \fB%\fR and have one of the following forms. .SP .IP "" 0 \fB%l\fR .IP "" 2 stands for the contents of the line, not counting its trailing newline (if any). This format ignores whether the line is incomplete. .SP .IP "" 0 \fB%L\fR .IP "" 2 stands for the contents of the line, including its trailing newline (if any). If a line is incomplete, this format preserves its incompleteness. .SP .IP "" 0 \fB%%\fR .IP "" 2 stands for \fB%\fR. .SP .IP "" 0 \fB%c\(aq\fIC\fB\(aq\fR .IP "" 2 where \fIC\fR is a single character, stands for \fIC\fR. \fIC\fR may not be a backslash or an apostrophe. For example, \fB%c\(aq:\(aq\fR stands for a colon. .SP .IP "" 0 \fB%c\(aq\\\fIO\fB\(aq\fR .IP "" 2 where \fIO\fR is a string of 1, 2, or 3 octal digits, stands for the character with octal code \fIO\fR. For example, \fB%c\(aq\\0\(aq\fR stands for a null character. .SP .IP "" 0 \fB\fIF\fBn\fR .IP "" 2 where \fIF\fR is a \fBprintf\fR conversion specification, stands for the line number formatted with \fIF\fR. For example, \fB%.5dn\fR prints the line number using the \fBprintf\fR format \fB"%.5d"\fR. see node `Line group formats\(aq in the CVS manual, for more about printf conversion specifications. .SP .SP The default line format is \fB%l\fR followed by a newline character. .SP If the input contains tab characters and it is important that they line up on output, you should ensure that \fB%l\fR or \fB%L\fR in a line format is just after a tab stop (e.g. by preceding \fB%l\fR or \fB%L\fR with a tab character), or you should use the \fB-t\fR or \fB--expand-tabs\fR option. .SP Taken together, the line and line group formats let you specify many different formats. For example, the following command uses a format similar to \fBdiff\fR\(aqs normal format. You can tailor this command to get fine control over \fBdiff\fR\(aqs output. .SP .PD 0 .SP .IP "" 2 cvs diff \\ .IP "" 2 --old-line-format=\(aq< %l .IP "" 2 \(aq \\ .IP "" 2 --new-line-format=\(aq> %l .IP "" 2 \(aq \\ .IP "" 2 --old-group-format=\(aq%df%(f=l?:,%dl)d%dE .IP "" 2 %<\(aq \\ .IP "" 2 --new-group-format=\(aq%dea%dF%(F=L?:,%dL) .IP "" 2 %>\(aq \\ .IP "" 2 --changed-group-format=\(aq%df%(f=l?:,%dl)c%dF%(F=L?:,%dL) .IP "" 2 %<\(em .IP "" 2 %>\(aq \\ .IP "" 2 --unchanged-group-format=\(aq\(aq \\ .IP "" 2 myfile .PD .IP "" 0 .SP .SH "diff examples" .SP The following line produces a Unidiff (\fB-u\fR flag) between revision 1.14 and 1.19 of \fBbackend.c\fR. Due to the \fB-kk\fR flag no keywords are substituted, so differences that only depend on keyword substitution are ignored. .SP .PD 0 .SP .IP "" 2 $ cvs diff -kk -u -r 1.14 -r 1.19 backend.c .PD .IP "" 0 .SP Suppose the experimental branch EXPR1 was based on a set of files tagged RELEASE_1_0. To see what has happened on that branch, the following can be used: .SP .PD 0 .SP .IP "" 2 $ cvs diff -r RELEASE_1_0 -r EXPR1 .PD .IP "" 0 .SP A command like this can be used to produce a context diff between two releases: .SP .PD 0 .SP .IP "" 2 $ cvs diff -c -r RELEASE_1_0 -r RELEASE_1_1 > diffs .PD .IP "" 0 .SP If you are maintaining ChangeLogs, a command like the following just before you commit your changes may help you write the ChangeLog entry. All local modifications that have not yet been committed will be printed. .SP .PD 0 .SP .IP "" 2 $ cvs diff -u | less .PD .IP "" 0 .SP .SH "export" .SS "Export sources from CVS, similar to checkout" .IX "export (subcommand)" .SP .IP "\(bu" 2 Synopsis: export [-flNnR] [-r rev|-D date] [-k subst] [-d dir] module\&... .IP "\(bu" 2 Requires: repository. .IP "\(bu" 2 Changes: current directory. .SP This command is a variant of \fBcheckout\fR; use it when you want a copy of the source for module without the \fBcvs\fR administrative directories. For example, you might use \fBexport\fR to prepare source for shipment off-site. This command requires that you specify a date or tag (with \fB-D\fR or \fB-r\fR), so that you can count on reproducing the source you ship to others (and thus it always prunes empty directories). .SP One often would like to use \fB-kv\fR with \fBcvs export\fR. This causes any keywords to be expanded such that an import done at some other site will not lose the keyword revision information. But be aware that doesn\(aqt handle an export containing binary files correctly. Also be aware that after having used \fB-kv\fR, one can no longer use the \fBident\fR command (which is part of the \fBrcs\fR suite\(emsee ident(1)) which looks for keyword strings. If you want to be able to use \fBident\fR you must not use \fB-kv\fR. .SP .SH "export options" .SP These standard options are supported by \fBexport\fR (see node `Common options\(aq in the CVS manual, for a complete description of them): .SP .IP "" 0 \fB-D \fIdate\fB\fR .IP "" 2 Use the most recent revision no later than \fIdate\fR. .SP .IP "" 0 \fB-f\fR .IP "" 2 If no matching revision is found, retrieve the most recent revision (instead of ignoring the file). .SP .IP "" 0 \fB-l\fR .IP "" 2 Local; run only in current working directory. .SP .IP "" 0 \fB-n\fR .IP "" 2 Do not run any checkout program. .SP .IP "" 0 \fB-R\fR .IP "" 2 Export directories recursively. This is on by default. .SP .IP "" 0 \fB-r \fItag\fB\fR .IP "" 2 Use revision \fItag\fR. .SP In addition, these options (that are common to \fBcheckout\fR and \fBexport\fR) are also supported: .SP .IP "" 0 \fB-d \fIdir\fB\fR .IP "" 2 Create a directory called \fIdir\fR for the working files, instead of using the module name. See `checkout options\(aq in the CVS manual for complete details on how \fBcvs\fR handles this flag. .SP .IP "" 0 \fB-k \fIsubst\fB\fR .IP "" 2 Set keyword expansion mode (see node `Substitution modes\(aq in the CVS manual). .SP .IP "" 0 \fB-N\fR .IP "" 2 Only useful together with \fB-d \fIdir\fB\fR. See `checkout options\(aq in the CVS manual for complete details on how \fBcvs\fR handles this flag. .SP .SH "history" .SS "Show status of files and users" .IX "history (subcommand)" .SP .IP "\(bu" 2 Synopsis: history [-report] [-flags] [-options args] [files\&...] .IP "\(bu" 2 Requires: the file \fB$CVSROOT/CVSROOT/history\fR .IP "\(bu" 2 Changes: nothing. .SP \fBcvs\fR can keep a history file that tracks each use of the \fBcheckout\fR, \fBcommit\fR, \fBrtag\fR, \fBupdate\fR, and \fBrelease\fR commands. You can use \fBhistory\fR to display this information in various formats. .SP Logging must be enabled by creating the file \fB$CVSROOT/CVSROOT/history\fR. .SP \fB\fBhistory\fB uses \fB-f\fB, \fB-l\fB, \fB-n\fB, and \fB-p\fB in ways that conflict with the normal use inside \fBcvs\fB (see node `Common options\(aq in the CVS manual).\fR .SP .SH "history options" .SP Several options (shown above as \fB-report\fR) control what kind of report is generated: .SP .IP "" 0 \fB-c\fR .IP "" 2 Report on each time commit was used (i.e., each time the repository was modified). .SP .IP "" 0 \fB-e\fR .IP "" 2 Everything (all record types). Equivalent to specifying \fB-x\fR with all record types. Of course, \fB-e\fR will also include record types which are added in a future version of \fBcvs\fR; if you are writing a script which can only handle certain record types, you\(aqll want to specify \fB-x\fR. .SP .IP "" 0 \fB-m \fImodule\fB\fR .IP "" 2 Report on a particular module. (You can meaningfully use \fB-m\fR more than once on the command line.) .SP .IP "" 0 \fB-o\fR .IP "" 2 Report on checked-out modules. This is the default report type. .SP .IP "" 0 \fB-T\fR .IP "" 2 Report on all tags. .SP .IP "" 0 \fB-x \fItype\fB\fR .IP "" 2 Extract a particular set of record types \fItype\fR from the \fBcvs\fR history. The types are indicated by single letters, which you may specify in combination. .SP Certain commands have a single record type: .SP .IP "" 2 \fBF\fR .IP "" 4 release .IP "" 2 \fBO\fR .IP "" 4 checkout .IP "" 2 \fBE\fR .IP "" 4 export .IP "" 2 \fBT\fR .IP "" 4 rtag .SP One of five record types may result from an update: .SP .IP "" 2 \fBC\fR .IP "" 4 A merge was necessary but collisions were detected (requiring manual merging). .IP "" 2 \fBG\fR .IP "" 4 A merge was necessary and it succeeded. .IP "" 2 \fBU\fR .IP "" 4 A working file was copied from the repository. .IP "" 2 \fBP\fR .IP "" 4 A working file was patched to match the repository. .IP "" 2 \fBW\fR .IP "" 4 The working copy of a file was deleted during update (because it was gone from the repository). .SP One of three record types results from commit: .SP .IP "" 2 \fBA\fR .IP "" 4 A file was added for the first time. .IP "" 2 \fBM\fR .IP "" 4 A file was modified. .IP "" 2 \fBR\fR .IP "" 4 A file was removed. .SP The options shown as \fB-flags\fR constrain or expand the report without requiring option arguments: .SP .IP "" 0 \fB-a\fR .IP "" 2 Show data for all users (the default is to show data only for the user executing \fBhistory\fR). .SP .IP "" 0 \fB-l\fR .IP "" 2 Show last modification only. .SP .IP "" 0 \fB-w\fR .IP "" 2 Show only the records for modifications done from the same working directory where \fBhistory\fR is executing. .SP The options shown as \fB-options \fIargs\fB\fR constrain the report based on an argument: .SP .IP "" 0 \fB-b \fIstr\fB\fR .IP "" 2 Show data back to a record containing the string \fIstr\fR in either the module name, the file name, or the repository path. .SP .IP "" 0 \fB-D \fIdate\fB\fR .IP "" 2 Show data since \fIdate\fR. This is slightly different from the normal use of \fB-D \fIdate\fB\fR, which selects the newest revision older than \fIdate\fR. .SP .IP "" 0 \fB-f \fIfile\fB\fR .IP "" 2 Show data for a particular file (you can specify several \fB-f\fR options on the same command line). This is equivalent to specifying the file on the command line. .SP .IP "" 0 \fB-n \fImodule\fB\fR .IP "" 2 Show data for a particular module (you can specify several \fB-n\fR options on the same command line). .SP .IP "" 0 \fB-p \fIrepository\fB\fR .IP "" 2 Show data for a particular source repository (you can specify several \fB-p\fR options on the same command line). .SP .IP "" 0 \fB-r \fIrev\fB\fR .IP "" 2 Show records referring to revisions since the revision or tag named \fIrev\fR appears in individual \fBrcs\fR files. Each \fBrcs\fR file is searched for the revision or tag. .SP .IP "" 0 \fB-t \fItag\fB\fR .IP "" 2 Show records since tag \fItag\fR was last added to the history file. This differs from the \fB-r\fR flag above in that it reads only the history file, not the \fBrcs\fR files, and is much faster. .SP .IP "" 0 \fB-u \fIname\fB\fR .IP "" 2 Show records for user \fIname\fR. .SP .IP "" 0 \fB-z \fItimezone\fB\fR .IP "" 2 Show times in the selected records using the specified time zone instead of UTC. .SP .SH "import" .SS "Import sources into CVS, using vendor branches" .IX "import (subcommand)" .SP .IP "\(bu" 2 Synopsis: import [-options] repository vendortag releasetag\&... .IP "\(bu" 2 Requires: Repository, source distribution directory. .IP "\(bu" 2 Changes: repository. .SP Use \fBimport\fR to incorporate an entire source distribution from an outside source (e.g., a source vendor) into your source repository directory. You can use this command both for initial creation of a repository, and for wholesale updates to the module from the outside source. See `Tracking sources\(aq in the CVS manual for a discussion on this subject. .SP The \fIrepository\fR argument gives a directory name (or a path to a directory) under the \fBcvs\fR root directory for repositories; if the directory did not exist, import creates it. .SP When you use import for updates to source that has been modified in your source repository (since a prior import), it will notify you of any files that conflict in the two branches of development; use \fBcheckout -j\fR to reconcile the differences, as import instructs you to do. .SP If \fBcvs\fR decides a file should be ignored (see node `cvsignore\(aq in the CVS manual), it does not import it and prints \fBI \fR followed by the filename (see node `import output\(aq in the CVS manual for a complete description of the output). .SP If the file \fB$CVSROOT/CVSROOT/cvswrappers\fR exists, any file whose names match the specifications in that file will be treated as packages and the appropriate filtering will be performed on the file/directory before being imported. See `Wrappers\(aq in the CVS manual. .SP The outside source is saved in a first-level branch, by default 1.1.1. Updates are leaves of this branch; for example, files from the first imported collection of source will be revision 1.1.1.1, then files from the first imported update will be revision 1.1.1.2, and so on. .SP At least three arguments are required. \fIrepository\fR is needed to identify the collection of source. \fIvendortag\fR is a tag for the entire branch (e.g., for 1.1.1). You must also specify at least one \fIreleasetag\fR to uniquely identify the files at the leaves created each time you execute \fBimport\fR. The \fIreleasetag\fR should be new, not previously existing in the repository file, and uniquely identify the imported release, .SP Note that \fBimport\fR does \fInot\fR change the directory in which you invoke it. In particular, it does not set up that directory as a \fBcvs\fR working directory; if you want to work with the sources import them first and then check them out into a different directory (see node `Getting the source\(aq in the CVS manual). .SP .SH "import options" .SP This standard option is supported by \fBimport\fR (see node `Common options\(aq in the CVS manual for a complete description): .SP .IP "" 0 \fB-m \fImessage\fB\fR .IP "" 2 Use \fImessage\fR as log information, instead of invoking an editor. .SP There are the following additional special options. .SP .IP "" 0 \fB-b \fIbranch\fB\fR .IP "" 2 See `Multiple vendor branches\(aq in the CVS manual. .SP .IP "" 0 \fB-d\fR .IP "" 2 Use each file\(aqs modification time as the time of import rather than the current time. .SP .IP "" 0 \fB-k \fIsubst\fB\fR .IP "" 2 Indicate the keyword expansion mode desired. This setting will apply to all files created during the import, but not to any files that previously existed in the repository. See `Substitution modes\(aq in the CVS manual for a list of valid \fB-k\fR settings. .SP .IP "" 0 \fB-I \fIname\fB\fR .IP "" 2 Specify file names that should be ignored during import. You can use this option repeatedly. To avoid ignoring any files at all (even those ignored by default), specify \`-I !\(aq. .SP \fIname\fR can be a file name pattern of the same type that you can specify in the \fB.cvsignore\fR file. See `cvsignore\(aq in the CVS manual. .SP .IP "" 0 \fB-W \fIspec\fB\fR .IP "" 2 Specify file names that should be filtered during import. You can use this option repeatedly. .SP \fIspec\fR can be a file name pattern of the same type that you can specify in the \fB.cvswrappers\fR file. see node `Wrappers\(aq in the CVS manual. .SP .SH "import output" .SP \fBimport\fR keeps you informed of its progress by printing a line for each file, preceded by one character indicating the status of the file: .SP .IP "" 0 \fBU \fIfile\fB\fR .IP "" 2 The file already exists in the repository and has not been locally modified; a new revision has been created (if necessary). .SP .IP "" 0 \fBN \fIfile\fB\fR .IP "" 2 The file is a new file which has been added to the repository. .SP .IP "" 0 \fBC \fIfile\fB\fR .IP "" 2 The file already exists in the repository but has been locally modified; you will have to merge the changes. .SP .IP "" 0 \fBI \fIfile\fB\fR .IP "" 2 The file is being ignored (see node `cvsignore\(aq in the CVS manual). .SP .IX "Symbolic link, importing" .IX "Link, symbolic, importing" .IP "" 0 \fBL \fIfile\fB\fR .IP "" 2 The file is a symbolic link; \fBcvs import\fR ignores symbolic links. People periodically suggest that this behavior should be changed, but if there is a consensus on what it should be changed to, it doesn\(aqt seem to be apparent. (Various options in the \fBmodules\fR file can be used to recreate symbolic links on checkout, update, etc.; see node `modules\(aq in the CVS manual.) .SP .SH "import examples" .SP See `Tracking sources\(aq in the CVS manual, and `From files\(aq in the CVS manual. .SP .SH "log" .SS "Print out log information for files" .IX "log (subcommand)" .SP .IP "\(bu" 2 Synopsis: log [options] [files\&...] .IP "\(bu" 2 Requires: repository, working directory. .IP "\(bu" 2 Changes: nothing. .SP Display log information for files. \fBlog\fR used to call the \fBrcs\fR utility \fBrlog\fR. Although this is no longer true in the current sources, this history determines the format of the output and the options, which are not quite in the style of the other \fBcvs\fR commands. .SP .IX "Timezone, in output" .IX "Zone, time, in output" The output includes the location of the \fBrcs\fR file, the \fIhead\fR revision (the latest revision on the trunk), all symbolic names (tags) and some other things. For each revision, the revision number, the author, the number of lines added/deleted and the log message are printed. All times are displayed in Coordinated Universal Time (UTC). (Other parts of \fBcvs\fR print times in the local timezone). .SP \fB\fBlog\fB uses \fB-R\fB in a way that conflicts with the normal use inside \fBcvs\fB (see node `Common options\(aq in the CVS manual).\fR .SP .SH "log options" .SP By default, \fBlog\fR prints all information that is available. All other options restrict the output. Note that the revision selection options (\fB-b\fR, \fB-d\fR, \fB-r\fR, \fB-s\fR, and \fB-w\fR) have no effect, other than possibly causing a search for files in Attic directories, when used in conjunction with the options that restrict the output to only \fBlog\fR header fields (\fB-h\fR, \fB-R\fR, and \fB-t\fR) unless the \fB-S\fR option is also specified. .SP .IP "" 0 \fB-b\fR .IP "" 2 Print information about the revisions on the default branch, normally the highest branch on the trunk. .SP .IP "" 0 \fB-d \fIdates\fB\fR .IP "" 2 Print information about revisions with a checkin date/time in the range given by the semicolon-separated list of dates. The date formats accepted are those accepted by the \fB-D\fR option to many other \fBcvs\fR commands (see node `Common options\(aq in the CVS manual). Dates can be combined into ranges as follows: .SP .IP "" 2 \fB\fId1\fB<\fId2\fB\fR .IP "" 4 .IP "" 2 \fB\fId2\fB>\fId1\fB\fR .IP "" 4 Select the revisions that were deposited between \fId1\fR and \fId2\fR. .SP .IP "" 2 \fB<\fId\fB\fR .IP "" 4 .IP "" 2 \fB\fId\fB>\fR .IP "" 4 Select all revisions dated \fId\fR or earlier. .SP .IP "" 2 \fB\fId\fB<\fR .IP "" 4 .IP "" 2 \fB>\fId\fB\fR .IP "" 4 Select all revisions dated \fId\fR or later. .SP .IP "" 2 \fB\fId\fB\fR .IP "" 4 Select the single, latest revision dated \fId\fR or earlier. .SP The \fB>\fR or \fB<\fR characters may be followed by \fB=\fR to indicate an inclusive range rather than an exclusive one. .SP Note that the separator is a semicolon (;). .SP .IP "" 0 \fB-h\fR .IP "" 2 Print only the name of the \fBrcs\fR file, name of the file in the working directory, head, default branch, access list, locks, symbolic names, and suffix. .SP .IP "" 0 \fB-l\fR .IP "" 2 Local; run only in current working directory. (Default is to run recursively). .SP .IP "" 0 \fB-N\fR .IP "" 2 Do not print the list of tags for this file. This option can be very useful when your site uses a lot of tags, so rather than "more"\(aqing over 3 pages of tag information, the log information is presented without tags at all. .SP .IP "" 0 \fB-n\fR .IP "" 2 Print the list of tags for this file. This option can be very useful when your \fB.cvsrc\fR file has a \fBlog -N\fR entry as a way to get a full list of all of the tags. .SP .IP "" 0 \fB-R\fR .IP "" 2 Print only the name of the \fBrcs\fR file. .SP .IP "" 0 \fB-r\fIrevisions\fB\fR .IP "" 2 Print information about revisions given in the comma-separated list \fIrevisions\fR of revisions and ranges. The following table explains the available range formats: .SP .IP "" 2 \fB\fIrev1\fB:\fIrev2\fB\fR .IP "" 4 Revisions \fIrev1\fR to \fIrev2\fR (which must be on the same branch). .SP .IP "" 2 \fB\fIrev1\fB::\fIrev2\fB\fR .IP "" 4 The same, but excluding \fIrev1\fR. .SP .IP "" 2 \fB:\fIrev\fB\fR .IP "" 4 .IP "" 2 \fB::\fIrev\fB\fR .IP "" 4 Revisions from the beginning of the branch up to and including \fIrev\fR. .SP .IP "" 2 \fB\fIrev\fB:\fR .IP "" 4 Revisions starting with \fIrev\fR to the end of the branch containing \fIrev\fR. .SP .IP "" 2 \fB\fIrev\fB::\fR .IP "" 4 Revisions starting just after \fIrev\fR to the end of the branch containing \fIrev\fR. .SP .IP "" 2 \fB\fIbranch\fB\fR .IP "" 4 An argument that is a branch means all revisions on that branch. .SP .IP "" 2 \fB\fIbranch1\fB:\fIbranch2\fB\fR .IP "" 4 .IP "" 2 \fB\fIbranch1\fB::\fIbranch2\fB\fR .IP "" 4 A range of branches means all revisions on the branches in that range. .SP .IP "" 2 \fB\fIbranch\fB.\fR .IP "" 4 The latest revision in \fIbranch\fR. .SP A bare \fB-r\fR with no revisions means the latest revision on the default branch, normally the trunk. There can be no space between the \fB-r\fR option and its argument. .SP .IP "" 0 \fB-S\fR .IP "" 2 Suppress the header if no revisions are selected. .SP .IP "" 0 \fB-s \fIstates\fB\fR .IP "" 2 Print information about revisions whose state attributes match one of the states given in the comma-separated list \fIstates\fR. Individual states may be any text string, though \fBcvs\fR commonly only uses two states, \fBExp\fR and \fBdead\fR. See `admin options\(aq in the CVS manual for more information. .SP .IP "" 0 \fB-t\fR .IP "" 2 Print the same as \fB-h\fR, plus the descriptive text. .SP .IP "" 0 \fB-w\fIlogins\fB\fR .IP "" 2 Print information about revisions checked in by users with login names appearing in the comma-separated list \fIlogins\fR. If \fIlogins\fR is omitted, the user\(aqs login is assumed. There can be no space between the \fB-w\fR option and its argument. .SP \fBlog\fR prints the intersection of the revisions selected with the options \fB-d\fR, \fB-s\fR, and \fB-w\fR, intersected with the union of the revisions selected by \fB-b\fR and \fB-r\fR. .SP .SH "log examples" .SP Contributed examples are gratefully accepted. .SP .SH "rdiff" .SS "\(aqpatch\(aq format diffs between releases" .IX "rdiff (subcommand)" .SP .IP "\(bu" 2 rdiff [-flags] [-V vn] [-r t|-D d [-r t2|-D d2]] modules\&... .IP "\(bu" 2 Requires: repository. .IP "\(bu" 2 Changes: nothing. .IP "\(bu" 2 Synonym: patch .SP Builds a Larry Wall format patch(1) file between two releases, that can be fed directly into the \fBpatch\fR program to bring an old release up-to-date with the new release. (This is one of the few \fBcvs\fR commands that operates directly from the repository, and doesn\(aqt require a prior checkout.) The diff output is sent to the standard output device. .SP You can specify (using the standard \fB-r\fR and \fB-D\fR options) any combination of one or two revisions or dates. If only one revision or date is specified, the patch file reflects differences between that revision or date and the current head revisions in the \fBrcs\fR file. .SP Note that if the software release affected is contained in more than one directory, then it may be necessary to specify the \fB-p\fR option to the \fBpatch\fR command when patching the old sources, so that \fBpatch\fR is able to find the files that are located in other directories. .SP .SH "rdiff options" .SP These standard options are supported by \fBrdiff\fR (see node `Common options\(aq in the CVS manual for a complete description of them): .SP .IP "" 0 \fB-D \fIdate\fB\fR .IP "" 2 Use the most recent revision no later than \fIdate\fR. .SP .IP "" 0 \fB-f\fR .IP "" 2 If no matching revision is found, retrieve the most recent revision (instead of ignoring the file). .SP .IP "" 0 \fB-k \fIkflag\fB\fR .IP "" 2 Process keywords according to \fIkflag\fR. See `Keyword substitution\(aq in the CVS manual. .SP .IP "" 0 \fB-l\fR .IP "" 2 Local; don\(aqt descend subdirectories. .SP .IP "" 0 \fB-R\fR .IP "" 2 Examine directories recursively. This option is on by default. .SP .IP "" 0 \fB-r \fItag\fB\fR .IP "" 2 Use revision \fItag\fR. .SP In addition to the above, these options are available: .SP .IP "" 0 \fB-c\fR .IP "" 2 Use the context diff format. This is the default format. .SP .IP "" 0 \fB-s\fR .IP "" 2 Create a summary change report instead of a patch. The summary includes information about files that were changed or added between the releases. It is sent to the standard output device. This is useful for finding out, for example, which files have changed between two dates or revisions. .SP .IP "" 0 \fB-t\fR .IP "" 2 A diff of the top two revisions is sent to the standard output device. This is most useful for seeing what the last change to a file was. .SP .IP "" 0 \fB-u\fR .IP "" 2 Use the unidiff format for the context diffs. Remember that old versions of the \fBpatch\fR program can\(aqt handle the unidiff format, so if you plan to post this patch to the net you should probably not use \fB-u\fR. .SP .IP "" 0 \fB-V \fIvn\fB\fR .IP "" 2 Expand keywords according to the rules current in \fBrcs\fR version \fIvn\fR (the expansion format changed with \fBrcs\fR version 5). Note that this option is no longer accepted. \fBcvs\fR will always expand keywords the way that \fBrcs\fR version 5 does. .SP .SH "rdiff examples" .SP Suppose you receive mail from \fRfoo@example.net\fR asking for an update from release 1.2 to 1.4 of the tc compiler. You have no such patches on hand, but with \fBcvs\fR that can easily be fixed with a command such as this: .SP .PD 0 .SP .IP "" 2 $ cvs rdiff -c -r FOO1_2 -r FOO1_4 tc | \\ .IP "" 2 > Mail -s \(aqThe patches you asked for\(aq foo@example.net .PD .IP "" 0 .SP Suppose you have made release 1.3, and forked a branch called \fBR_1_3fix\fR for bug fixes. \fBR_1_3_1\fR corresponds to release 1.3.1, which was made some time ago. Now, you want to see how much development has been done on the branch. This command can be used: .SP .PD 0 .SP .IP "" 2 $ cvs patch -s -r R_1_3_1 -r R_1_3fix module-name .IP "" 2 cvs rdiff: Diffing module-name .IP "" 2 File ChangeLog,v changed from revision 1.52.2.5 to 1.52.2.6 .IP "" 2 File foo.c,v changed from revision 1.52.2.3 to 1.52.2.4 .IP "" 2 File bar.h,v changed from revision 1.29.2.1 to 1.2 .PD .IP "" 0 .SP .SH "release" .SS "Indicate that a Module is no longer in use" .IX "release (subcommand)" .SP .IP "\(bu" 2 release [-d] directories\&... .IP "\(bu" 2 Requires: Working directory. .IP "\(bu" 2 Changes: Working directory, history log. .SP This command is meant to safely cancel the effect of \fBcvs checkout\fR. Since \fBcvs\fR doesn\(aqt lock files, it isn\(aqt strictly necessary to use this command. You can always simply delete your working directory, if you like; but you risk losing changes you may have forgotten, and you leave no trace in the \fBcvs\fR history file (see node `history file\(aq in the CVS manual) that you\(aqve abandoned your checkout. .SP Use \fBcvs release\fR to avoid these problems. This command checks that no uncommitted changes are present; that you are executing it from immediately above a \fBcvs\fR working directory; and that the repository recorded for your files is the same as the repository defined in the module database. .SP If all these conditions are true, \fBcvs release\fR leaves a record of its execution (attesting to your intentionally abandoning your checkout) in the \fBcvs\fR history log. .SP .SH "release options" .SP The \fBrelease\fR command supports one command option: .SP .IP "" 0 \fB-d\fR .IP "" 2 Delete your working copy of the file if the release succeeds. If this flag is not given your files will remain in your working directory. .SP \fBWARNING: The \fBrelease\fB command deletes all directories and files recursively. This has the very serious side-effect that any directory created inside checked-out sources, and not added to the repository (using the \fBadd\fB command; see node `Adding files\(aq in the CVS manual) will be silently deleted\(emeven if it is non-empty!\fR .SP .SH "release output" .SP Before \fBrelease\fR releases your sources it will print a one-line message for any file that is not up-to-date. .SP .IP "" 0 \fBU \fIfile\fB\fR .IP "" 2 .IP "" 0 \fBP \fIfile\fB\fR .IP "" 2 There exists a newer revision of this file in the repository, and you have not modified your local copy of the file (\fBU\fR and \fBP\fR mean the same thing). .SP .IP "" 0 \fBA \fIfile\fB\fR .IP "" 2 The file has been added to your private copy of the sources, but has not yet been committed to the repository. If you delete your copy of the sources this file will be lost. .SP .IP "" 0 \fBR \fIfile\fB\fR .IP "" 2 The file has been removed from your private copy of the sources, but has not yet been removed from the repository, since you have not yet committed the removal. See `commit\(aq in the CVS manual. .SP .IP "" 0 \fBM \fIfile\fB\fR .IP "" 2 The file is modified in your working directory. There might also be a newer revision inside the repository. .SP .IP "" 0 \fB? \fIfile\fB\fR .IP "" 2 \fIfile\fR is in your working directory, but does not correspond to anything in the source repository, and is not in the list of files for \fBcvs\fR to ignore (see the description of the \fB-I\fR option, and see node `cvsignore\(aq in the CVS manual). If you remove your working sources, this file will be lost. .SP .SH "release examples" .SP Release the \fBtc\fR directory, and delete your local working copy of the files. .SP .PD 0 .SP .IP "" 2 $ cd \&.. # \fRYou must stand immediately above the\fR .IP "" 2 # \fRsources when you issue \fBcvs release\fR.\fR .IP "" 2 $ cvs release -d tc .IP "" 2 You have [0] altered files in this repository. .IP "" 2 Are you sure you want to release (and delete) directory \`tc\(aq: y .IP "" 2 $ .PD .IP "" 0 .SP .SH "remove" .SS "Remove files from active use" .IX "remove (subcommand)" .SP .IP "\(bu" 2 Synopsis: remove [-flR] [files...] .IP "\(bu" 2 Requires: repository, working directory. .IP "\(bu" 2 Changes: working directory. .SP The \fBremove\fR command is used to remove unwanted files from active use. The user normally deletes the files from the working directory prior to invocation of the \fBremove\fR command. Only the working directory is updated. Changes to the repository are not made until the \fBcommit\fR command is run. .SP The \fBremove\fR command does not delete files from from the repository. \fBcvs\fR keeps all historical data in the repository so that it is possible to reconstruct previous states of the projects under revision control. .SP To undo \fBcvs\fR \fBremove\fR or to resurrect files that were previously removed, see node `add\(aq in the CVS manual. .SP .SH "remove options" .SP These standard options are supported by \fBremove\fR (see node `Common options\(aq in the CVS manual for a complete description of them): .SP .IP "" 0 \fB-l\fR .IP "" 2 Local; run only in current working directory. See `Recursive behavior\(aq in the CVS manual. .SP .IP "" 0 \fB-R\fR .IP "" 2 Process directories recursively. See `Recursive behavior\(aq in the CVS manual. .SP .SP In addition, these options are also supported: .SP .IP "" 0 \fB-f\fR .IP "" 2 Note that this is not the standard behavior of the \fB-f\fR option as defined in `Common options\(aq in the CVS manual. .SP Delete files before removing them. .SP Entire directory hierarchies are easily removed using \fB-f\fR, but take note that it is not as easy to resurrect directory hierarchies as it is to remove them. .SP .SP .SH "remove examples" .SP .SS "Removing a file" .SP .PD 0 .SP .IP "" 2 $ cvs remove remove.me .IP "" 2 cvs remove: file \`remove.me\(aq still in working directory .IP "" 2 cvs remove: 1 file exists; remove it first .IP "" 2 $ rm -f remove.me .IP "" 2 $ cvs remove remove.me .IP "" 2 cvs remove: scheduling \`remove.me\(aq for removal .IP "" 2 cvs remove: use \(aqcvs commit\(aq to remove this file permanently .SP .IP "" 2 $ ls remove.it .IP "" 2 remove.it .IP "" 2 $ cvs remove -f remove.it .IP "" 2 cvs remove: scheduling \`remove.it\(aq for removal .IP "" 2 cvs remove: use \(aqcvs commit\(aq to remove this file permanently .PD .IP "" 0 .SP .SS "Removing entire directories" .SP .PD 0 .IP "" 2 $ tree -d a .IP "" 2 a .IP "" 2 |-- CVS .IP "" 2 \`-- b .IP "" 2 \`-- CVS .SP .IP "" 2 3 directories .IP "" 2 $ cvs remove -f a .IP "" 2 cvs remove: Removing a .IP "" 2 cvs remove: Removing a/b .IP "" 2 cvs remove: scheduling \`a/b/c\(aq for removal .IP "" 2 cvs remove: use \(aqcvs commit\(aq to remove this file permanently .PD .IP "" 0 .SP .SH "update" .SS "Bring work tree in sync with repository" .IX "update (subcommand)" .SP .IP "\(bu" 2 update [-ACdflPpR] [-I name] [-j rev [-j rev]] [-k kflag] [-r tag|-D date] [-W spec] files\&... .IP "\(bu" 2 Requires: repository, working directory. .IP "\(bu" 2 Changes: working directory. .SP After you\(aqve run checkout to create your private copy of source from the common repository, other developers will continue changing the central source. From time to time, when it is convenient in your development process, you can use the \fBupdate\fR command from within your working directory to reconcile your work with any revisions applied to the source repository since your last checkout or update. .SP .SH "update options" .SP These standard options are available with \fBupdate\fR (see node `Common options\(aq in the CVS manual for a complete description of them): .SP .IP "" 0 \fB-D date\fR .IP "" 2 Use the most recent revision no later than \fIdate\fR. This option is sticky, and implies \fB-P\fR. See `Sticky tags\(aq in the CVS manual for more information on sticky tags/dates. .SP .IP "" 0 \fB-f\fR .IP "" 2 Only useful with the \fB-D \fIdate\fB\fR or \fB-r \fItag\fB\fR flags. If no matching revision is found, retrieve the most recent revision (instead of ignoring the file). .SP .IP "" 0 \fB-k \fIkflag\fB\fR .IP "" 2 Process keywords according to \fIkflag\fR. See `Keyword substitution\(aq in the CVS manual. This option is sticky; future updates of this file in this working directory will use the same \fIkflag\fR. The \fBstatus\fR command can be viewed to see the sticky options. See `Invoking CVS\(aq in the CVS manual for more information on the \fBstatus\fR command. .SP .IP "" 0 \fB-l\fR .IP "" 2 Local; run only in current working directory. See `Recursive behavior\(aq in the CVS manual. .SP .IP "" 0 \fB-P\fR .IP "" 2 Prune empty directories. See `Moving directories\(aq in the CVS manual. .SP .IP "" 0 \fB-p\fR .IP "" 2 Pipe files to the standard output. .SP .IP "" 0 \fB-R\fR .IP "" 2 Update directories recursively (default). See `Recursive behavior\(aq in the CVS manual. .SP .IP "" 0 \fB-r rev\fR .IP "" 2 Retrieve revision/tag \fIrev\fR. This option is sticky, and implies \fB-P\fR. See `Sticky tags\(aq in the CVS manual, for more information on sticky tags/dates. .SP These special options are also available with \fBupdate\fR. .SP .IP "" 0 \fB-A\fR .IP "" 2 Reset any sticky tags, dates, or \fB-k\fR options. Does not reset sticky \fB-k\fR options on modified files. See `Sticky tags\(aq in the CVS manual for more information on sticky tags/dates. .SP .IP "" 0 \fB-C\fR .IP "" 2 Overwrite locally modified files with clean copies from the repository (the modified file is saved in \fB.#\fIfile\fB.\fIrevision\fB\fR, however). .SP .IP "" 0 \fB-d\fR .IP "" 2 Create any directories that exist in the repository if they\(aqre missing from the working directory. Normally, \fBupdate\fR acts only on directories and files that were already enrolled in your working directory. .SP This is useful for updating directories that were created in the repository since the initial checkout; but it has an unfortunate side effect. If you deliberately avoided certain directories in the repository when you created your working directory (either through use of a module name or by listing explicitly the files and directories you wanted on the command line), then updating with \fB-d\fR will create those directories, which may not be what you want. .SP .IP "" 0 \fB-I \fIname\fB\fR .IP "" 2 Ignore files whose names match \fIname\fR (in your working directory) during the update. You can specify \fB-I\fR more than once on the command line to specify several files to ignore. Use \fB-I !\fR to avoid ignoring any files at all. See `cvsignore\(aq in the CVS manual for other ways to make \fBcvs\fR ignore some files. .SP .IP "" 0 \fB-W\fIspec\fB\fR .IP "" 2 Specify file names that should be filtered during update. You can use this option repeatedly. .SP \fIspec\fR can be a file name pattern of the same type that you can specify in the \fB.cvswrappers\fR file. See `Wrappers\(aq in the CVS manual. .SP .IP "" 0 \fB-j\fIrevision\fB\fR .IP "" 2 With two \fB-j\fR options, merge changes from the revision specified with the first \fB-j\fR option to the revision specified with the second \fBj\fR option, into the working directory. .SP With one \fB-j\fR option, merge changes from the ancestor revision to the revision specified with the \fB-j\fR option, into the working directory. The ancestor revision is the common ancestor of the revision which the working directory is based on, and the revision specified in the \fB-j\fR option. .SP Note that using a single \fB-j \fItagname\fB\fR option rather than \fB-j \fIbranchname\fB\fR to merge changes from a branch will often not remove files which were removed on the branch. See `Merging adds and removals\(aq in the CVS manual for more information. .SP In addition, each \fB-j\fR option can contain an optional date specification which, when used with branches, can limit the chosen revision to one within a specific date. An optional date is specified by adding a colon (:) to the tag: \fB-j\fISymbolic_Tag\fB:\fIDate_Specifier\fB\fR. .SP See `Branching and merging\(aq in the CVS manual. .SP .SP .SH "update output" .SP \fBupdate\fR and \fBcheckout\fR keep you informed of their progress by printing a line for each file, preceded by one character indicating the status of the file: .SP .IP "" 0 \fBU \fIfile\fB\fR .IP "" 2 The file was brought up to date with respect to the repository. This is done for any file that exists in the repository but not in your working directory, and for files that you haven\(aqt changed but are not the most recent versions available in the repository. .SP .IP "" 0 \fBP \fIfile\fB\fR .IP "" 2 Like \fBU\fR, but the \fBcvs\fR server sends a patch instead of an entire file. This accomplishes the same thing as \fBU\fR using less bandwidth. .SP .IP "" 0 \fBA \fIfile\fB\fR .IP "" 2 The file has been added to your private copy of the sources, and will be added to the source repository when you run \fBcommit\fR on the file. This is a reminder to you that the file needs to be committed. .SP .IP "" 0 \fBR \fIfile\fB\fR .IP "" 2 The file has been removed from your private copy of the sources, and will be removed from the source repository when you run \fBcommit\fR on the file. This is a reminder to you that the file needs to be committed. .SP .IP "" 0 \fBM \fIfile\fB\fR .IP "" 2 The file is modified in your working directory. .SP \fBM\fR can indicate one of two states for a file you\(aqre working on: either there were no modifications to the same file in the repository, so that your file remains as you last saw it; or there were modifications in the repository as well as in your copy, but they were merged successfully, without conflict, in your working directory. .SP \fBcvs\fR will print some messages if it merges your work, and a backup copy of your working file (as it looked before you ran \fBupdate\fR) will be made. The exact name of that file is printed while \fBupdate\fR runs. .SP .IP "" 0 \fBC \fIfile\fB\fR .IP "" 2 .IX "\&.# files" .IX "__ files (VMS)" A conflict was detected while trying to merge your changes to \fIfile\fR with changes from the source repository. \fIfile\fR (the copy in your working directory) is now the result of attempting to merge the two revisions; an unmodified copy of your file is also in your working directory, with the name \fB.#\fIfile\fB.\fIrevision\fB\fR where \fIrevision\fR is the revision that your modified file started from. Resolve the conflict as described in `Conflicts example\(aq in the CVS manual. (Note that some systems automatically purge files that begin with \fB.#\fR if they have not been accessed for a few days. If you intend to keep a copy of your original file, it is a very good idea to rename it.) Under \fBvms\fR, the file name starts with \fB__\fR rather than \fB.#\fR. .SP .IP "" 0 \fB? \fIfile\fB\fR .IP "" 2 \fIfile\fR is in your working directory, but does not correspond to anything in the source repository, and is not in the list of files for \fBcvs\fR to ignore (see the description of the \fB-I\fR option, and see node `cvsignore\(aq in the CVS manual). .SH "AUTHORS" .TP Dick Grune Original author of the .B cvs shell script version posted to .B comp.sources.unix in the volume6 release of December, 1986. Credited with much of the .B cvs conflict resolution algorithms. .TP Brian Berliner Coder and designer of the .B cvs program itself in April, 1989, based on the original work done by Dick. .TP Jeff Polk Helped Brian with the design of the .B cvs module and vendor branch support and author of the .BR checkin ( 1 ) shell script (the ancestor of \fBcvs import\fP). .TP Larry Jones, Derek R. Price, and Mark D. Baushke Have helped maintain .B cvs for many years. .TP And many others too numerous to mention here. .SH "SEE ALSO" The most comprehensive manual for CVS is Version Management with CVS by Per Cederqvist et al. Depending on your system, you may be able to get it with the .B info CVS command or it may be available as cvs.pdf (Portable Document Format), cvs.ps (PostScript), cvs.texinfo (Texinfo source), or cvs.html. .SP For CVS updates, more information on documentation, software related to CVS, development of CVS, and more, see: .in +1i .SP .PD 0 .IP "" 4 .B http://cvs.nongnu.org .in -1i .SP .BR ci ( 1 ), .BR co ( 1 ), .BR cvs ( 5 ), .BR cvsbug ( 8 ), .BR diff ( 1 ), .BR grep ( 1 ), .BR patch ( 1 ), .BR rcs ( 1 ), .BR rcsdiff ( 1 ), .BR rcsmerge ( 1 ), .BR rlog ( 1 ). 07070100106ba2000041ed0000000000000000000000024d58a1ff00000000000000b600010002ffffffffffffffff0000001e00000000root/usr/local/share/man/man507070100106ba3000081a40000000000000000000000014d58a1f8000034cd000000b600010002ffffffffffffffff0000002400000000root/usr/local/share/man/man5/cvs.5.TH cvs 5 "12 February 1992" .\" Full space in nroff; half space in troff .de SP .if n .sp .if t .sp .5 .. .SH NAME cvs \- Concurrent Versions System support files .SH NOTE This documentation may no longer be up to date. Please consult the Cederqvist (CVS Manual) as specified in .BR cvs ( 1 ). .SH SYNOPSIS .hy 0 .na .TP .B $CVSROOT/CVSROOT/commitinfo,v .TP .B $CVSROOT/CVSROOT/cvsignore,v .TP .B $CVSROOT/CVSROOT/cvswrappers,v .TP .B $CVSROOT/CVSROOT/editinfo,v .TP .B $CVSROOT/CVSROOT/history .TP .B $CVSROOT/CVSROOT/loginfo,v .TP .B $CVSROOT/CVSROOT/modules,v .TP .B $CVSROOT/CVSROOT/rcsinfo,v .TP .B $CVSROOT/CVSROOT/taginfo,v .ad b .hy 1 .SH DESCRIPTION .B cvs is a system for providing source control to hierarchical collections of source directories. Commands and procedures for using \fBcvs\fP are described in .BR cvs ( 1 ). .SP .B cvs manages \fIsource repositories\fP, the directories containing master copies of the revision-controlled files, by copying particular revisions of the files to (and modifications back from) developers' private \fIworking directories\fP. In terms of file structure, each individual source repository is an immediate subdirectory of \fB$CVSROOT\fP. .SP The files described here are supporting files; they do not have to exist for \fBcvs\fP to operate, but they allow you to make \fBcvs\fP operation more flexible. .SP You can use the `\|modules\|' file to define symbolic names for collections of source maintained with \fBcvs\fP. If there is no `\|modules\|' file, developers must specify complete path names (absolute, or relative to \fB$CVSROOT\fP) for the files they wish to manage with \fBcvs\fP commands. .SP You can use the `\|commitinfo\|' file to define programs to execute whenever `\|\fBcvs commit\fP\|' is about to execute. These programs are used for ``pre-commit'' checking to verify that the modified, added, and removed files are really ready to be committed. Some uses for this check might be to turn off a portion (or all) of the source repository from a particular person or group. Or, perhaps, to verify that the changed files conform to the site's standards for coding practice. .SP You can use the `\|cvswrappers\|' file to record .B cvs wrapper commands to be used when checking files into and out of the repository. Wrappers allow the file or directory to be processed on the way in and out of CVS. The intended uses are many, one possible use would be to reformat a C file before the file is checked in, so all of the code in the repository looks the same. .SP You can use the `\|loginfo\|' file to define programs to execute after any .BR commit , which writes a log entry for changes in the repository. These logging programs might be used to append the log message to a file. Or send the log message through electronic mail to a group of developers. Or, perhaps, post the log message to a particular newsgroup. .SP You can use the `\|taginfo\|' file to define programs to execute after any .BR tag or rtag operation. These programs might be used to append a message to a file listing the new tag name and the programmer who created it, or send mail to a group of developers, or, perhaps, post a message to a particular newsgroup. .SP You can use the `\|rcsinfo\|' file to define forms for log messages. .SP You can use the `\|editinfo\|' file to define a program to execute for editing/validating `\|\fBcvs commit\fP\|' log entries. This is most useful when used with a `\|rcsinfo\|' forms specification, as it can verify that the proper fields of the form have been filled in by the user committing the change. .SP You can use the `\|cvsignore\|' file to specify the default list of files to ignore during \fBupdate\fP. .SP You can use the `\|history\|' file to record the \fBcvs\fP commands that affect the repository. The creation of this file enables history logging. .SH FILES .TP .B modules The `\|modules\|' file records your definitions of names for collections of source code. \fBcvs\fP will use these definitions if you use \fBcvs\fP to check in a file with the right format to `\|\fB$CVSROOT/CVSROOT/modules,v\fP\|'. .SP The `\|modules\|' file may contain blank lines and comments (lines beginning with `\|\fB#\fP\|') as well as module definitions. Long lines can be continued on the next line by specifying a backslash (``\e'') as the last character on the line. .SP A \fImodule definition\fP is a single line of the `\|modules\|' file, in either of two formats. In both cases, \fImname\fP represents the symbolic module name, and the remainder of the line is its definition. .SP \fImname\fP \fB\-a\fP \fIaliases\fP\|.\|.\|. .br This represents the simplest way of defining a module \fImname\fP. The `\|\fB\-a\fP\|' flags the definition as a simple alias: \fBcvs\fP will treat any use of \fImname\fP (as a command argument) as if the list of names \fIaliases\fP had been specified instead. \fIaliases\fP may contain either other module names or paths. When you use paths in \fIaliases\fP, `\|\fBcvs checkout\fP\|' creates all intermediate directories in the working directory, just as if the path had been specified explicitly in the \fBcvs\fP arguments. .SP .nf \fImname\fP [ \fIoptions\fP ] \fIdir\fP [ \fIfiles\fP\|.\|.\|. ] [ \fB&\fP\fImodule\fP\|.\|.\|. ] .fi .SP In the simplest case, this form of module definition reduces to `\|\fImname dir\fP\|'. This defines all the files in directory \fIdir\fP as module \fImname\fP. \fIdir\fP is a relative path (from \fB$CVSROOT\fP) to a directory of source in one of the source repositories. In this case, on \fBcheckout\fP, a single directory called \fImname\fP is created as a working directory; no intermediate directory levels are used by default, even if \fIdir\fP was a path involving several directory levels. .SP By explicitly specifying \fIfiles\fP in the module definition after \fIdir\fP, you can select particular files from directory \fIdir\fP. The sample definition for \fBmodules\fP is an example of a module defined with a single file from a particular directory. Here is another example: .SP .nf .ft B m4test unsupported/gnu/m4 foreach.m4 forloop.m4 .ft P .fi .SP With this definition, executing `\|\fBcvs checkout m4test\fP\|' will create a single working directory `\|m4test\|' containing the two files listed, which both come from a common directory several levels deep in the \fBcvs\fP source repository. .SP A module definition can refer to other modules by including `\|\fB&\fP\fImodule\fP\|' in its definition. \fBcheckout\fP creates a subdirectory for each such \fImodule\fP, in your working directory. .br .I New in \fBcvs\fP 1.3; avoid this feature if sharing module definitions with older versions of \fBcvs\fP. .SP Finally, you can use one or more of the following \fIoptions\fP in module definitions: .SP \&`\|\fB\-d\fP \fIname\fP\|', to name the working directory something other than the module name. .br .I New in \fBcvs\fP 1.3; avoid this feature if sharing module definitions with older versions of \fBcvs\fP. .SP \&`\|\fB\-i\fP \fIprog\fP\|' allows you to specify a program \fIprog\fP to run whenever files in a module are committed. \fIprog\fP runs with a single argument, the full pathname of the affected directory in a source repository. The `\|commitinfo\|', `\|loginfo\|', and `\|editinfo\|' files provide other ways to call a program on \fBcommit\fP. .SP `\|\fB\-o\fP \fIprog\fP\|' allows you to specify a program \fIprog\fP to run whenever files in a module are checked out. \fIprog\fP runs with a single argument, the module name. .SP `\|\fB\-e\fP \fIprog\fP\|' allows you to specify a program \fIprog\fP to run whenever files in a module are exported. \fIprog\fP runs with a single argument, the module name. .SP `\|\fB\-t\fP \fIprog\fP\|' allows you to specify a program \fIprog\fP to run whenever files in a module are tagged. \fIprog\fP runs with two arguments: the module name and the symbolic tag specified to \fBrtag\fP. .SP `\|\fB\-u\fP \fIprog\fP\|' allows you to specify a program \fIprog\fP to run whenever `\|\fBcvs update\fP\|' is executed from the top-level directory of the checked-out module. \fIprog\fP runs with a single argument, the full path to the source repository for this module. .TP \&\fBcommitinfo\fP, \fBloginfo\fP, \fBrcsinfo\fP, \fBeditinfo\fP These files all specify programs to call at different points in the `\|\fBcvs commit\fP\|' process. They have a common structure. Each line is a pair of fields: a regular expression, separated by whitespace from a filename or command-line template. Whenever one of the regular expression matches a directory name in the repository, the rest of the line is used. If the line begins with a \fB#\fP character, the entire line is considered a comment and is ignored. Whitespace between the fields is also ignored. .SP For `\|loginfo\|', the rest of the line is a command-line template to execute. The templates can include not only a program name, but whatever list of arguments you wish. If you write `\|\fB%s\fP\|' somewhere on the argument list, \fBcvs\fP supplies, at that point, the list of files affected by the \fBcommit\fP. The first entry in the list is the relative path within the source repository where the change is being made. The remaining arguments list the files that are being modified, added, or removed by this \fBcommit\fP invocation. .SP For `\|taginfo\|', the rest of the line is a command-line template to execute. The arguments passed to the command are, in order, the .I tagname , .I operation (i.e. .B add for `tag', .B mov for `tag -F', and .B del for `tag -d`), .I repository , and any remaining are pairs of .B "filename revision" . A non-zero exit of the filter program will cause the tag to be aborted. .SP For `\|commitinfo\|', the rest of the line is a command-line template to execute. The template can include not only a program name, but whatever list of arguments you wish. The full path to the current source repository is appended to the template, followed by the file names of any files involved in the commit (added, removed, and modified files). .SP For `\|rcsinfo\|', the rest of the line is the full path to a file that should be loaded into the log message template. .SP For `\|editinfo\|', the rest of the line is a command-line template to execute. The template can include not only a program name, but whatever list of arguments you wish. The full path to the current log message template file is appended to the template. .SP You can use one of two special strings instead of a regular expression: `\|\fBALL\fP\|' specifies a command line template that must always be executed, and `\|\fBDEFAULT\fP\|' specifies a command line template to use if no regular expression is a match. .SP The `\|commitinfo\|' file contains commands to execute \fIbefore\fP any other \fBcommit\fP activity, to allow you to check any conditions that must be satisfied before \fBcommit\fP can proceed. The rest of the \fBcommit\fP will execute only if all selected commands from this file exit with exit status \fB0\fP. .SP The `\|rcsinfo\|' file allows you to specify \fIlog templates\fP for the \fBcommit\fP logging session; you can use this to provide a form to edit when filling out the \fBcommit\fP log. The field after the regular expression, in this file, contains filenames (of files containing the logging forms) rather than command templates. .SP The `\|editinfo\|' file allows you to execute a script \fIbefore the commit starts\fP, but after the log information is recorded. These "edit" scripts can verify information recorded in the log file. If the edit script exits with a non-zero exit status, the commit is aborted. .SP The `\|loginfo\|' file contains commands to execute \fIat the end\fP of a commit. The text specified as a commit log message is piped through the command; typical uses include sending mail, filing an article in a newsgroup, or appending to a central file. .TP \&\fBcvsignore\fP, \fB.cvsignore\fP The default list of files (or .BR sh ( 1 ) file name patterns) to ignore during `\|\fBcvs update\fP\|'. At startup time, \fBcvs\fP loads the compiled in default list of file name patterns (see .BR cvs ( 1 )). Then the per-repository list included in \fB$CVSROOT/CVSROOT/cvsignore\fP is loaded, if it exists. Then the per-user list is loaded from `\|$HOME/.cvsignore\|'. Finally, as \fBcvs\fP traverses through your directories, it will load any per-directory `\|.cvsignore\|' files whenever it finds one. These per-directory files are only valid for exactly the directory that contains them, not for any sub-directories. .TP .B history Create this file in \fB$CVSROOT/CVSROOT\fP to enable history logging (see the description of `\|\fBcvs history\fP\|'). .SH "SEE ALSO" .BR cvs ( 1 ), .SH COPYING Copyright \(co 1992 Cygnus Support, Brian Berliner, and Jeff Polk .PP 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. .PP Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. .PP 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 included in translations approved by the Free Software Foundation instead of in the original English. 07070100106ba4000041ed0000000000000000000000024d58a1ff00000000000000b600010002ffffffffffffffff0000001e00000000root/usr/local/share/man/man807070100106ba5000081a40000000000000000000000014d58a1f800001bd9000000b600010002ffffffffffffffff0000002700000000root/usr/local/share/man/man8/cvsbug.8.\" -*- nroff -*- .\" --------------------------------------------------------------------------- .\" man page for send-pr (by Heinz G. Seidl, hgs@cygnus.com) .\" updated Feb 1993 for GNATS 3.00 by Jeffrey Osier, jeffrey@cygnus.com .\" .\" This file is part of the Problem Report Management System (GNATS) .\" Copyright 1992 Cygnus Support .\" .\" This program is free software; you can redistribute it and/or .\" modify it under the terms of the GNU General Public .\" License as published by the Free Software Foundation; either .\" version 2 of the License, or (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU .\" General Public License for more details. .\" .\" --------------------------------------------------------------------------- .nh .TH CVSBUG 8 xVERSIONx "February 1993" .SH NAME cvsbug \- send problem report (PR) about CVS to a central support site .SH SYNOPSIS .B cvsbug [ .I site ] [ .B \-f .I problem-report ] [ .B \-t .I mail-address ] .br .in +0.8i [ .B \-P ] [ .B \-L ] [ .B \-\-request-id ] [ .B \-v ] .SH DESCRIPTION .B cvsbug is a tool used to submit .I problem reports .\" SITE ADMINISTRATORS - change this if you use a local default (PRs) to a central support site. In most cases the correct .I site will be the default. This argument indicates the support site which is responsible for the category of problem involved. Some sites may use a local address as a default. .I site values are defined by using the .BR aliases (5). .LP .B cvsbug invokes an editor on a problem report template (after trying to fill in some fields with reasonable default values). When you exit the editor, .B cvsbug sends the completed form to the .I Problem Report Management System (\fBGNATS\fR) at a central support site. At the support site, the PR is assigned a unique number and is stored in the \fBGNATS\fR database according to its category and submitter-id. \fBGNATS\fR automatically replies with an acknowledgement, citing the category and the PR number. .LP To ensure that a PR is handled promptly, it should contain your (unique) \fIsubmitter-id\fR and one of the available \fIcategories\fR to identify the problem area. (Use .B `cvsbug -L' to see a list of categories.) .LP The .B cvsbug template at your site should already be customized with your submitter-id (running `\|\fBinstall-sid\fP \fIsubmitter-id\fP\|' to accomplish this is part of the installation procedures for .BR cvsbug ). If this hasn't been done, see your system administrator for your submitter-id, or request one from your support site by invoking .B `cvsbug \-\-request\-id'. If your site does not distinguish between different user sites, or if you are not affiliated with the support site, use .B `net' for this field. .LP The more precise your problem description and the more complete your information, the faster your support team can solve your problems. .SH OPTIONS .TP .BI \-f " problem-report" specify a file (\fIproblem-report\fR) which already contains a complete problem report. .B cvsbug sends the contents of the file without invoking the editor. If the value for .I problem-report is .BR `\|\-\|' , then .B cvsbug reads from standard input. .TP .BI \-t " mail-address" Change mail address at the support site for problem reports. The default .I mail-address is the address used for the default .IR site . Use the .I site argument rather than this option in nearly all cases. .TP .B \-P print the form specified by the environment variable .B PR_FORM on standard output. If .B PR_FORM is not set, print the standard blank PR template. No mail is sent. .TP .B -L print the list of available categories. No mail is sent. .TP .B \-\-request\-id sends mail to the default support site, or .I site if specified, with a request for your .IR submitter-id . If you are not affiliated with .IR site , use a .I submitter-id of .BR net \|'. .TP .B \-v Display the .B cvsbug version number. .LP Note: use .B cvsbug to submit problem reports rather than mailing them directly. Using both the template and .B cvsbug itself will help ensure all necessary information will reach the support site. .SH ENVIRONMENT The environment variable .B EDITOR specifies the editor to invoke on the template. .br default: .B vi .sp If the environment variable .B PR_FORM is set, then its value is used as the file name of the template for your problem-report editing session. You can use this to start with a partially completed form (for example, a form with the identification fields already completed). .SH "HOW TO FILL OUT A PROBLEM REPORT" Problem reports have to be in a particular form so that a program can easily manage them. Please remember the following guidelines: .IP \(bu 3m describe only .B one problem with each problem report. .IP \(bu 3m For follow-up mail, use the same subject line as the one in the automatic acknowledgement. It consists of category, PR number and the original synopsis line. This allows the support site to relate several mail messages to a particular PR and to record them automatically. .IP \(bu 3m Please try to be as accurate as possible in the subject and/or synopsis line. .IP \(bu 3m The subject and the synopsis line are not confidential. This is because open-bugs lists are compiled from them. Avoid confidential information there. .LP See the GNU .B Info file .B cvsbug.info or the document \fIReporting Problems With cvsbug\fR\ for detailed information on reporting problems .SH "HOW TO SUBMIT TEST CASES, CODE, ETC." Submit small code samples with the PR. Contact the support site for instructions on submitting larger test cases and problematic source code. .SH FILES .ta \w'/tmp/pbad$$ 'u /tmp/p$$ copy of PR used in editing session .br /tmp/pf$$ copy of empty PR form, for testing purposes .br /tmp/pbad$$ file for rejected PRs .SH INSTALLATION AND CONFIGURATION See .B INSTALL for installation instructions. .SH SEE ALSO .BR gnats (l), .BR query-pr (1), .BR edit-pr (1), .BR gnats (8), .BR queue-pr (8), .BR at-pr (8), .BR mkcat (8), .BR mkdist (8). .SH AUTHORS Jeffrey Osier, Brendan Kehoe, Jason Merrill, Heinz G. Seidl (Cygnus Support) .SH COPYING Copyright (c) 1992, 1993 Free Software Foundation, Inc. .PP 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. .PP Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. .PP 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 included in translations approved by the Free Software Foundation instead of in the original English. 07070100106b99000041ed0000000000000000000000024d58a1ff00000000000000b600010002ffffffffffffffff0000001a00000000root/usr/local/share/info07070100106b9d000081a40000000000000000000000014d58a1f800016bdc000000b600010002ffffffffffffffff0000002900000000root/usr/local/share/info/cvsclient.infoThis is cvsclient.info, produced by makeinfo version 4.8 from cvsclient.texi. INFO-DIR-SECTION Programming START-INFO-DIR-ENTRY * cvsclient: (cvsclient). The CVS client/server protocol. END-INFO-DIR-ENTRY  File: cvsclient.info, Node: Top, Next: Introduction, Up: (dir) CVS Client/Server ***************** This document describes the client/server protocol used by CVS. It does not describe how to use or administer client/server CVS; see the regular CVS manual for that. This is version 1.11.23 of the protocol specification--*Note Introduction::, for more on what this version number means. * Menu: * Introduction:: What is CVS and what is the client/server protocol for? * Goals:: Basic design decisions, requirements, scope, etc. * Connection and Authentication:: Various ways to connect to the server * Password scrambling:: Scrambling used by pserver * Protocol:: Complete description of the protocol * Protocol Notes:: Possible enhancements, limitations, etc. of the protocol  File: cvsclient.info, Node: Introduction, Next: Goals, Prev: Top, Up: Top 1 Introduction ************** CVS is a version control system (with some additional configuration management functionality). It maintains a central "repository" which stores files (often source code), including past versions, information about who modified them and when, and so on. People who wish to look at or modify those files, known as "developers", use CVS to "check out" a "working directory" from the repository, to "check in" new versions of files to the repository, and other operations such as viewing the modification history of a file. If developers are connected to the repository by a network, particularly a slow or flaky one, the most efficient way to use the network is with the CVS-specific protocol described in this document. Developers, using the machine on which they store their working directory, run the CVS "client" program. To perform operations which cannot be done locally, it connects to the CVS "server" program, which maintains the repository. For more information on how to connect see *Note Connection and Authentication::. This document describes the CVS protocol. Unfortunately, it does not yet completely document one aspect of the protocol--the detailed operation of each CVS command and option--and one must look at the CVS user documentation, `cvs.texinfo', for that information. The protocol is non-proprietary (anyone who wants to is encouraged to implement it) and an implementation, known as CVS, is available under the GNU Public License. The CVS distribution, containing this implementation, `cvs.texinfo', and a copy (possibly more or less up to date than what you are reading now) of this document, `cvsclient.texi', can be found at the usual GNU FTP sites, with a filename such as `cvs-VERSION.tar.gz'. This is version 1.11.23 of the protocol specification. This version number is intended only to aid in distinguishing different versions of this specification. Although the specification is currently maintained in conjunction with the CVS implementation, and carries the same version number, it also intends to document what is involved with interoperating with other implementations (such as other versions of CVS); see *Note Requirements::. This version number should not be used by clients or servers to determine what variant of the protocol to speak; they should instead use the `valid-requests' and `Valid-responses' mechanism (*note Protocol::), which is more flexible.  File: cvsclient.info, Node: Goals, Next: Connection and Authentication, Prev: Introduction, Up: Top 2 Goals ******* * Do not assume any access to the repository other than via this protocol. It does not depend on NFS, rdist, etc. * Providing a reliable transport is outside this protocol. The protocol expects a reliable transport that is transparent (that is, there is no translation of characters, including characters such as linefeeds or carriage returns), and can transmit all 256 octets (for example for proper handling of binary files, compression, and encryption). The encoding of characters specified by the protocol (the names of requests and so on) is the invariant ISO 646 character set (a subset of most popular character sets including ASCII and others). For more details on running the protocol over the TCP reliable transport, see *Note Connection and Authentication::. * Security and authentication are handled outside this protocol (but see below about `cvs kserver' and `cvs pserver'). * The protocol makes it possible for updates to be atomic with respect to checkins; that is if someone commits changes to several files in one cvs command, then an update by someone else would either get all the changes, or none of them. The current CVS server can't do this, but that isn't the protocol's fault. * The protocol is, with a few exceptions, transaction-based. That is, the client sends all its requests (without waiting for server responses), and then waits for the server to send back all responses (without waiting for further client requests). This has the advantage of minimizing network turnarounds and the disadvantage of sometimes transferring more data than would be necessary if there were a richer interaction. Another, more subtle, advantage is that there is no need for the protocol to provide locking for features such as making checkins atomic with respect to updates. Any such locking can be handled entirely by the server. A good server implementation (such as the current CVS server) will make sure that it does not have any such locks in place whenever it is waiting for communication with the client; this prevents one client on a slow or flaky network from interfering with the work of others. * It is a general design goal to provide only one way to do a given operation (where possible). For example, implementations have no choice about whether to terminate lines with linefeeds or some other character(s), and request and response names are case-sensitive. This is to enhance interoperability. If a protocol allows more than one way to do something, it is all too easy for some implementations to support only some of them (perhaps accidentally).  File: cvsclient.info, Node: Connection and Authentication, Next: Password scrambling, Prev: Goals, Up: Top 3 How to Connect to and Authenticate Oneself to the CVS server ************************************************************** Connection and authentication occurs before the CVS protocol itself is started. There are several ways to connect. server If the client has a way to execute commands on the server, and provide input to the commands and output from them, then it can connect that way. This could be the usual rsh (port 514) protocol, Kerberos rsh, SSH, or any similar mechanism. The client may allow the user to specify the name of the server program; the default is `cvs'. It is invoked with one argument, `server'. Once it invokes the server, the client proceeds to start the cvs protocol. kserver The kerberized server listens on a port (in the current implementation, by having inetd call "cvs kserver") which defaults to 1999. The client connects, sends the usual kerberos authentication information, and then starts the cvs protocol. Note: port 1999 is officially registered for another use, and in any event one cannot register more than one port for CVS, so GSS-API (see below) is recommended instead of kserver as a way to support kerberos. pserver The name "pserver" is somewhat confusing. It refers to both a generic framework which allows the CVS protocol to support several authentication mechanisms, and a name for a specific mechanism which transfers a username and a cleartext password. Servers need not support all mechanisms, and in fact servers will typically want to support only those mechanisms which meet the relevant security needs. The pserver server listens on a port (in the current implementation, by having inetd call "cvs pserver") which defaults to 2401 (this port is officially registered). The client connects, and sends the following: * the string `BEGIN AUTH REQUEST', a linefeed, * the cvs root, a linefeed, * the username, a linefeed, * the password trivially encoded (see *Note Password scrambling::), a linefeed, * the string `END AUTH REQUEST', and a linefeed. The client must send the identical string for cvs root both here and later in the `Root' request of the cvs protocol itself. Servers are encouraged to enforce this restriction. The possible server responses (each of which is followed by a linefeed) are the following. Note that although there is a small similarity between this authentication protocol and the cvs protocol, they are separate. `I LOVE YOU' The authentication is successful. The client proceeds with the cvs protocol itself. `I HATE YOU' The authentication fails. After sending this response, the server may close the connection. It is up to the server to decide whether to give this response, which is generic, or a more specific response using `E' and/or `error'. `E TEXT' Provide a message for the user. After this response, the authentication protocol continues with another response. Typically the server will provide a series of `E' responses followed by `error'. Compatibility note: CVS 1.9.10 and older clients will print `unrecognized auth response' and TEXT, and then exit, upon receiving this response. `error CODE TEXT' The authentication fails. After sending this response, the server may close the connection. The CODE is a code describing why it failed, intended for computer consumption. The only code currently defined is `0' which is nonspecific, but clients must silently treat any unrecognized codes as nonspecific. The TEXT should be supplied to the user. Compatibility note: CVS 1.9.10 and older clients will print `unrecognized auth response' and TEXT, and then exit, upon receiving this response. Note that TEXT for this response, or the TEXT in an `E' response, is not designed for machine parsing. More vigorous use of CODE, or future extensions, will be needed to prove a cleaner machine-parseable indication of what the error was. If the client wishes to merely authenticate without starting the cvs protocol, the procedure is the same, except BEGIN AUTH REQUEST is replaced with BEGIN VERIFICATION REQUEST, END AUTH REQUEST is replaced with END VERIFICATION REQUEST, and upon receipt of I LOVE YOU the connection is closed rather than continuing. Another mechanism is GSSAPI authentication. GSSAPI is a generic interface to security services such as kerberos. GSSAPI is specified in RFC2078 (GSSAPI version 2) and RFC1508 (GSSAPI version 1); we are not aware of differences between the two which affect the protocol in incompatible ways, so we make no attempt to specify one version or the other. The procedure here is to start with `BEGIN GSSAPI REQUEST'. GSSAPI authentication information is then exchanged between the client and the server. Each packet of information consists of a two byte big-endian length, followed by that many bytes of data. After the GSSAPI authentication is complete, the server continues with the responses described above (`I LOVE YOU', etc.). future possibilities There are a nearly unlimited number of ways to connect and authenticate. One might want to allow access based on IP address (similar to the usual rsh protocol but with different/no restrictions on ports < 1024), to adopt mechanisms such as Pluggable Authentication Modules (PAM), to allow users to run their own servers under their own usernames without root access, or any number of other possibilities. The way to add future mechanisms, for the most part, should be to continue to use port 2401, but to use different strings in place of `BEGIN AUTH REQUEST'.  File: cvsclient.info, Node: Password scrambling, Next: Protocol, Prev: Connection and Authentication, Up: Top 4 Password scrambling algorithm ******************************* The pserver authentication protocol, as described in *Note Connection and Authentication::, trivially encodes the passwords. This is only to prevent inadvertent compromise; it provides no protection against even a relatively unsophisticated attacker. For comparison, HTTP Basic Authentication (as described in RFC2068) uses BASE64 for a similar purpose. CVS uses its own algorithm, described here. The scrambled password starts with `A', which serves to identify the scrambling algorithm in use. After that follows a single octet for each character in the password, according to a fixed encoding. The values are shown here, with the encoded values in decimal. Control characters, space, and characters outside the invariant ISO 646 character set are not shown; such characters are not recommended for use in passwords. There is a long discussion of character set issues in *Note Protocol Notes::. 0 111 P 125 p 58 ! 120 1 52 A 57 Q 55 a 121 q 113 " 53 2 75 B 83 R 54 b 117 r 32 3 119 C 43 S 66 c 104 s 90 4 49 D 46 T 124 d 101 t 44 % 109 5 34 E 102 U 126 e 100 u 98 & 72 6 82 F 40 V 59 f 69 v 60 ' 108 7 81 G 89 W 47 g 73 w 51 ( 70 8 95 H 38 X 92 h 99 x 33 ) 64 9 65 I 103 Y 71 i 63 y 97 * 76 : 112 J 45 Z 115 j 94 z 62 + 67 ; 86 K 50 k 93 , 116 < 118 L 42 l 39 - 74 = 110 M 123 m 37 . 68 > 122 N 91 n 61 / 87 ? 105 O 35 _ 56 o 48  File: cvsclient.info, Node: Protocol, Next: Protocol Notes, Prev: Password scrambling, Up: Top 5 The CVS client/server protocol ******************************** In the following, `\n' refers to a linefeed and `\t' refers to a horizontal tab; "requests" are what the client sends and "responses" are what the server sends. In general, the connection is governed by the client--the server does not send responses without first receiving requests to do so; see *Note Response intro:: for more details of this convention. It is typical, early in the connection, for the client to transmit a `Valid-responses' request, containing all the responses it supports, followed by a `valid-requests' request, which elicits from the server a `Valid-requests' response containing all the requests it understands. In this way, the client and server each find out what the other supports before exchanging large amounts of data (such as file contents). * Menu: General protocol conventions: * Entries Lines:: Transmitting RCS data * File Modes:: Read, write, execute, and possibly more... * Filenames:: Conventions regarding filenames * File transmissions:: How file contents are transmitted * Strings:: Strings in various requests and responses * Dates:: Times and dates The protocol itself: * Request intro:: General conventions relating to requests * Requests:: List of requests * Response intro:: General conventions relating to responses * Response pathnames:: The "pathname" in responses * Responses:: List of responses * Text tags:: More details about the MT response An example session, and some further observations: * Example:: A conversation between client and server * Requirements:: Things not to omit from an implementation * Obsolete:: Former protocol features  File: cvsclient.info, Node: Entries Lines, Next: File Modes, Up: Protocol 5.1 Entries Lines ================= Entries lines are transmitted as: / NAME / VERSION / CONFLICT / OPTIONS / TAG_OR_DATE TAG_OR_DATE is either `T' TAG or `D' DATE or empty. If it is followed by a slash, anything after the slash shall be silently ignored. VERSION can be empty, or start with `0' or `-', for no user file, new user file, or user file to be removed, respectively. CONFLICT, if it starts with `+', indicates that the file had conflicts in it. The rest of CONFLICT is `=' if the timestamp matches the file, or anything else if it doesn't. If CONFLICT does not start with a `+', it is silently ignored. OPTIONS signifies the keyword expansion options (for example `-ko'). In an `Entry' request, this indicates the options that were specified with the file from the previous file updating response (*note Response intro::, for a list of file updating responses); if the client is specifying the `-k' or `-A' option to `update', then it is the server which figures out what overrides what.  File: cvsclient.info, Node: File Modes, Next: Filenames, Prev: Entries Lines, Up: Protocol 5.2 File Modes ============== A mode is any number of repetitions of MODE-TYPE = DATA separated by `,'. MODE-TYPE is an identifier composed of alphanumeric characters. Currently specified: `u' for user, `g' for group, `o' for other (see below for discussion of whether these have their POSIX meaning or are more loose). Unrecognized values of MODE-TYPE are silently ignored. DATA consists of any data not containing `,', `\0' or `\n'. For `u', `g', and `o' mode types, data consists of alphanumeric characters, where `r' means read, `w' means write, `x' means execute, and unrecognized letters are silently ignored. The two most obvious ways in which the mode matters are: (1) is it writeable? This is used by the developer communication features, and is implemented even on OS/2 (and could be implemented on DOS), whose notion of mode is limited to a readonly bit. (2) is it executable? Unix CVS users need CVS to store this setting (for shell scripts and the like). The current CVS implementation on unix does a little bit more than just maintain these two settings, but it doesn't really have a nice general facility to store or version control the mode, even on unix, much less across operating systems with diverse protection features. So all the ins and outs of what the mode means across operating systems haven't really been worked out (e.g. should the VMS port use ACLs to get POSIX semantics for groups?).  File: cvsclient.info, Node: Filenames, Next: File transmissions, Prev: File Modes, Up: Protocol 5.3 Conventions regarding transmission of file names ==================================================== In most contexts, `/' is used to separate directory and file names in filenames, and any use of other conventions (for example, that the user might type on the command line) is converted to that form. The only exceptions might be a few cases in which the server provides a magic cookie which the client then repeats verbatim, but as the server has not yet been ported beyond unix, the two rules provide the same answer (and what to do if future server ports are operating on a repository like e:/foo or CVS_ROOT:[FOO.BAR] has not been carefully thought out). Characters outside the invariant ISO 646 character set should be avoided in filenames. This restriction may need to be relaxed to allow for characters such as `[' and `]' (see above about non-unix servers); this has not been carefully considered (and currently implementations probably use whatever character sets that the operating systems they are running on allow, and/or that users specify). Of course the most portable practice is to restrict oneself further, to the POSIX portable filename character set as specified in POSIX.1.  File: cvsclient.info, Node: File transmissions, Next: Strings, Prev: Filenames, Up: Protocol 5.4 File transmissions ====================== File contents (noted below as FILE TRANSMISSION) can be sent in one of two forms. The simpler form is a number of bytes, followed by a linefeed, followed by the specified number of bytes of file contents. These are the entire contents of the specified file. Second, if both client and server support `gzip-file-contents', a `z' may precede the length, and the `file contents' sent are actually compressed with `gzip' (RFC1952/1951) compression. The length specified is that of the compressed version of the file. In neither case are the file content followed by any additional data. The transmission of a file will end with a linefeed iff that file (or its compressed form) ends with a linefeed. The encoding of file contents depends on the value for the `-k' option. If the file is binary (as specified by the `-kb' option in the appropriate place), then it is just a certain number of octets, and the protocol contributes nothing towards determining the encoding (using the file name is one widespread, if not universally popular, mechanism). If the file is text (not binary), then the file is sent as a series of lines, separated by linefeeds. If the keyword expansion is set to something other than `-ko', then it is expected that the file conform to the RCS expectations regarding keyword expansion--in particular, that it is in a character set such as ASCII in which 0x24 is a dollar sign (`$').  File: cvsclient.info, Node: Strings, Next: Dates, Prev: File transmissions, Up: Protocol 5.5 Strings =========== In various contexts, for example the `Argument' request and the `M' response, one transmits what is essentially an arbitrary string. Often this will have been supplied by the user (for example, the `-m' option to the `ci' request). The protocol has no mechanism to specify the character set of such strings; it would be fairly safe to stick to the invariant ISO 646 character set but the existing practice is probably to just transmit whatever the user specifies, and hope that everyone involved agrees which character set is in use, or sticks to a common subset.  File: cvsclient.info, Node: Dates, Next: Request intro, Prev: Strings, Up: Protocol 5.6 Dates ========= The protocol contains times and dates in various places. For the `-D' option to the `annotate', `co', `diff', `export', `history', `rannotate', `rdiff', `rtag', `tag', and `update' requests, the server should support two formats: 26 May 1997 13:01:40 -0000 ; RFC 822 as modified by RFC 1123 5/26/1997 13:01:40 GMT ; traditional The former format is preferred; the latter however is sent by the CVS command line client (versions 1.5 through at least 1.9). For the `-d' option to the `log' and `rlog' requests, servers should at least support RFC 822/1123 format. Clients are encouraged to use this format too (the command line CVS client, version 1.10 and older, just passed along the date format specified by the user, however). The `Mod-time' response and `Checkin-time' request use RFC 822/1123 format (see the descriptions of that response and request for details). For `Notify', see the description of that request.  File: cvsclient.info, Node: Request intro, Next: Requests, Prev: Dates, Up: Protocol 5.7 Request intro ================= By convention, requests which begin with a capital letter do not elicit a response from the server, while all others do - save one. The exception is `gzip-file-contents'. Unrecognized requests will always elicit a response from the server, even if that request begins with a capital letter. The term "command" means a request which expects a response (except `valid-requests'). The general model is that the client transmits a great number of requests, but nothing happens until the very end when the client transmits a command. Although the intention is that transmitting several commands in one connection should be legal, existing servers probably have some bugs with some combinations of more than one command, and so clients may find it necessary to make several connections in some cases. This should be thought of as a workaround rather than a desired attribute of the protocol.  File: cvsclient.info, Node: Requests, Next: Response intro, Prev: Request intro, Up: Protocol 5.8 Requests ============ Here are the requests: `Root PATHNAME \n' Response expected: no. Tell the server which `CVSROOT' to use. Note that PATHNAME is _not_ a fully qualified `CVSROOT' variable, but only the local directory part of it. PATHNAME must already exist on the server. Again, PATHNAME _does not_ include the hostname of the server, how to access the server, etc.; by the time the CVS protocol is in use, connection, authentication, etc., are already taken care of. The `Root' request must be sent only once, and it must be sent before any requests other than `Valid-responses', `valid-requests', `UseUnchanged', `Set', `Global_option', `noop', or `version'. `Valid-responses REQUEST-LIST \n' Response expected: no. Tell the server what responses the client will accept. request-list is a space separated list of tokens. The `Root' request need not have been previously sent. `valid-requests \n' Response expected: yes. Ask the server to send back a `Valid-requests' response. The `Root' request need not have been previously sent. `Directory LOCAL-DIRECTORY \n' Additional data: REPOSITORY \n. Response expected: no. Tell the server what directory to use. The REPOSITORY should be a directory name from a previous server response. Note that this both gives a default for `Entry' and `Modified' and also for `ci' and the other commands; normal usage is to send `Directory' for each directory in which there will be an `Entry' or `Modified', and then a final `Directory' for the original directory, then the command. The LOCAL-DIRECTORY is relative to the top level at which the command is occurring (i.e., the last `Directory' which is sent before the command); to indicate that top level, `.' should be sent for LOCAL-DIRECTORY. Here is an example of where a client gets REPOSITORY and LOCAL-DIRECTORY. Suppose that there is a module defined by moddir 1dir That is, one can check out `moddir' and it will take `1dir' in the repository and check it out to `moddir' in the working directory. Then an initial check out could proceed like this: C: Root /home/kingdon/zwork/cvsroot . . . C: Argument moddir C: Directory . C: /home/kingdon/zwork/cvsroot C: co S: Clear-sticky moddir/ S: /home/kingdon/zwork/cvsroot/1dir/ . . . S: ok In this example the response shown is `Clear-sticky', but it could be another response instead. Note that it returns two pathnames. The first one, `moddir/', indicates the working directory to check out into. The second one, ending in `1dir/', indicates the directory to pass back to the server in a subsequent `Directory' request. For example, a subsequent `update' request might look like: C: Directory moddir C: /home/kingdon/zwork/cvsroot/1dir . . . C: update For a given LOCAL-DIRECTORY, the repository will be the same for each of the responses, so one can use the repository from whichever response is most convenient. Typically a client will store the repository along with the sources for each LOCAL-DIRECTORY, use that same setting whenever operating on that LOCAL-DIRECTORY, and not update the setting as long as the LOCAL-DIRECTORY exists. A client is free to rename a LOCAL-DIRECTORY at any time (for example, in response to an explicit user request). While it is true that the server supplies a LOCAL-DIRECTORY to the client, as noted above, this is only the default place to put the directory. Of course, the various `Directory' requests for a single command (for example, `update' or `ci' request) should name a particular directory with the same LOCAL-DIRECTORY. Each `Directory' request specifies a brand-new LOCAL-DIRECTORY and REPOSITORY; that is, LOCAL-DIRECTORY and REPOSITORY are never relative to paths specified in any previous `Directory' request. Here's a more complex example, in which we request an update of a working directory which has been checked out from multiple places in the repository. C: Argument dir1 C: Directory dir1 C: /home/foo/repos/mod1 . . . C: Argument dir2 C: Directory dir2 C: /home/foo/repos/mod2 . . . C: Argument dir3 C: Directory dir3/subdir3 C: /home/foo/repos/mod3 . . . C: update While directories `dir1' and `dir2' will be handled in similar fashion to the other examples given above, `dir3' is slightly different from the server's standpoint. Notice that module `mod3' is actually checked out into `dir3/subdir3', meaning that directory `dir3' is either empty or does not contain data checked out from this repository. The above example will work correctly in CVS 1.10.1 and later. The server will descend the tree starting from all directories mentioned in `Argument' requests and update those directories specifically mentioned in `Directory' requests. Previous versions of CVS (1.10 and earlier) do not behave the same way. While the descent of the tree begins at all directories mentioned in `Argument' requests, descent into subdirectories only occurs if a directory has been mentioned in a `Directory' request. Therefore, the above example would succeed in updating `dir1' and `dir2', but would skip `dir3' because that directory was not specifically mentioned in a `Directory' request. A functional version of the above that would run on a 1.10 or earlier server is as follows: C: Argument dir1 C: Directory dir1 C: /home/foo/repos/mod1 . . . C: Argument dir2 C: Directory dir2 C: /home/foo/repos/mod2 . . . C: Argument dir3 C: Directory dir3 C: /home/foo/repos/. . . . C: Directory dir3/subdir3 C: /home/foo/repos/mod3 . . . C: update Note the extra `Directory dir3' request. It might be better to use `Emptydir' as the repository for the `dir3' directory, but the above will certainly work. One more peculiarity of the 1.10 and earlier protocol is the ordering of `Directory' arguments. In order for a subdirectory to be registered correctly for descent by the recursion processor, its parent must be sent first. For example, the following would not work to update `dir3/subdir3': . . . C: Argument dir3 C: Directory dir3/subdir3 C: /home/foo/repos/mod3 . . . C: Directory dir3 C: /home/foo/repos/. . . . C: update The implementation of the server in 1.10 and earlier writes the administration files for a given directory at the time of the `Directory' request. It also tries to register the directory with its parent to mark it for recursion. In the above example, at the time `dir3/subdir3' is created, the physical directory for `dir3' will be created on disk, but the administration files will not have been created. Therefore, when the server tries to register `dir3/subdir3' for recursion, the operation will silently fail because the administration files do not yet exist for `dir3'. `Max-dotdot LEVEL \n' Response expected: no. Tell the server that LEVEL levels of directories above the directory which `Directory' requests are relative to will be needed. For example, if the client is planning to use a `Directory' request for `../../foo', it must send a `Max-dotdot' request with a LEVEL of at least 2. `Max-dotdot' must be sent before the first `Directory' request. `Static-directory \n' Response expected: no. Tell the server that the directory most recently specified with `Directory' should not have additional files checked out unless explicitly requested. The client sends this if the `Entries.Static' flag is set, which is controlled by the `Set-static-directory' and `Clear-static-directory' responses. `Sticky TAGSPEC \n' Response expected: no. Tell the server that the directory most recently specified with `Directory' has a sticky tag or date TAGSPEC. The first character of TAGSPEC is `T' for a tag, `D' for a date, or some other character supplied by a Set-sticky response from a previous request to the server. The remainder of TAGSPEC contains the actual tag or date, again as supplied by Set-sticky. The server should remember `Static-directory' and `Sticky' requests for a particular directory; the client need not resend them each time it sends a `Directory' request for a given directory. However, the server is not obliged to remember them beyond the context of a single command. `Entry ENTRY-LINE \n' Response expected: no. Tell the server what version of a file is on the local machine. The name in ENTRY-LINE is a name relative to the directory most recently specified with `Directory'. If the user is operating on only some files in a directory, `Entry' requests for only those files need be included. If an `Entry' request is sent without `Modified', `Is-modified', or `Unchanged', it means the file is lost (does not exist in the working directory). If both `Entry' and one of `Modified', `Is-modified', or `Unchanged' are sent for the same file, `Entry' must be sent first. For a given file, one can send `Modified', `Is-modified', or `Unchanged', but not more than one of these three. `Kopt OPTION \n' This indicates to the server which keyword expansion options to use for the file specified by the next `Modified' or `Is-modified' request (for example `-kb' for a binary file). This is similar to `Entry', but is used for a file for which there is no entries line. Typically this will be a file being added via an `add' or `import' request. The client may not send both `Kopt' and `Entry' for the same file. `Checkin-time TIME \n' For the file specified by the next `Modified' request, use TIME as the time of the checkin. The TIME is in the format specified by RFC822 as modified by RFC1123. The client may specify any timezone it chooses; servers will want to convert that to their own timezone as appropriate. An example of this format is: 26 May 1997 13:01:40 -0400 There is no requirement that the client and server clocks be synchronized. The client just sends its recommendation for a timestamp (based on file timestamps or whatever), and the server should just believe it (this means that the time might be in the future, for example). Note that this is not a general-purpose way to tell the server about the timestamp of a file; that would be a separate request (if there are servers which can maintain timestamp and time of checkin separately). This request should affect the `import' request, and may optionally affect the `ci' request or other relevant requests if any. `Modified FILENAME \n' Response expected: no. Additional data: mode, \n, file transmission. Send the server a copy of one locally modified file. FILENAME is a file within the most recent directory sent with `Directory'; it must not contain `/'. If the user is operating on only some files in a directory, only those files need to be included. This can also be sent without `Entry', if there is no entry for the file. `Is-modified FILENAME \n' Response expected: no. Additional data: none. Like `Modified', but used if the server only needs to know whether the file is modified, not the contents. The commands which can take `Is-modified' instead of `Modified' with no known change in behavior are: `admin', `diff' (if and only if two `-r' or `-D' options are specified), `watch-on', `watch-off', `watch-add', `watch-remove', `watchers', `editors', `log', and `annotate'. For the `status' command, one can send `Is-modified' but if the client is using imperfect mechanisms such as timestamps to determine whether to consider a file modified, then the behavior will be different. That is, if one sends `Modified', then the server will actually compare the contents of the file sent and the one it derives from to determine whether the file is genuinely modified. But if one sends `Is-modified', then the server takes the client's word for it. A similar situation exists for `tag', if the `-c' option is specified. Commands for which `Modified' is necessary are `co', `ci', `update', and `import'. Commands which do not need to inform the server about a working directory, and thus should not be sending either `Modified' or `Is-modified': `rdiff', `rtag', `history', and `release'. Commands for which further investigation is warranted are: `remove', `add', and `export'. Pending such investigation, the more conservative course of action is to stick to `Modified'. `Unchanged FILENAME \n' Response expected: no. Tell the server that FILENAME has not been modified in the checked out directory. The FILENAME is a file within the most recent directory sent with `Directory'; it must not contain `/'. `UseUnchanged \n' Response expected: no. To specify the version of the protocol described in this document, servers must support this request (although it need not do anything) and clients must issue it. The `Root' request need not have been previously sent. `Empty-conflicts \n' Response expected: yes. This request is an alias for `noop'. Its presence in the list of `valid-requests' is intended to be used as a placeholder to alert the client that the server does not require the contents of files with conflicts that have not been modified since the merge, for operations other than diff. It was a bug in pre 1.11.22 & pre 1.12.14 servers that the contents of files with conflicts was required for the server to acknowledge the existence of the conflicts. `Notify FILENAME \n' Response expected: no. Tell the server that an `edit' or `unedit' command has taken place. The server needs to send a `Notified' response, but such response is deferred until the next time that the server is sending responses. The FILENAME is a file within the most recent directory sent with `Directory'; it must not contain `/'. Additional data: NOTIFICATION-TYPE \t TIME \t CLIENTHOST \t WORKING-DIR \t WATCHES \n where NOTIFICATION-TYPE is `E' for edit, `U' for unedit, undefined behavior if `C', and all other letters should be silently ignored for future expansion. TIME is the time at which the edit or unedit took place, in a user-readable format of the client's choice (the server should treat the time as an opaque string rather than interpreting it). CLIENTHOST is the name of the host on which the edit or unedit took place, and WORKING-DIR is the pathname of the working directory where the edit or unedit took place. WATCHES are the temporary watches, zero or more of the following characters in the following order: `E' for edit, `U' for unedit, `C' for commit, and all other letters should be silently ignored for future expansion. If NOTIFICATION-TYPE is `E' the temporary watches are set; if it is `U' they are cleared. If WATCHES is followed by \t then the \t and the rest of the line should be ignored, for future expansion. The TIME, CLIENTHOST, and WORKING-DIR fields may not contain the characters `+', `,', `>', `;', or `='. Note that a client may be capable of performing an `edit' or `unedit' operation without connecting to the server at that time, and instead connecting to the server when it is convenient (for example, when a laptop is on the net again) to send the `Notify' requests. Even if a client is capable of deferring notifications, it should attempt to send them immediately (one can send `Notify' requests together with a `noop' request, for example), unless perhaps if it can know that a connection would be impossible. `Questionable FILENAME \n' Response expected: no. Additional data: no. Tell the server to check whether FILENAME should be ignored, and if not, next time the server sends responses, send (in a `M' response) `?' followed by the directory and filename. FILENAME must not contain `/'; it needs to be a file in the directory named by the most recent `Directory' request. `Case \n' Response expected: no. Tell the server that filenames should be matched in a case-insensitive fashion. Note that this is not the primary mechanism for achieving case-insensitivity; for the most part the client keeps track of the case which the server wants to use and takes care to always use that case regardless of what the user specifies. For example the filenames given in `Entry' and `Modified' requests for the same file must match in case regardless of whether the `Case' request is sent. The latter mechanism is more general (it could also be used for 8.3 filenames, VMS filenames with more than one `.', and any other situation in which there is a predictable mapping between filenames in the working directory and filenames in the protocol), but there are some situations it cannot handle (ignore patterns, or situations where the user specifies a filename and the client does not know about that file). Though this request will be supported into the foreseeable future, it has been the source of numerous bug reports in the past due to the complexity of testing this functionality via the test suite and client developers are encouraged not to use it. Instead, please consider munging conflicting names and maintaining a map for communicating with the server. For example, suppose the server sends files `case', `CASE', and `CaSe'. The client could write all three files to names such as, `case', `case_prefix_case', and `case_prefix_2_case' and maintain a mapping between the file names in, for instance a new `CVS/Map' file. `Argument TEXT \n' Response expected: no. Save argument for use in a subsequent command. Arguments accumulate until an argument-using command is given, at which point they are forgotten. `Argumentx TEXT \n' Response expected: no. Append \n followed by text to the current argument being saved. `Global_option OPTION \n' Response expected: no. Transmit one of the global options `-q', `-Q', `-l', `-t', `-r', or `-n'. OPTION must be one of those strings, no variations (such as combining of options) are allowed. For graceful handling of `valid-requests', it is probably better to make new global options separate requests, rather than trying to add them to this request. The `Root' request need not have been previously sent. `Gzip-stream LEVEL \n' Response expected: no. Use zlib (RFC 1950/1951) compression to compress all further communication between the client and the server. After this request is sent, all further communication must be compressed. All further data received from the server will also be compressed. The LEVEL argument suggests to the server the level of compression that it should apply; it should be an integer between 1 and 9, inclusive, where a higher number indicates more compression. `Kerberos-encrypt \n' Response expected: no. Use Kerberos encryption to encrypt all further communication between the client and the server. This will only work if the connection was made over Kerberos in the first place. If both the `Gzip-stream' and the `Kerberos-encrypt' requests are used, the `Kerberos-encrypt' request should be used first. This will make the client and server encrypt the compressed data, as opposed to compressing the encrypted data. Encrypted data is generally incompressible. Note that this request does not fully prevent an attacker from hijacking the connection, in the sense that it does not prevent hijacking the connection between the initial authentication and the `Kerberos-encrypt' request. `Gssapi-encrypt \n' Response expected: no. Use GSSAPI encryption to encrypt all further communication between the client and the server. This will only work if the connection was made over GSSAPI in the first place. See `Kerberos-encrypt', above, for the relation between `Gssapi-encrypt' and `Gzip-stream'. Note that this request does not fully prevent an attacker from hijacking the connection, in the sense that it does not prevent hijacking the connection between the initial authentication and the `Gssapi-encrypt' request. `Gssapi-authenticate \n' Response expected: no. Use GSSAPI authentication to authenticate all further communication between the client and the server. This will only work if the connection was made over GSSAPI in the first place. Encrypted data is automatically authenticated, so using both `Gssapi-authenticate' and `Gssapi-encrypt' has no effect beyond that of `Gssapi-encrypt'. Unlike encrypted data, it is reasonable to compress authenticated data. Note that this request does not fully prevent an attacker from hijacking the connection, in the sense that it does not prevent hijacking the connection between the initial authentication and the `Gssapi-authenticate' request. `Set VARIABLE=VALUE \n' Response expected: no. Set a user variable VARIABLE to VALUE. The `Root' request need not have been previously sent. `expand-modules \n' Response expected: yes. Expand the modules which are specified in the arguments. Returns the data in `Module-expansion' responses. Note that the server can assume that this is checkout or export, not rtag or rdiff; the latter do not access the working directory and thus have no need to expand modules on the client side. Expand may not be the best word for what this request does. It does not necessarily tell you all the files contained in a module, for example. Basically it is a way of telling you which working directories the server needs to know about in order to handle a checkout of the specified modules. For example, suppose that the server has a module defined by aliasmodule -a 1dir That is, one can check out `aliasmodule' and it will take `1dir' in the repository and check it out to `1dir' in the working directory. Now suppose the client already has this module checked out and is planning on using the `co' request to update it. Without using `expand-modules', the client would have two bad choices: it could either send information about _all_ working directories under the current directory, which could be unnecessarily slow, or it could be ignorant of the fact that `aliasmodule' stands for `1dir', and neglect to send information for `1dir', which would lead to incorrect operation. With `expand-modules', the client would first ask for the module to be expanded: C: Root /home/kingdon/zwork/cvsroot . . . C: Argument aliasmodule C: Directory . C: /home/kingdon/zwork/cvsroot C: expand-modules S: Module-expansion 1dir S: ok and then it knows to check the `1dir' directory and send requests such as `Entry' and `Modified' for the files in that directory. `ci \n' `diff \n' `tag \n' `status \n' `admin \n' `history \n' `watchers \n' `editors \n' `annotate \n' Response expected: yes. Actually do a cvs command. This uses any previous `Argument', `Directory', `Entry', or `Modified' requests, if they have been sent. The last `Directory' sent specifies the working directory at the time of the operation. No provision is made for any input from the user. This means that `ci' must use a `-m' argument if it wants to specify a log message. `log \n' Response expected: yes. Show information for past revisions. This uses any previous `Directory', `Entry', or `Modified' requests, if they have been sent. The last `Directory' sent specifies the working directory at the time of the operation. Also uses previous `Argument''s of which the canonical forms are the following (CVS 1.10 and older clients sent what the user specified, but clients are encouraged to use the canonical forms and other forms are deprecated): `-b, -h, -l, -N, -R, -t' These options go by themselves, one option per `Argument' request. `-d DATE1octet mapping. There are two problems with this. One is that the protocol has no way to transmit character 10 decimal (linefeed), and the current server and clients have no way to handle 0 decimal (NUL). This may cause problems with certain multibyte character sets, in which octets 10 and 0 will appear in the middle of other characters. The other problem, which is more minor and possibly not worth worrying about, is that someone can type a password on one system and then go to another system which uses a different encoding for the same characters, and have their password not work. The restriction to the ISO646 invariant subset is the best approach for strings which are not particularly significant to users. Passwords are visible enough that this is somewhat doubtful as applied here. ISO646 does, however, have the virtue (!?) of offending everyone. It is easy to say "But the $ is right on people's keyboards! Surely we can't forbid that". From a human factors point of view, that makes quite a bit of sense. The contrary argument, of course, is that a with a circle on top, or some of the characters poorly handled by Unicode, are on _someone_'s keyboard.  Tag Table: Node: Top212 Node: Introduction1031 Node: Goals3567 Node: Connection and Authentication6487 Node: Password scrambling12727 Node: Protocol14595 Node: Entries Lines16681 Node: File Modes17788 Node: Filenames19331 Node: File transmissions20643 Node: Strings22206 Node: Dates22894 Node: Request intro23963 Node: Requests24988 Node: Response intro61406 Node: Response pathnames62779 Node: Responses64699 Node: Text tags80353 Node: Example82074 Node: Requirements85860 Node: Obsolete86775 Node: Protocol Notes87520  End Tag Table 07070100106b9c000081a40000000000000000000000014d58a1f80002c325000000b600010002ffffffffffffffff0000002500000000root/usr/local/share/info/cvs.info-2This is cvs.info, produced by makeinfo version 4.8 from cvs.texinfo. INFO-DIR-SECTION GNU Packages START-INFO-DIR-ENTRY * CVS: (cvs). Concurrent Versions System END-INFO-DIR-ENTRY INFO-DIR-SECTION Individual utilities START-INFO-DIR-ENTRY * cvs: (cvs)CVS commands. Concurrent Versions System END-INFO-DIR-ENTRY  File: cvs.info, Node: rdiff options, Next: rdiff examples, Up: rdiff A.16.1 rdiff options -------------------- These standard options are supported by `rdiff' (*note Common options:: for a complete description of them): `-D DATE' Use the most recent revision no later than DATE. `-f' If no matching revision is found, retrieve the most recent revision (instead of ignoring the file). `-k KFLAG' Process keywords according to KFLAG. See *Note Keyword substitution::. `-l' Local; don't descend subdirectories. `-R' Examine directories recursively. This option is on by default. `-r TAG' Use revision TAG. In addition to the above, these options are available: `-c' Use the context diff format. This is the default format. `-s' Create a summary change report instead of a patch. The summary includes information about files that were changed or added between the releases. It is sent to the standard output device. This is useful for finding out, for example, which files have changed between two dates or revisions. `-t' A diff of the top two revisions is sent to the standard output device. This is most useful for seeing what the last change to a file was. `-u' Use the unidiff format for the context diffs. Remember that old versions of the `patch' program can't handle the unidiff format, so if you plan to post this patch to the net you should probably not use `-u'. `-V VN' Expand keywords according to the rules current in RCS version VN (the expansion format changed with RCS version 5). Note that this option is no longer accepted. CVS will always expand keywords the way that RCS version 5 does.  File: cvs.info, Node: rdiff examples, Prev: rdiff options, Up: rdiff A.16.2 rdiff examples --------------------- Suppose you receive mail from foo@example.net asking for an update from release 1.2 to 1.4 of the tc compiler. You have no such patches on hand, but with CVS that can easily be fixed with a command such as this: $ cvs rdiff -c -r FOO1_2 -r FOO1_4 tc | \ > Mail -s 'The patches you asked for' foo@example.net Suppose you have made release 1.3, and forked a branch called `R_1_3fix' for bug fixes. `R_1_3_1' corresponds to release 1.3.1, which was made some time ago. Now, you want to see how much development has been done on the branch. This command can be used: $ cvs patch -s -r R_1_3_1 -r R_1_3fix module-name cvs rdiff: Diffing module-name File ChangeLog,v changed from revision 1.52.2.5 to 1.52.2.6 File foo.c,v changed from revision 1.52.2.3 to 1.52.2.4 File bar.h,v changed from revision 1.29.2.1 to 1.2  File: cvs.info, Node: release, Next: remove, Prev: rdiff, Up: CVS commands A.17 release--Indicate that a Module is no longer in use ======================================================== * release [-d] directories... * Requires: Working directory. * Changes: Working directory, history log. This command is meant to safely cancel the effect of `cvs checkout'. Since CVS doesn't lock files, it isn't strictly necessary to use this command. You can always simply delete your working directory, if you like; but you risk losing changes you may have forgotten, and you leave no trace in the CVS history file (*note history file::) that you've abandoned your checkout. Use `cvs release' to avoid these problems. This command checks that no uncommitted changes are present; that you are executing it from immediately above a CVS working directory; and that the repository recorded for your files is the same as the repository defined in the module database. If all these conditions are true, `cvs release' leaves a record of its execution (attesting to your intentionally abandoning your checkout) in the CVS history log. * Menu: * release options:: release options * release output:: release output * release examples:: release examples  File: cvs.info, Node: release options, Next: release output, Up: release A.17.1 release options ---------------------- The `release' command supports one command option: `-d' Delete your working copy of the file if the release succeeds. If this flag is not given your files will remain in your working directory. *WARNING: The `release' command deletes all directories and files recursively. This has the very serious side-effect that any directory created inside checked-out sources, and not added to the repository (using the `add' command; *note Adding files::) will be silently deleted--even if it is non-empty!*  File: cvs.info, Node: release output, Next: release examples, Prev: release options, Up: release A.17.2 release output --------------------- Before `release' releases your sources it will print a one-line message for any file that is not up-to-date. `U FILE' `P FILE' There exists a newer revision of this file in the repository, and you have not modified your local copy of the file (`U' and `P' mean the same thing). `A FILE' The file has been added to your private copy of the sources, but has not yet been committed to the repository. If you delete your copy of the sources this file will be lost. `R FILE' The file has been removed from your private copy of the sources, but has not yet been removed from the repository, since you have not yet committed the removal. See *Note commit::. `M FILE' The file is modified in your working directory. There might also be a newer revision inside the repository. `? FILE' FILE is in your working directory, but does not correspond to anything in the source repository, and is not in the list of files for CVS to ignore (see the description of the `-I' option, and *note cvsignore::). If you remove your working sources, this file will be lost.  File: cvs.info, Node: release examples, Prev: release output, Up: release A.17.3 release examples ----------------------- Release the `tc' directory, and delete your local working copy of the files. $ cd .. # You must stand immediately above the # sources when you issue `cvs release'. $ cvs release -d tc You have [0] altered files in this repository. Are you sure you want to release (and delete) directory `tc': y $  File: cvs.info, Node: remove, Next: update, Prev: release, Up: CVS commands A.18 remove--Remove files from active use ========================================= * Synopsis: remove [-flR] [files...] * Requires: repository, working directory. * Changes: working directory. The `remove' command is used to remove unwanted files from active use. The user normally deletes the files from the working directory prior to invocation of the `remove' command. Only the working directory is updated. Changes to the repository are not made until the `commit' command is run. The `remove' command does not delete files from from the repository. CVS keeps all historical data in the repository so that it is possible to reconstruct previous states of the projects under revision control. To undo CVS `remove' or to resurrect files that were previously removed, *Note add::. * Menu: * remove options:: remove options * remove examples:: remove examples  File: cvs.info, Node: remove options, Next: remove examples, Up: remove A.18.1 remove options --------------------- These standard options are supported by `remove' (*note Common options:: for a complete description of them): `-l' Local; run only in current working directory. See *Note Recursive behavior::. `-R' Process directories recursively. See *Note Recursive behavior::. In addition, these options are also supported: `-f' Note that this is not the standard behavior of the `-f' option as defined in *Note Common options::. Delete files before removing them. Entire directory hierarchies are easily removed using `-f', but take note that it is not as easy to resurrect directory hierarchies as it is to remove them.  File: cvs.info, Node: remove examples, Prev: remove options, Up: remove A.18.2 remove examples ---------------------- A.18.2.1 Removing a file ........................ $ cvs remove remove.me cvs remove: file `remove.me' still in working directory cvs remove: 1 file exists; remove it first $ rm -f remove.me $ cvs remove remove.me cvs remove: scheduling `remove.me' for removal cvs remove: use 'cvs commit' to remove this file permanently $ ls remove.it remove.it $ cvs remove -f remove.it cvs remove: scheduling `remove.it' for removal cvs remove: use 'cvs commit' to remove this file permanently A.18.2.2 Removing entire directories .................................... $ tree -d a a |-- CVS `-- b `-- CVS 3 directories $ cvs remove -f a cvs remove: Removing a cvs remove: Removing a/b cvs remove: scheduling `a/b/c' for removal cvs remove: use 'cvs commit' to remove this file permanently  File: cvs.info, Node: update, Prev: remove, Up: CVS commands A.19 update--Bring work tree in sync with repository ==================================================== * update [-ACdflPpR] [-I name] [-j rev [-j rev]] [-k kflag] [-r tag|-D date] [-W spec] files... * Requires: repository, working directory. * Changes: working directory. After you've run checkout to create your private copy of source from the common repository, other developers will continue changing the central source. From time to time, when it is convenient in your development process, you can use the `update' command from within your working directory to reconcile your work with any revisions applied to the source repository since your last checkout or update. * Menu: * update options:: update options * update output:: update output  File: cvs.info, Node: update options, Next: update output, Up: update A.19.1 update options --------------------- These standard options are available with `update' (*note Common options:: for a complete description of them): `-D date' Use the most recent revision no later than DATE. This option is sticky, and implies `-P'. See *Note Sticky tags:: for more information on sticky tags/dates. `-f' Only useful with the `-D DATE' or `-r TAG' flags. If no matching revision is found, retrieve the most recent revision (instead of ignoring the file). `-k KFLAG' Process keywords according to KFLAG. See *Note Keyword substitution::. This option is sticky; future updates of this file in this working directory will use the same KFLAG. The `status' command can be viewed to see the sticky options. See *Note Invoking CVS:: for more information on the `status' command. `-l' Local; run only in current working directory. See *Note Recursive behavior::. `-P' Prune empty directories. See *Note Moving directories::. `-p' Pipe files to the standard output. `-R' Update directories recursively (default). See *Note Recursive behavior::. `-r rev' Retrieve revision/tag REV. This option is sticky, and implies `-P'. See *Note Sticky tags::, for more information on sticky tags/dates. These special options are also available with `update'. `-A' Reset any sticky tags, dates, or `-k' options. Does not reset sticky `-k' options on modified files. See *Note Sticky tags:: for more information on sticky tags/dates. `-C' Overwrite locally modified files with clean copies from the repository (the modified file is saved in `.#FILE.REVISION', however). `-d' Create any directories that exist in the repository if they're missing from the working directory. Normally, `update' acts only on directories and files that were already enrolled in your working directory. This is useful for updating directories that were created in the repository since the initial checkout; but it has an unfortunate side effect. If you deliberately avoided certain directories in the repository when you created your working directory (either through use of a module name or by listing explicitly the files and directories you wanted on the command line), then updating with `-d' will create those directories, which may not be what you want. `-I NAME' Ignore files whose names match NAME (in your working directory) during the update. You can specify `-I' more than once on the command line to specify several files to ignore. Use `-I !' to avoid ignoring any files at all. See *Note cvsignore:: for other ways to make CVS ignore some files. `-WSPEC' Specify file names that should be filtered during update. You can use this option repeatedly. SPEC can be a file name pattern of the same type that you can specify in the `.cvswrappers' file. See *Note Wrappers::. `-jREVISION' With two `-j' options, merge changes from the revision specified with the first `-j' option to the revision specified with the second `j' option, into the working directory. With one `-j' option, merge changes from the ancestor revision to the revision specified with the `-j' option, into the working directory. The ancestor revision is the common ancestor of the revision which the working directory is based on, and the revision specified in the `-j' option. Note that using a single `-j TAGNAME' option rather than `-j BRANCHNAME' to merge changes from a branch will often not remove files which were removed on the branch. See *Note Merging adds and removals:: for more information. In addition, each `-j' option can contain an optional date specification which, when used with branches, can limit the chosen revision to one within a specific date. An optional date is specified by adding a colon (:) to the tag: `-jSYMBOLIC_TAG:DATE_SPECIFIER'. See *Note Branching and merging::.  File: cvs.info, Node: update output, Prev: update options, Up: update A.19.2 update output -------------------- `update' and `checkout' keep you informed of their progress by printing a line for each file, preceded by one character indicating the status of the file: `U FILE' The file was brought up to date with respect to the repository. This is done for any file that exists in the repository but not in your working directory, and for files that you haven't changed but are not the most recent versions available in the repository. `P FILE' Like `U', but the CVS server sends a patch instead of an entire file. This accomplishes the same thing as `U' using less bandwidth. `A FILE' The file has been added to your private copy of the sources, and will be added to the source repository when you run `commit' on the file. This is a reminder to you that the file needs to be committed. `R FILE' The file has been removed from your private copy of the sources, and will be removed from the source repository when you run `commit' on the file. This is a reminder to you that the file needs to be committed. `M FILE' The file is modified in your working directory. `M' can indicate one of two states for a file you're working on: either there were no modifications to the same file in the repository, so that your file remains as you last saw it; or there were modifications in the repository as well as in your copy, but they were merged successfully, without conflict, in your working directory. CVS will print some messages if it merges your work, and a backup copy of your working file (as it looked before you ran `update') will be made. The exact name of that file is printed while `update' runs. `C FILE' A conflict was detected while trying to merge your changes to FILE with changes from the source repository. FILE (the copy in your working directory) is now the result of attempting to merge the two revisions; an unmodified copy of your file is also in your working directory, with the name `.#FILE.REVISION' where REVISION is the revision that your modified file started from. Resolve the conflict as described in *Note Conflicts example::. (Note that some systems automatically purge files that begin with `.#' if they have not been accessed for a few days. If you intend to keep a copy of your original file, it is a very good idea to rename it.) Under VMS, the file name starts with `__' rather than `.#'. `? FILE' FILE is in your working directory, but does not correspond to anything in the source repository, and is not in the list of files for CVS to ignore (see the description of the `-I' option, and *note cvsignore::).  File: cvs.info, Node: Invoking CVS, Next: Administrative files, Prev: CVS commands, Up: Top Appendix B 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::. `-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: file1,v 1.1 1993/12/09 03:21:13 joe Exp $ -kkvl $Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $ -kk $Id$ -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: joe $ $Date: 1993/12/09 03:21:13 $ $Header: /home/files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $ $Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $ $Locker: harry $ $Name: snapshot_1_14 $ $RCSfile: file1,v $ $Revision: 1.1 $ $Source: /home/files/file1,v $ $State: Exp $ $Log: file1,v $ 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. See *Note admin options:: for more information on possible states. `-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' Force annotation of binary files. (Without this option, binary files are skipped with a message.) `-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::. `-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::. `-p REPOSITORY' In REPOSITORY. 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 `TOEFWUPCGMAR'. 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::. `kserver' Kerberos authenticated server. See *Note Kerberos authenticated::. `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 elif sed 1q < $1 | grep '^BugId:[ ]*none$' > /dev/null; then # It is okay to allow commits with 'BugId: none', # but do not put that text into the real log message. grep -v '^BugId:[ ]*none$' > $1.rewrite mv $1.rewrite $1 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 The `config' file contains this line: RereadLogAfterVerify=always  File: cvs.info, Node: editinfo, Next: loginfo, Prev: verifymsg, Up: commit files C.4.3 Editinfo -------------- *The `editinfo' feature has been rendered obsolete. To set a default editor for log messages use the `CVSEDITOR', `EDITOR' environment variables (*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 C.4.3.1 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, Prev: editinfo, Up: commit files C.4.4 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. Note that the filter program *must* read *all* of the log information or CVS may fail with a broken pipe signal. 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 space separated string of tokens enclosed in quotation marks ("). Any embedded dollar signs ($), backticks (`), backslashes (\), or quotation marks will be preceded by a backslash (this allows the shell to correctly parse it as a single string, reguardless of the characters it contains). 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 C.4.4.1 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 C.4.4.2 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: taginfo, Up: Administrative files C.5 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.  File: cvs.info, Node: taginfo, Next: rcsinfo, Prev: commit files, Up: Administrative files C.6 Taginfo =========== The `taginfo' file defines programs to execute when someone executes a `tag' or `rtag' command. The `taginfo' file has the standard form for trigger scripts (*note Trigger Scripts::), where each line is a regular expression followed by a command to execute (*note syntax::). The arguments passed to the command are, in order, the TAGNAME, OPERATION (`add' for `tag', `mov' for `tag -F', and `del' for `tag -d'), REPOSITORY, and any remaining are pairs of FILENAME REVISION. A non-zero exit of the filter program will cause the tag to be aborted. Here is an example of using the `taginfo' file to log `tag' and `rtag' commands. In the `taginfo' file put: ALL /usr/local/cvsroot/CVSROOT/loggit Where `/usr/local/cvsroot/CVSROOT/loggit' contains the following script: #!/bin/sh echo "$@" >>/home/kingdon/cvsroot/CVSROOT/taglog  File: cvs.info, Node: cvsignore, Next: checkoutlist, Prev: rcsinfo, Up: Administrative files C.7 Ignoring files via cvsignore ================================ There are certain file names that frequently occur inside your working copy, but that you don't want to put under CVS control. Examples are all the object files that you get while you compile your sources. Normally, when you run `cvs update', it prints a line for each file it encounters that it doesn't know about (*note update output::). CVS has a list of files (or sh(1) file name patterns) that it should ignore while running `update', `import' and `release'. This list is constructed in the following way. * The list is initialized to include certain file name patterns: names associated with CVS administration, or with other common source control systems; common names for patch files, object files, archive files, and editor backup files; and other names that are usually artifacts of assorted utilities. Currently, the default list of ignored file name patterns is: RCS SCCS CVS CVS.adm RCSLOG cvslog.* tags TAGS .make.state .nse_depinfo *~ #* .#* ,* _$* *$ *.old *.bak *.BAK *.orig *.rej .del-* *.a *.olb *.o *.obj *.so *.exe *.Z *.elc *.ln core * The per-repository list in `$CVSROOT/CVSROOT/cvsignore' is appended to the list, if that file exists. * The per-user list in `.cvsignore' in your home directory is appended to the list, if it exists. * Any entries in the environment variable `$CVSIGNORE' is appended to the list. * Any `-I' options given to CVS is appended. * As CVS traverses through your directories, the contents of any `.cvsignore' will be appended to the list. The patterns found in `.cvsignore' are only valid for the directory that contains them, not for any sub-directories. In any of the 5 places listed above, a single exclamation mark (`!') clears the ignore list. This can be used if you want to store any file which normally is ignored by CVS. Specifying `-I !' to `cvs import' will import everything, which is generally what you want to do if you are importing files from a pristine distribution or any other source which is known to not contain any extraneous files. However, looking at the rules above you will see there is a fly in the ointment; if the distribution contains any `.cvsignore' files, then the patterns from those files will be processed even if `-I !' is specified. The only workaround is to remove the `.cvsignore' files in order to do the import. Because this is awkward, in the future `-I !' might be modified to override `.cvsignore' files in each directory. Note that the syntax of the ignore files consists of a series of lines, each of which contains a space separated list of filenames. This offers no clean way to specify filenames which contain spaces, but you can use a workaround like `foo?bar' to match a file named `foo bar' (it also matches `fooxbar' and the like). Also note that there is currently no way to specify comments.  File: cvs.info, Node: checkoutlist, Next: history file, Prev: cvsignore, Up: Administrative files C.8 The checkoutlist file ========================= It may be helpful to use CVS to maintain your own files in the `CVSROOT' directory. For example, suppose that you have a script `logcommit.pl' which you run by including the following line in the `commitinfo' administrative file: ALL $CVSROOT/CVSROOT/logcommit.pl To maintain `logcommit.pl' with CVS you would add the following line to the `checkoutlist' administrative file: logcommit.pl The format of `checkoutlist' is one line for each file that you want to maintain using CVS, giving the name of the file, followed optionally by more whitespace and any error message that should print if the file cannot be checked out into CVSROOT after a commit: logcommit.pl Could not update CVSROOT/logcommit.pl. After setting up `checkoutlist' in this fashion, the files listed there will function just like CVS's built-in administrative files. For example, when checking in one of the files you should get a message such as: cvs commit: Rebuilding administrative file database and the checked out copy in the `CVSROOT' directory should be updated. Note that listing `passwd' (*note Password authentication server::) in `checkoutlist' is not recommended for security reasons. For information about keeping a checkout out copy in a more general context than the one provided by `checkoutlist', see *Note Keeping a checked out copy::.  File: cvs.info, Node: history file, Next: Variables, Prev: checkoutlist, Up: Administrative files C.9 The history file ==================== The file `$CVSROOT/CVSROOT/history' is used to log information for the `history' command (*note history::). This file must be created to turn on logging. This is done automatically if the `cvs init' command is used to set up the repository (*note Creating a repository::). The file format of the `history' file is documented only in comments in the CVS source code, but generally programs should use the `cvs history' command to access it anyway, in case the format changes with future releases of CVS.  File: cvs.info, Node: Variables, Next: config, Prev: history file, Up: Administrative files C.10 Expansions in administrative files ======================================= Sometimes in writing an administrative file, you might want the file to be able to know various things based on environment CVS is running in. There are several mechanisms to do that. To find the home directory of the user running CVS (from the `HOME' environment variable), use `~' followed by `/' or the end of the line. Likewise for the home directory of USER, use `~USER'. These variables are expanded on the server machine, and don't get any reasonable expansion if pserver (*note Password authenticated::) is in use; therefore user variables (see below) may be a better choice to customize behavior based on the user running CVS. One may want to know about various pieces of information internal to CVS. A CVS internal variable has the syntax `${VARIABLE}', where VARIABLE starts with a letter and consists of alphanumeric characters and `_'. If the character following VARIABLE is a non-alphanumeric character other than `_', the `{' and `}' can be omitted. The CVS internal variables are: `CVSROOT' This is the absolute path to the current CVS root directory. *Note Repository::, for a description of the various ways to specify this, but note that the internal variable contains just the directory and not any of the access method information. `RCSBIN' In CVS 1.9.18 and older, this specified the directory where CVS was looking for RCS programs. Because CVS no longer runs RCS programs, specifying this internal variable is now an error. `CVSEDITOR' `EDITOR' `VISUAL' These all expand to the same value, which is the editor that CVS is using. *Note Global options::, for how to specify this. `USER' Username of the user running CVS (on the CVS server machine). When using pserver, this is the user specified in the repository specification which need not be the same as the username the server is running as (*note Password authentication server::). Do not confuse this with the environment variable of the same name. If you want to pass a value to the administrative files which the user who is running CVS can specify, use a user variable. To expand a user variable, the administrative file contains `${=VARIABLE}'. To set a user variable, specify the global option `-s' to CVS, with argument `VARIABLE=VALUE'. It may be particularly useful to specify this option via `.cvsrc' (*note ~/.cvsrc::). For example, if you want the administrative file to refer to a test directory you might create a user variable `TESTDIR'. Then if CVS is invoked as cvs -s TESTDIR=/work/local/tests and the administrative file contains `sh ${=TESTDIR}/runtests', then that string is expanded to `sh /work/local/tests/runtests'. All other strings containing `$' are reserved; there is no way to quote a `$' character so that `$' represents itself. Environment variables passed to administrative files are: `CVS_USER' The CVS-specific username provided by the user, if it can be provided (currently just for the pserver access method), and to the empty string otherwise. (`CVS_USER' and `USER' may differ when `$CVSROOT/CVSROOT/passwd' is used to map CVS usernames to system usernames.) `LOGNAME' The username of the system user. `USER' Same as `LOGNAME'. Do not confuse this with the internal variable of the same name.  File: cvs.info, Node: config, Prev: Variables, Up: Administrative files C.11 The CVSROOT/config configuration file ========================================== The administrative file `config' contains various miscellaneous settings which affect the behavior of CVS. The syntax is slightly different from the other administrative files. Variables are not expanded. Lines which start with `#' are considered comments. Other lines consist of a keyword, `=', and a value. Note that this syntax is very strict. Extraneous spaces or tabs are not permitted. Currently defined keywords are: `RCSBIN=BINDIR' For CVS 1.9.12 through 1.9.18, this setting told CVS to look for RCS programs in the BINDIR directory. Current versions of CVS do not run RCS programs; for compatibility this setting is accepted, but it does nothing. `SystemAuth=VALUE' If VALUE is `yes', then pserver should check for users in the system's user database if not found in `CVSROOT/passwd'. If it is `no', then all pserver users must exist in `CVSROOT/passwd'. The default is `yes'. For more on pserver, see *Note Password authenticated::. `TopLevelAdmin=VALUE' Modify the `checkout' command to create a `CVS' directory at the top level of the new working directory, in addition to `CVS' directories created within checked-out directories. The default value is `no'. This option is useful if you find yourself performing many commands at the top level of your working directory, rather than in one of the checked out subdirectories. The `CVS' directory created there will mean you don't have to specify `CVSROOT' for each command. It also provides a place for the `CVS/Template' file (*note Working directory storage::). `LockDir=DIRECTORY' Put CVS lock files in DIRECTORY rather than directly in the repository. This is useful if you want to let users read from the repository while giving them write access only to DIRECTORY, not to the repository. It can also be used to put the locks on a very fast in-memory file system to speed up locking and unlocking the repository. You need to create DIRECTORY, but CVS will create subdirectories of DIRECTORY as it needs them. For information on CVS locks, see *Note Concurrency::. Before enabling the LockDir option, make sure that you have tracked down and removed any copies of CVS 1.9 or older. Such versions neither support LockDir, nor will give an error indicating that they don't support it. The result, if this is allowed to happen, is that some CVS users will put the locks one place, and others will put them another place, and therefore the repository could become corrupted. CVS 1.10 does not support LockDir but it will print a warning if run on a repository with LockDir enabled. `LogHistory=VALUE' Control what is logged to the `CVSROOT/history' file (*note history::). Default of `TOEFWUPCGMAR' (or simply `all') will log all transactions. Any subset of the default is legal. (For example, to only log transactions that modify the `*,v' files, use `LogHistory=TMAR'.) `RereadLogAfterVerify=VALUE' Modify the `commit' command such that CVS will reread the log message after running the program specified by `verifymsg'. VALUE may be one of `yes' or `always', indicating that the log message should always be reread; `no' or `never', indicating that it should never be reread; or VALUE may be `stat', indicating that the file should be checked with the file system `stat()' function to see if it has changed (see warning below) before rereading. The default value is `always'. *The `stat' mode can cause CVS to pause for up to one extra second per directory committed. This can be less IO and CPU intensive but is not recommended for use with large repositories* *Note verifymsg::, for more information on how verifymsg may be used. `IgnoreUnknownConfigKeys=VALUE' If VALUE is `yes', then CVS should ignore any keywords in `CVSROOT/config' which it does not recognize. This option is intended primarily for transitions between versions of CVS which support more configuration options in an environment where a read-only mirror of the current CVS server may be maintained by someone else who is not yet ready to upgrade to the same version. It is recommended that this option be used only for a short time so that problems with the `CVSROOT/config' file will be found quickly. The default is `no'.  File: cvs.info, Node: Environment variables, Next: Compatibility, Prev: Administrative files, Up: Top Appendix D All environment variables which affect CVS ***************************************************** This is a complete list of all environment variables that affect CVS. `$CVSIGNORE' A whitespace-separated list of file name patterns that CVS should ignore. *Note cvsignore::. `$CVSWRAPPERS' A whitespace-separated list of file name patterns that CVS should treat as wrappers. *Note Wrappers::. `$CVSREAD' If this is set, `checkout' and `update' will try hard to make the files in your working directory read-only. When this is not set, the default behavior is to permit modification of your working files. `$CVSUMASK' Controls permissions of files in the repository. See *Note File permissions::. `$CVSROOT' Should contain the full pathname to the root of the CVS source repository (where the RCS files are kept). This information must be available to CVS for most commands to execute; if `$CVSROOT' is not set, or if you wish to override it for one invocation, you can supply it on the command line: `cvs -d cvsroot cvs_command...' Once you have checked out a working directory, CVS stores the appropriate root (in the file `CVS/Root'), so normally you only need to worry about this when initially checking out a working directory. `$CVSEDITOR' `$EDITOR' `$VISUAL' Specifies the program to use for recording log messages during commit. `$CVSEDITOR' overrides `$EDITOR', which overrides `$VISUAL'. See *Note Committing your changes:: for more or *Note Global options:: for alternative ways of specifying a log editor. `$PATH' If `$RCSBIN' is not set, and no path is compiled into CVS, it will use `$PATH' to try to find all programs it uses. `$HOME' `$HOMEPATH' `$HOMEDRIVE' Used to locate the directory where the `.cvsrc' file, and other such files, are searched. On Unix, CVS just checks for `HOME'. On Windows NT, the system will set `HOMEDRIVE', for example to `d:' and `HOMEPATH', for example to `\joe'. On Windows 95, you'll probably need to set `HOMEDRIVE' and `HOMEPATH' yourself. `$CVS_RSH' Specifies the external program which CVS connects with, when `:ext:' access method is specified. *note Connecting via rsh::. `$CVS_SSH' Specifies the external program which CVS connects with, when `:extssh:' access method is specified. *note Connecting via rsh::. `$CVS_SERVER' Used in client-server mode when accessing a remote repository using RSH. It specifies the name of the program to start on the server side (and any necessary arguments) when accessing a remote repository using the `:ext:', `:fork:', or `:server:' access methods. The default value for `:ext:' and `:server:' is `cvs'; the default value for `:fork:' is the name used to run the client. *note Connecting via rsh:: `$CVS_PASSFILE' Used in client-server mode when accessing the `cvs login server'. Default value is `$HOME/.cvspass'. *note Password authentication client:: `$CVS_CLIENT_PORT' Used in client-server mode to set the port to use when accessing the server via Kerberos, GSSAPI, or CVS's password authentication protocol if the port is not specified in the CVSROOT. *note Remote repositories:: `$CVS_RCMD_PORT' Used in client-server mode. If set, specifies the port number to be used when accessing the RCMD demon on the server side. (Currently not used for Unix clients). `$CVS_CLIENT_LOG' Used for debugging only in client-server mode. If set, everything sent to the server is logged into ``$CVS_CLIENT_LOG'.in' and everything sent from the server is logged into ``$CVS_CLIENT_LOG'.out'. `$CVS_SERVER_SLEEP' Used only for debugging the server side in client-server mode. If set, delays the start of the server child process the specified amount of seconds so that you can attach to it with a debugger. `$CVS_IGNORE_REMOTE_ROOT' For CVS 1.10 and older, setting this variable prevents CVS from overwriting the `CVS/Root' file when the `-d' global option is specified. Later versions of CVS do not rewrite `CVS/Root', so `CVS_IGNORE_REMOTE_ROOT' has no effect. `$COMSPEC' Used under OS/2 only. It specifies the name of the command interpreter and defaults to CMD.EXE. `$TMPDIR' `$TMP' `$TEMP' Directory in which temporary files are located. The CVS server uses `TMPDIR'. *Note Global options::, for a description of how to specify this. Some parts of CVS will always use `/tmp' (via the `tmpnam' function provided by the system). On Windows NT, `TMP' is used (via the `_tempnam' function provided by the system). The `patch' program which is used by the CVS client uses `TMPDIR', and if it is not set, uses `/tmp' (at least with GNU patch 2.1). Note that if your server and client are both running CVS 1.9.10 or later, CVS will not invoke an external `patch' program.  File: cvs.info, Node: Compatibility, Next: Troubleshooting, Prev: Environment variables, Up: Top Appendix E Compatibility between CVS Versions ********************************************* The repository format is compatible going back to CVS 1.3. But see *Note Watches Compatibility::, if you have copies of CVS 1.6 or older and you want to use the optional developer communication features. The working directory format is compatible going back to CVS 1.5. It did change between CVS 1.3 and CVS 1.5. If you run CVS 1.5 or newer on a working directory checked out with CVS 1.3, CVS will convert it, but to go back to CVS 1.3 you need to check out a new working directory with CVS 1.3. The remote protocol is interoperable going back to CVS 1.5, but no further (1.5 was the first official release with the remote protocol, but some older versions might still be floating around). In many cases you need to upgrade both the client and the server to take advantage of new features and bug fixes, however.  File: cvs.info, Node: Troubleshooting, Next: Credits, Prev: Compatibility, Up: Top Appendix F Troubleshooting ************************** If you are having trouble with CVS, this appendix may help. If there is a particular error message which you are seeing, then you can look up the message alphabetically. If not, you can look through the section on other problems to see if your problem is mentioned there. * Menu: * Error messages:: Partial list of CVS errors * Connection:: Trouble making a connection to a CVS server * Other problems:: Problems not readily listed by error message  File: cvs.info, Node: Error messages, Next: Connection, Up: Troubleshooting F.1 Partial list of error messages ================================== Here is a partial list of error messages that you may see from CVS. It is not a complete list--CVS is capable of printing many, many error messages, often with parts of them supplied by the operating system, but the intention is to list the common and/or potentially confusing error messages. The messages are alphabetical, but introductory text such as `cvs update: ' is not considered in ordering them. In some cases the list includes messages printed by old versions of CVS (partly because users may not be sure which version of CVS they are using at any particular moment). `FILE:LINE: Assertion 'TEXT' failed' The exact format of this message may vary depending on your system. It indicates a bug in CVS, which can be handled as described in *Note BUGS::. `cvs COMMAND: authorization failed: server HOST rejected access' This is a generic response when trying to connect to a pserver server which chooses not to provide a specific reason for denying authorization. Check that the username and password specified are correct and that the `CVSROOT' specified is allowed by `--allow-root' in `inetd.conf'. See *Note Password authenticated::. `cvs COMMAND: conflict: removed FILE was modified by second party' This message indicates that you removed a file, and someone else modified it. To resolve the conflict, first run `cvs add FILE'. If desired, look at the other party's modification to decide whether you still want to remove it. If you don't want to remove it, stop here. If you do want to remove it, proceed with `cvs remove FILE' and commit your removal. `cannot change permissions on temporary directory' Operation not permitted This message has been happening in a non-reproducible, occasional way when we run the client/server testsuite, both on Red Hat Linux 3.0.3 and 4.1. We haven't been able to figure out what causes it, nor is it known whether it is specific to Linux (or even to this particular machine!). If the problem does occur on other unices, `Operation not permitted' would be likely to read `Not owner' or whatever the system in question uses for the unix `EPERM' error. If you have any information to add, please let us know as described in *Note BUGS::. If you experience this error while using CVS, retrying the operation which produced it should work fine. `cvs [server aborted]: Cannot check out files into the repository itself' The obvious cause for this message (especially for non-client/server CVS) is that the CVS root is, for example, `/usr/local/cvsroot' and you try to check out files when you are in a subdirectory, such as `/usr/local/cvsroot/test'. However, there is a more subtle cause, which is that the temporary directory on the server is set to a subdirectory of the root (which is also not allowed). If this is the problem, set the temporary directory to somewhere else, for example `/var/tmp'; see `TMPDIR' in *Note Environment variables::, for how to set the temporary directory. `cannot commit files as 'root'' See `'root' is not allowed to commit files'. `cannot open CVS/Entries for reading: No such file or directory' This generally indicates a CVS internal error, and can be handled as with other CVS bugs (*note BUGS::). Usually there is a workaround--the exact nature of which would depend on the situation but which hopefully could be figured out. `cvs [init aborted]: cannot open CVS/Root: No such file or directory' This message is harmless. Provided it is not accompanied by other errors, the operation has completed successfully. This message should not occur with current versions of CVS, but it is documented here for the benefit of CVS 1.9 and older. `cvs server: cannot open /root/.cvsignore: Permission denied' `cvs [server aborted]: can't chdir(/root): Permission denied' See *Note Connection::. `cvs [checkout aborted]: cannot rename file FILE to CVS/,,FILE: Invalid argument' This message has been reported as intermittently happening with CVS 1.9 on Solaris 2.5. The cause is unknown; if you know more about what causes it, let us know as described in *Note BUGS::. `cvs [COMMAND aborted]: cannot start server via rcmd' This, unfortunately, is a rather nonspecific error message which CVS 1.9 will print if you are running the CVS client and it is having trouble connecting to the server. Current versions of CVS should print a much more specific error message. If you get this message when you didn't mean to run the client at all, you probably forgot to specify `:local:', as described in *Note Repository::. `ci: FILE,v: bad diff output line: Binary files - and /tmp/T2a22651 differ' CVS 1.9 and older will print this message when trying to check in a binary file if RCS is not correctly installed. Re-read the instructions that came with your RCS distribution and the INSTALL file in the CVS distribution. Alternately, upgrade to a current version of CVS, which checks in files itself rather than via RCS. `cvs checkout: could not check out FILE' With CVS 1.9, this can mean that the `co' program (part of RCS) returned a failure. It should be preceded by another error message, however it has been observed without another error message and the cause is not well-understood. With the current version of CVS, which does not run `co', if this message occurs without another error message, it is definitely a CVS bug (*note BUGS::). `cvs [login aborted]: could not find out home directory' This means that you need to set the environment variables that CVS uses to locate your home directory. See the discussion of `HOME', `HOMEDRIVE', and `HOMEPATH' in *Note Environment variables::. `cvs update: could not merge revision REV of FILE: No such file or directory' CVS 1.9 and older will print this message if there was a problem finding the `rcsmerge' program. Make sure that it is in your `PATH', or upgrade to a current version of CVS, which does not require an external `rcsmerge' program. `cvs [update aborted]: could not patch FILE: No such file or directory' This means that there was a problem finding the `patch' program. Make sure that it is in your `PATH'. Note that despite appearances the message is _not_ referring to whether it can find FILE. If both the client and the server are running a current version of CVS, then there is no need for an external patch program and you should not see this message. But if either client or server is running CVS 1.9, then you need `patch'. `cvs update: could not patch FILE; will refetch' This means that for whatever reason the client was unable to apply a patch that the server sent. The message is nothing to be concerned about, because inability to apply the patch only slows things down and has no effect on what CVS does. `dying gasps from SERVER unexpected' There is a known bug in the server for CVS 1.9.18 and older which can cause this. For me, this was reproducible if I used the `-t' global option. It was fixed by Andy Piper's 14 Nov 1997 change to src/filesubr.c, if anyone is curious. If you see the message, you probably can just retry the operation which failed, or if you have discovered information concerning its cause, please let us know as described in *Note BUGS::. `end of file from server (consult above messages if any)' The most common cause for this message is if you are using an external `rsh' or `ssh' program and it exited with an error. In this case the `rsh' program should have printed a message, which will appear before the above message. For more information on setting up a CVS client and server, see *Note Remote repositories::. `cvs [update aborted]: EOF in key in RCS file FILE,v' `cvs [checkout aborted]: EOF while looking for end of string in RCS file FILE,v' This means that there is a syntax error in the given RCS file. Note that this might be true even if RCS can read the file OK; CVS does more error checking of errors in the RCS file. That is why you may see this message when upgrading from CVS 1.9 to CVS 1.10. The likely cause for the original corruption is hardware, the operating system, or the like. Of course, if you find a case in which CVS seems to corrupting the file, by all means report it, (*note BUGS::). There are quite a few variations of this error message, depending on exactly where in the RCS file CVS finds the syntax error. `cvs commit: Executing 'mkmodules'' This means that your repository is set up for a version of CVS prior to CVS 1.8. When using CVS 1.8 or later, the above message will be preceded by cvs commit: Rebuilding administrative file database If you see both messages, the database is being rebuilt twice, which is unnecessary but harmless. If you wish to avoid the duplication, and you have no versions of CVS 1.7 or earlier in use, remove `-i mkmodules' every place it appears in your `modules' file. For more information on the `modules' file, see *Note modules::. `missing author' Typically this can happen if you created an RCS file with your username set to empty. CVS will, bogusly, create an illegal RCS file with no value for the author field. The solution is to make sure your username is set to a non-empty value and re-create the RCS file. `cvs [checkout aborted]: no such tag TAG' This message means that CVS isn't familiar with the tag TAG. Usually this means that you have mistyped a tag name; however there are (relatively obscure) cases in which CVS will require you to try a few other CVS commands involving that tag, before you find one which will cause CVS to update the `val-tags' file; see discussion of val-tags in *Note File permissions::. You only need to worry about this once for a given tag; when a tag is listed in `val-tags', it stays there. Note that using `-f' to not require tag matches does not override this check; see *Note Common options::. `cvs [COMMAND aborted]: out of memory' There is insufficient (virtual) memory available to continue. In client/server mode, the problem is almost certainly on the server rather than the client; see *Note Server requirements:: for memory estimates. Many systems have limits on the amount of virtual memory that a single process can use, so a process can run out of virtual memory long before the system itself has run out. The method of increasing the per-process limits varies depending on the operating system. `*PANIC* administration files missing' This typically means that there is a directory named CVS but it does not contain the administrative files which CVS puts in a CVS directory. If the problem is that you created a CVS directory via some mechanism other than CVS, then the answer is simple, use a name other than CVS. If not, it indicates a CVS bug (*note BUGS::). `rcs error: Unknown option: -x,v/' This message will be followed by a usage message for RCS. It means that you have an old version of RCS (probably supplied with your operating system), as well as an old version of CVS. CVS 1.9.18 and earlier only work with RCS version 5 and later; current versions of CVS do not run RCS programs. `cvs [server aborted]: received broken pipe signal' This message can be caused by a loginfo program that fails to read all of the log information from its standard input. If you find it happening in any other circumstances, please let us know as described in *Note BUGS::. `'root' is not allowed to commit files' When committing a permanent change, CVS makes a log entry of who committed the change. If you are committing the change logged in as "root" (not under "su" or other root-priv giving program), CVS cannot determine who is actually making the change. As such, by default, CVS disallows changes to be committed by users logged in as "root". (You can disable this option by passing the `--enable-rootcommit' option to `configure' and recompiling CVS. On some systems this means editing the appropriate `config.h' file before building CVS.) `Terminated with fatal signal 11' This message usually indicates that CVS (the server, if you're using client/server mode) has run out of (virtual) memory. Although CVS tries to catch the error and issue a more meaningful message, there are many circumstances where that is not possible. If you appear to have lots of memory available to the system, the problem is most likely that you're running into a system-wide limit on the amount of memory a single process can use or a similar process-specific limit. The mechanisms for displaying and setting such limits vary from system to system, so you'll have to consult an expert for your particular system if you don't know how to do that. `Too many arguments!' This message is typically printed by the `log.pl' script which is in the `contrib' directory in the CVS source distribution. In some versions of CVS, `log.pl' has been part of the default CVS installation. The `log.pl' script gets called from the `loginfo' administrative file. Check that the arguments passed in `loginfo' match what your version of `log.pl' expects. In particular, the `log.pl' from CVS 1.3 and older expects the log file as an argument whereas the `log.pl' from CVS 1.5 and newer expects the log file to be specified with a `-f' option. Of course, if you don't need `log.pl' you can just comment it out of `loginfo'. `cvs [update aborted]: unexpected EOF reading FILE,v' See `EOF in key in RCS file'. `cvs [login aborted]: unrecognized auth response from SERVER' This message typically means that the server is not set up properly. For example, if `inetd.conf' points to a nonexistent cvs executable. To debug it further, find the log file which inetd writes (`/var/log/messages' or whatever inetd uses on your system). For details, see *Note Connection::, and *Note Password authentication server::. `cvs commit: Up-to-date check failed for `FILE'' This means that someone else has committed a change to that file since the last time that you did a `cvs update'. So before proceeding with your `cvs commit' you need to `cvs update'. CVS will merge the changes that you made and the changes that the other person made. If it does not detect any conflicts it will report `M FILE' and you are ready to `cvs commit'. If it detects conflicts it will print a message saying so, will report `C FILE', and you need to manually resolve the conflict. For more details on this process see *Note Conflicts example::. `Usage: diff3 [-exEX3 [-i | -m] [-L label1 -L label3]] file1 file2 file3' Only one of [exEX3] allowed This indicates a problem with the installation of `diff3' and `rcsmerge'. Specifically `rcsmerge' was compiled to look for GNU diff3, but it is finding unix diff3 instead. The exact text of the message will vary depending on the system. The simplest solution is to upgrade to a current version of CVS, which does not rely on external `rcsmerge' or `diff3' programs. `warning: unrecognized response `TEXT' from cvs server' If TEXT contains a valid response (such as `ok') followed by an extra carriage return character (on many systems this will cause the second part of the message to overwrite the first part), then it probably means that you are using the `:ext:' access method with a version of rsh, such as most non-unix rsh versions, which does not by default provide a transparent data stream. In such cases you probably want to try `:server:' instead of `:ext:'. If TEXT is something else, this may signify a problem with your CVS server. Double-check your installation against the instructions for setting up the CVS server. `cvs commit: [TIME] waiting for USER's lock in DIRECTORY' This is a normal message, not an error. See *Note Concurrency::, for more details. `cvs commit: warning: editor session failed' This means that the editor which CVS is using exits with a nonzero exit status. Some versions of vi will do this even when there was not a problem editing the file. If so, point the `CVSEDITOR' environment variable to a small script such as: #!/bin/sh vi $* exit 0 `cvs update: warning: FILE was lost' This means that the working copy of FILE has been deleted but it has not been removed from CVS. This is nothing to be concerned about, the update will just recreate the local file from the repository. (This is a convenient way to discard local changes to a file: just delete it and then run `cvs update'.) `cvs update: warning: FILE is not (any longer) pertinent' This means that the working copy of FILE has been deleted, it has not been removed from CVS in the current working directory, but it has been removed from CVS in some other working directory. This is nothing to be concerned about, the update would have removed the local file anyway.  File: cvs.info, Node: Connection, Next: Other problems, Prev: Error messages, Up: Troubleshooting F.2 Trouble making a connection to a CVS server =============================================== This section concerns what to do if you are having trouble making a connection to a CVS server. If you are running the CVS command line client running on Windows, first upgrade the client to CVS 1.9.12 or later. The error reporting in earlier versions provided much less information about what the problem was. If the client is non-Windows, CVS 1.9 should be fine. If the error messages are not sufficient to track down the problem, the next steps depend largely on which access method you are using. `:ext:' Try running the rsh program from the command line. For example: "rsh servername cvs -v" should print CVS version information. If this doesn't work, you need to fix it before you can worry about CVS problems. `:server:' You don't need a command line rsh program to use this access method, but if you have an rsh program around, it may be useful as a debugging tool. Follow the directions given for :ext:. `:pserver:' Errors along the lines of "connection refused" typically indicate that inetd isn't even listening for connections on port 2401 whereas errors like "connection reset by peer", "received broken pipe signal", "recv() from server: EOF", or "end of file from server" typically indicate that inetd is listening for connections but is unable to start CVS (this is frequently caused by having an incorrect path in `inetd.conf' or by firewall software rejecting the connection). "unrecognized auth response" errors are caused by a bad command line in `inetd.conf', typically an invalid option or forgetting to put the `pserver' command at the end of the line. Another less common problem is invisible control characters that your editor "helpfully" added without you noticing. One good debugging tool is to "telnet servername 2401". After connecting, send any text (for example "foo" followed by return). If CVS is working correctly, it will respond with cvs [pserver aborted]: bad auth protocol start: foo If instead you get: Usage: cvs [cvs-options] command [command-options-and-arguments] ... then you're missing the `pserver' command at the end of the line in `inetd.conf'; check to make sure that the entire command is on one line and that it's complete. Likewise, if you get something like: Unknown command: `pserved' CVS commands are: add Add a new file/directory to the repository ... then you've misspelled `pserver' in some way. If it isn't obvious, check for invisible control characters (particularly carriage returns) in `inetd.conf'. If it fails to work at all, then make sure inetd is working right. Change the invocation in `inetd.conf' to run the echo program instead of cvs. For example: 2401 stream tcp nowait root /bin/echo echo hello After making that change and instructing inetd to re-read its configuration file, "telnet servername 2401" should show you the text hello and then the server should close the connection. If this doesn't work, you need to fix it before you can worry about CVS problems. On AIX systems, the system will often have its own program trying to use port 2401. This is AIX's problem in the sense that port 2401 is registered for use with CVS. I hear that there is an AIX patch available to address this problem. Another good debugging tool is the `-d' (debugging) option to inetd. Consult your system documentation for more information. If you seem to be connecting but get errors like: cvs server: cannot open /root/.cvsignore: Permission denied cvs [server aborted]: can't chdir(/root): Permission denied then you probably haven't specified `-f' in `inetd.conf'. (In releases prior to CVS 1.11.1, this problem can be caused by your system setting the `$HOME' environment variable for programs being run by inetd. In this case, you can either have inetd run a shell script that unsets `$HOME' and then runs CVS, or you can use `env' to run CVS with a pristine environment.) If you can connect successfully for a while but then can't, you've probably hit inetd's rate limit. (If inetd receives too many requests for the same service in a short period of time, it assumes that something is wrong and temporarily disables the service.) Check your inetd documentation to find out how to adjust the rate limit (some versions of inetd have a single rate limit, others allow you to set the limit for each service separately.)  File: cvs.info, Node: Other problems, Prev: Connection, Up: Troubleshooting F.3 Other common problems ========================= Here is a list of problems which do not fit into the above categories. They are in no particular order. * On Windows, if there is a 30 second or so delay when you run a CVS command, it may mean that you have your home directory set to `C:/', for example (see `HOMEDRIVE' and `HOMEPATH' in *Note Environment variables::). CVS expects the home directory to not end in a slash, for example `C:' or `C:\cvs'. * If you are running CVS 1.9.18 or older, and `cvs update' finds a conflict and tries to merge, as described in *Note Conflicts example::, but doesn't tell you there were conflicts, then you may have an old version of RCS. The easiest solution probably is to upgrade to a current version of CVS, which does not rely on external RCS programs.  File: cvs.info, Node: Credits, Next: BUGS, Prev: Troubleshooting, Up: Top Appendix G Credits ****************** Roland Pesch, then of Cygnus Support wrote the manual pages which were distributed with CVS 1.3. Much of their text was copied into this manual. He also read an early draft of this manual and contributed many ideas and corrections. The mailing-list `info-cvs' is sometimes informative. I have included information from postings made by the following persons: David G. Grubbs . Some text has been extracted from the man pages for RCS. The CVS FAQ by David G. Grubbs has provided useful material. The FAQ is no longer maintained, however, and this manual is about the closest thing there is to a successor (with respect to documenting how to use CVS, at least). In addition, the following persons have helped by telling me about mistakes I've made: Roxanne Brunskill , Kathy Dyer , Karl Pingle , Thomas A Peterson , Inge Wallin , Dirk Koschuetzki and Michael Brown . The list of contributors here is not comprehensive; for a more complete list of who has contributed to this manual see the file `doc/ChangeLog' in the CVS source distribution.  File: cvs.info, Node: BUGS, Next: Index, Prev: Credits, Up: Top Appendix H Dealing with bugs in CVS or this manual ************************************************** Neither CVS nor this manual is perfect, and they probably never will be. If you are having trouble using CVS, or think you have found a bug, there are a number of things you can do about it. Note that if the manual is unclear, that can be considered a bug in the manual, so these problems are often worth doing something about as well as problems with CVS itself. * If you want someone to help you and fix bugs that you report, there are companies which will do that for a fee. One such company is: Ximbiot LLC Suite 230 200 Diversion St. Rochester Hills, MI 48307-6636 USA Email: info@ximbiot.com Phone: (248) 835-1260 Fax: (248) 835-1263 `http://ximbiot.com/' * If you got CVS through a distributor, such as an operating system vendor or a vendor of freeware CD-ROMs, you may wish to see whether the distributor provides support. Often, they will provide no support or minimal support, but this may vary from distributor to distributor. * If you have the skills and time to do so, you may wish to fix the bug yourself. If you wish to submit your fix for inclusion in future releases of CVS, see the file HACKING in the CVS source distribution. It contains much more information on the process of submitting fixes. * There may be resources on the net which can help. A good place to start is: `http://cvs.nongnu.org/' If you are so inspired, increasing the information available on the net is likely to be appreciated. For example, before the standard CVS distribution worked on Windows 95, there was a web page with some explanation and patches for running CVS on Windows 95, and various people helped out by mentioning this page on mailing lists or newsgroups when the subject came up. * It is also possible to report bugs to . Note that someone may or may not want to do anything with your bug report--if you need a solution consider one of the options mentioned above. People probably do want to hear about bugs which are particularly severe in consequences and/or easy to fix, however. You can also increase your odds by being as clear as possible about the exact nature of the bug and any other relevant information. The way to report bugs is to send email to . Note that submissions to may be distributed under the terms of the GNU Public License, so if you don't like this, don't submit them. There is usually no justification for sending mail directly to one of the CVS maintainers rather than to ; those maintainers who want to hear about such bug reports read . Also note that sending a bug report to other mailing lists or newsgroups is _not_ a substitute for sending it to . It is fine to discuss CVS bugs on whatever forum you prefer, but there are not necessarily any maintainers reading bug reports sent anywhere except . People often ask if there is a list of known bugs or whether a particular bug is a known one. The file BUGS in the CVS source distribution is one list of known bugs, but it doesn't necessarily try to be comprehensive. Perhaps there will never be a comprehensive, detailed list of known bugs.  File: cvs.info, Node: Index, Prev: BUGS, Up: Top Index ***** [index] * Menu: * !, in modules file: Excluding directories. (line 6) * #cvs.lock, removing: Concurrency. (line 11) * #cvs.lock, technical details: Locks. (line 6) * #cvs.rfl, and backups: Backing up. (line 10) * #cvs.rfl, removing: Concurrency. (line 11) * #cvs.rfl, technical details: Locks. (line 6) * #cvs.tfl: Locks. (line 14) * #cvs.wfl, removing: Concurrency. (line 11) * #cvs.wfl, technical details: Locks. (line 6) * &, in modules file: Ampersand modules. (line 6) * -a, in modules file: Alias modules. (line 6) * -d, in modules file: Module options. (line 9) * -e, in modules file <1>: Module program options. (line 6) * -e, in modules file: Module options. (line 12) * -j (merging branches): Merging a branch. (line 6) * -j (merging branches), and keyword substitution: Merging and keywords. (line 6) * -k (keyword substitution): Substitution modes. (line 6) * -kk, to avoid conflicts during a merge: Merging and keywords. (line 6) * -o, in modules file <1>: Module program options. (line 6) * -o, in modules file: Module options. (line 16) * -s, in modules file: Module options. (line 22) * -t, in modules file <1>: Module program options. (line 6) * -t, in modules file: Module options. (line 30) * .# files: update output. (line 49) * .bashrc, setting CVSROOT in: Specifying a repository. (line 12) * .cshrc, setting CVSROOT in: Specifying a repository. (line 12) * .cvsrc file: ~/.cvsrc. (line 6) * .profile, setting CVSROOT in: Specifying a repository. (line 12) * .tcshrc, setting CVSROOT in: Specifying a repository. (line 12) * /usr/local/cvsroot, as example repository: Repository. (line 6) * :ext:, setting up: Connecting via rsh. (line 42) * :ext:, troubleshooting: Connection. (line 16) * :extssh:, setting up: Connecting via rsh. (line 42) * :fork:, setting up: Connecting via fork. (line 6) * :gserver:, setting up: GSSAPI authenticated. (line 6) * :kserver:, setting up: Kerberos authenticated. (line 6) * :local:, setting up: Repository. (line 19) * :pserver:, setting up: Password authentication client. (line 6) * :pserver:, troubleshooting: Connection. (line 27) * :server:, setting up: Connecting via rsh. (line 42) * :server:, troubleshooting: Connection. (line 22) * <<<<<<<: Conflicts example. (line 96) * =======: Conflicts example. (line 96) * >>>>>>>: Conflicts example. (line 96) * __ files (VMS): update output. (line 49) * Abandoning work: Editing files. (line 34) * Access a branch: Accessing branches. (line 6) * add (subcommand) <1>: add. (line 6) * add (subcommand): Adding files. (line 34) * Adding a tag: Tags. (line 45) * Adding files: Adding files. (line 6) * Admin (subcommand): admin. (line 6) * Administrative files (intro): Intro administrative files. (line 6) * Administrative files (reference): Administrative files. (line 6) * Administrative files, editing them: Intro administrative files. (line 33) * Alias modules: Alias modules. (line 6) * ALL in commitinfo: commitinfo. (line 26) * Ampersand modules: Ampersand modules. (line 6) * annotate (subcommand): annotate. (line 6) * Atomic transactions, lack of: Concurrency. (line 27) * Attic: Attic. (line 6) * Authenticated client, using: Password authentication client. (line 6) * Authenticating server, setting up: Password authentication server. (line 10) * Authentication, stream: Global options. (line 13) * Author keyword: Keyword list. (line 8) * Automatically ignored files: cvsignore. (line 23) * Avoiding editor invocation: Common options. (line 111) * Backing up, repository: Backing up. (line 6) * Base directory, in CVS directory: Working directory storage. (line 178) * BASE, as reserved tag name: Tags. (line 25) * BASE, special tag: Common options. (line 143) * Baserev file, in CVS directory: Working directory storage. (line 184) * Baserev.tmp file, in CVS directory: Working directory storage. (line 192) * Bill of materials: Builds. (line 25) * Binary files: Binary files. (line 6) * Branch merge example: Merging a branch. (line 15) * Branch number <1>: Branches and revisions. (line 6) * Branch number: Revision numbers. (line 6) * Branch tags, deleting: Modifying tags. (line 19) * Branch tags, moving: Modifying tags. (line 37) * Branch, accessing: Accessing branches. (line 6) * Branch, check out: Accessing branches. (line 6) * Branch, creating a: Creating a branch. (line 6) * Branch, identifying: Accessing branches. (line 6) * Branch, retrieving: Accessing branches. (line 6) * Branch, vendor-: Tracking sources. (line 10) * Branches motivation: Branches motivation. (line 6) * Branches, copying changes between: Branching and merging. (line 6) * Branches, sticky: Accessing branches. (line 37) * Branching: Branching and merging. (line 6) * Bringing a file up to date: Updating a file. (line 6) * Bugs in this manual or CVS: BUGS. (line 6) * Bugs, reporting: BUGS. (line 13) * Builds: Builds. (line 6) * Changes, copying between branches: Branching and merging. (line 6) * Changing a log message: admin options. (line 73) * Check out a branch: Accessing branches. (line 6) * Checked out copy, keeping: Keeping a checked out copy. (line 6) * Checking out source: Getting the source. (line 6) * checkout (subcommand): checkout. (line 6) * Checkout program: Module options. (line 16) * Checkout, as term for getting ready to edit: Editing files. (line 6) * Checkout, example: Getting the source. (line 6) * checkoutlist: checkoutlist. (line 6) * Choosing, reserved or unreserved checkouts: Choosing a model. (line 6) * Cleaning up: Cleaning up. (line 6) * Client/Server Operation: Remote repositories. (line 6) * Client/Server Operation, port specification <1>: Password authentication server. (line 10) * Client/Server Operation, port specification: Remote repositories. (line 6) * co (subcommand): checkout. (line 6) * Command reference: Invoking CVS. (line 6) * Command structure: Structure. (line 6) * Comment leader: admin options. (line 27) * commit (subcommand): commit. (line 6) * commitinfo: commitinfo. (line 6) * commitinfo, command environment: commitinfo. (line 30) * commitinfo, working directory: commitinfo. (line 30) * Commits, precommit verification of: commitinfo. (line 6) * Committing changes to files: Committing your changes. (line 6) * Committing, administrative support files: commit files. (line 6) * Committing, when to: When to commit. (line 6) * Common options: Common options. (line 6) * Common syntax of info files: syntax. (line 6) * Compatibility, between CVS versions: Compatibility. (line 6) * Compression <1>: Invoking CVS. (line 75) * Compression: Global options. (line 114) * COMSPEC, environment variable: Environment variables. (line 110) * config, in CVSROOT: config. (line 6) * Conflict markers: Conflicts example. (line 96) * Conflict resolution: Conflicts example. (line 101) * Conflicts (merge example): Conflicts example. (line 68) * Contributors (CVS program): What is CVS?. (line 28) * Contributors (manual): Credits. (line 6) * Copying a repository: Moving a repository. (line 6) * Copying changes: Branching and merging. (line 6) * Correcting a log message: admin options. (line 73) * Creating a branch: Creating a branch. (line 6) * Creating a project: Starting a new project. (line 6) * Creating a repository: Creating a repository. (line 6) * Credits (CVS program): What is CVS?. (line 28) * Credits (manual): Credits. (line 6) * CVS 1.6, and watches: Watches Compatibility. (line 6) * CVS command structure: Structure. (line 6) * CVS directory, in repository: CVS in repository. (line 6) * CVS directory, in working directory: Working directory storage. (line 6) * CVS passwd file: Password authentication server. (line 75) * CVS, history of: What is CVS?. (line 28) * CVS, introduction to: What is CVS?. (line 6) * CVS, versions of: Compatibility. (line 6) * CVS/Base directory: Working directory storage. (line 178) * CVS/Baserev file: Working directory storage. (line 184) * CVS/Baserev.tmp file: Working directory storage. (line 192) * CVS/Entries file: Working directory storage. (line 60) * CVS/Entries.Backup file: Working directory storage. (line 143) * CVS/Entries.Log file: Working directory storage. (line 120) * CVS/Entries.Static file: Working directory storage. (line 148) * CVS/Notify file: Working directory storage. (line 167) * CVS/Notify.tmp file: Working directory storage. (line 172) * CVS/Repository file: Working directory storage. (line 32) * CVS/Root file: Specifying a repository. (line 25) * CVS/Tag file: Working directory storage. (line 156) * CVS/Template file: Working directory storage. (line 198) * CVS_CLIENT_LOG, environment variable: Environment variables. (line 93) * CVS_CLIENT_PORT: Kerberos authenticated. (line 25) * CVS_IGNORE_REMOTE_ROOT, environment variable: Environment variables. (line 104) * CVS_PASSFILE, environment variable: Password authentication client. (line 46) * CVS_RCMD_PORT, environment variable: Environment variables. (line 88) * CVS_RSH, environment variable: Environment variables. (line 60) * CVS_SERVER, and :fork:: Connecting via fork. (line 24) * CVS_SERVER, environment variable: Connecting via rsh. (line 32) * CVS_SERVER_SLEEP, environment variable: Environment variables. (line 99) * CVS_SSH, environment variable: Environment variables. (line 64) * CVS_USER, environment variable: Variables. (line 71) * cvsadmin: admin. (line 18) * CVSEDITOR, environment variable <1>: Environment variables. (line 38) * CVSEDITOR, environment variable: Committing your changes. (line 17) * CVSEDITOR, internal variable: Variables. (line 37) * cvsignore (admin file), global: cvsignore. (line 6) * CVSIGNORE, environment variable: Environment variables. (line 8) * CVSREAD, environment variable: Environment variables. (line 16) * CVSREAD, overriding: Global options. (line 98) * cvsroot: Repository. (line 6) * CVSROOT (file): Administrative files. (line 6) * CVSROOT, environment variable: Specifying a repository. (line 12) * CVSROOT, internal variable: Variables. (line 26) * CVSROOT, module name: Intro administrative files. (line 6) * CVSROOT, multiple repositories: Multiple repositories. (line 6) * CVSROOT, overriding: Global options. (line 35) * CVSROOT, storage of files: CVSROOT storage. (line 6) * CVSROOT/config: config. (line 6) * CVSROOT/Emptydir directory: Working directory storage. (line 58) * CVSROOT/val-tags file, and read-only access to projects: File permissions. (line 26) * CVSROOT/val-tags file, forcing tags into: Error messages. (line 197) * CVSUMASK, environment variable: File permissions. (line 35) * cvswrappers (admin file): Wrappers. (line 6) * CVSWRAPPERS, environment variable <1>: Environment variables. (line 12) * CVSWRAPPERS, environment variable: Wrappers. (line 6) * Date keyword: Keyword list. (line 11) * Dates: Common options. (line 18) * Dead state: Attic. (line 17) * Decimal revision number: Revision numbers. (line 6) * DEFAULT in commitinfo: commitinfo. (line 23) * DEFAULT in editinfo: editinfo. (line 38) * DEFAULT in verifymsg: verifymsg. (line 25) * Defining a module: Defining the module. (line 6) * Defining modules (intro): Intro administrative files. (line 6) * Defining modules (reference manual): modules. (line 6) * Deleting branch tags: Modifying tags. (line 19) * Deleting files: Removing files. (line 6) * Deleting revisions: admin options. (line 95) * Deleting sticky tags: Sticky tags. (line 30) * Deleting tags: Modifying tags. (line 19) * Descending directories: Recursive behavior. (line 6) * Device nodes: Special Files. (line 6) * Diff: Viewing differences. (line 6) * diff (subcommand): diff. (line 6) * Differences, merging: Merging two revisions. (line 6) * Directories, moving: Moving directories. (line 6) * Directories, removing: Removing directories. (line 6) * Directory, descending: Recursive behavior. (line 6) * Disjoint repositories: Multiple repositories. (line 6) * Distributing log messages: loginfo. (line 6) * driver.c (merge example): Conflicts example. (line 6) * edit (subcommand): Editing files. (line 13) * editinfo (admin file): editinfo. (line 6) * Editing administrative files: Intro administrative files. (line 33) * Editing the modules file: Defining the module. (line 6) * Editor, avoiding invocation of: Common options. (line 111) * EDITOR, environment variable <1>: Environment variables. (line 39) * EDITOR, environment variable: Committing your changes. (line 17) * EDITOR, internal variable: Variables. (line 38) * EDITOR, overriding: Global options. (line 40) * Editor, specifying per module: editinfo. (line 6) * editors (subcommand): Watch information. (line 15) * emerge: Conflicts example. (line 140) * Emptydir, in CVSROOT directory: Working directory storage. (line 58) * Encryption: Global options. (line 104) * Entries file, in CVS directory: Working directory storage. (line 60) * Entries.Backup file, in CVS directory: Working directory storage. (line 143) * Entries.Log file, in CVS directory: Working directory storage. (line 120) * Entries.Static file, in CVS directory: Working directory storage. (line 148) * Environment variables: Environment variables. (line 6) * environment variables, passed to administrative files: Variables. (line 70) * Errors, reporting: BUGS. (line 13) * Example of a work-session: A sample session. (line 6) * Example of merge: Conflicts example. (line 6) * Example, branch merge: Merging a branch. (line 15) * Excluding directories, in modules file: Excluding directories. (line 6) * Exit status, of commitinfo: commitinfo. (line 19) * Exit status, of CVS: Exit status. (line 6) * Exit status, of editor: Error messages. (line 319) * Exit status, of verifymsg: verifymsg. (line 28) * export (subcommand): export. (line 6) * Export program: Module options. (line 12) * Fetching source: Getting the source. (line 6) * File had conflicts on merge: File status. (line 46) * File locking: Multiple developers. (line 6) * File permissions, general: File permissions. (line 6) * File permissions, Windows-specific: Windows permissions. (line 6) * File status: File status. (line 6) * Files, moving: Moving files. (line 6) * Files, reference manual: Administrative files. (line 6) * Fixing a log message: admin options. (line 73) * Forcing a tag match: Common options. (line 72) * fork, access method: Connecting via fork. (line 6) * Form for log message: rcsinfo. (line 6) * Format of CVS commands: Structure. (line 6) * Getting started: A sample session. (line 6) * Getting the source: Getting the source. (line 6) * Global cvsignore: cvsignore. (line 6) * Global options: Global options. (line 6) * Group, UNIX file permissions, in repository: File permissions. (line 6) * gserver (client/server connection method), port specification <1>: Password authentication server. (line 10) * gserver (client/server connection method), port specification: Remote repositories. (line 6) * GSSAPI: GSSAPI authenticated. (line 6) * Gzip <1>: Invoking CVS. (line 75) * Gzip: Global options. (line 114) * Hard links: Special Files. (line 6) * HEAD, as reserved tag name: Tags. (line 25) * HEAD, special tag: Common options. (line 143) * Header keyword: Keyword list. (line 14) * history (subcommand): history. (line 6) * History browsing: History browsing. (line 6) * History file: history file. (line 6) * History files: Repository files. (line 68) * History of CVS: What is CVS?. (line 28) * HOME, environment variable: Environment variables. (line 49) * HOMEDRIVE, environment variable: Environment variables. (line 52) * HOMEPATH, environment variable: Environment variables. (line 50) * Id keyword: Keyword list. (line 20) * Ident (shell command): Using keywords. (line 19) * Identifying a branch: Accessing branches. (line 6) * Identifying files: Keyword substitution. (line 6) * Ignored files: cvsignore. (line 23) * IgnoreUnknownConfigKeys, in CVSROOT/config: config. (line 85) * Ignoring files: cvsignore. (line 6) * import (subcommand): import. (line 6) * Importing files: From files. (line 6) * Importing files, from other version control systems: From other version control systems. (line 6) * Importing modules: First import. (line 6) * Index: Index. (line 6) * inetd, configuring for pserver: Password authentication server. (line 10) * Info files: Trigger Scripts. (line 6) * Info files (syntax): syntax. (line 6) * Info files, security: Trigger Script Security. (line 6) * Informing others: Informing others. (line 6) * init (subcommand): Creating a repository. (line 35) * Installed images (VMS): File permissions. (line 59) * Internal variables: Variables. (line 6) * Introduction to CVS: What is CVS?. (line 6) * Invoking CVS: Invoking CVS. (line 6) * Isolation: History browsing. (line 6) * Join: Merging a branch. (line 13) * Keeping a checked out copy: Keeping a checked out copy. (line 6) * Kerberos, using :gserver:: GSSAPI authenticated. (line 6) * Kerberos, using :kserver:: Kerberos authenticated. (line 6) * Kerberos, using kerberized rsh: Connecting via rsh. (line 42) * Keyword expansion: Keyword substitution. (line 6) * Keyword List: Keyword list. (line 6) * Keyword substitution: Keyword substitution. (line 6) * Keyword substitution, and merging: Merging and keywords. (line 6) * Keyword substitution, changing modes: Substitution modes. (line 6) * Kflag: Substitution modes. (line 6) * kinit: Kerberos authenticated. (line 31) * Known bugs in this manual or CVS: BUGS. (line 72) * kserver (client/server connection method), port specification <1>: Password authentication server. (line 10) * kserver (client/server connection method), port specification: Remote repositories. (line 6) * Layout of repository: Repository. (line 6) * Left-hand options: Global options. (line 6) * Linear development: Revision numbers. (line 6) * Link, symbolic, importing: import output. (line 23) * List, mailing list: What is CVS?. (line 44) * Locally Added: File status. (line 19) * Locally Modified: File status. (line 16) * Locally Removed: File status. (line 23) * LockDir, in CVSROOT/config: config. (line 41) * Locker keyword: Keyword list. (line 29) * Locking files: Multiple developers. (line 6) * Locks, cvs, and backups: Backing up. (line 10) * Locks, cvs, introduction: Concurrency. (line 6) * Locks, cvs, technical details: Locks. (line 6) * log (subcommand): log. (line 6) * Log information, saving: history file. (line 6) * Log keyword: Keyword list. (line 33) * Log message entry: Committing your changes. (line 6) * Log message template: rcsinfo. (line 6) * Log message, correcting: admin options. (line 73) * Log message, verifying: verifymsg. (line 6) * Log messages: loginfo. (line 6) * Log messages, editing: editinfo. (line 6) * LogHistory, in CVSROOT/config: config. (line 61) * Login (subcommand): Password authentication client. (line 6) * loginfo (admin file): loginfo. (line 6) * LOGNAME, environment variable: Variables. (line 78) * Logout (subcommand): Password authentication client. (line 70) * Mail, automatic mail on commit: Informing others. (line 6) * Mailing list: What is CVS?. (line 44) * Mailing log messages: loginfo. (line 6) * Main trunk and branches: Branching and merging. (line 6) * make: Builds. (line 6) * Many repositories: Multiple repositories. (line 6) * Markers, conflict: Conflicts example. (line 96) * Merge, an example: Conflicts example. (line 6) * Merge, branch example: Merging a branch. (line 15) * Merging: Branching and merging. (line 6) * Merging a branch: Merging a branch. (line 6) * Merging a file: Updating a file. (line 6) * Merging two revisions: Merging two revisions. (line 6) * Merging, and keyword substitution: Merging and keywords. (line 6) * mkmodules: Error messages. (line 171) * Modifications, copying between branches: Branching and merging. (line 6) * Module status: Module options. (line 22) * Module, defining: Defining the module. (line 6) * Modules (admin file): modules. (line 6) * Modules file: Intro administrative files. (line 6) * Modules file program options: Module program options. (line 6) * Modules file, changing: Defining the module. (line 6) * modules.db: CVSROOT storage. (line 25) * modules.dir: CVSROOT storage. (line 25) * modules.pag: CVSROOT storage. (line 25) * Motivation for branches: Branches motivation. (line 6) * Moving a repository: Moving a repository. (line 6) * Moving branch tags: Modifying tags. (line 37) * Moving directories: Moving directories. (line 6) * Moving files: Moving files. (line 6) * Moving tags: Modifying tags. (line 37) * Multiple developers: Multiple developers. (line 6) * Multiple repositories: Multiple repositories. (line 6) * Name keyword: Keyword list. (line 23) * Name, symbolic (tag): Tags. (line 25) * Needs Checkout: File status. (line 27) * Needs Merge: File status. (line 37) * Needs Patch: File status. (line 32) * Newsgroups: What is CVS?. (line 44) * notify (admin file): Getting Notified. (line 60) * Notify file, in CVS directory: Working directory storage. (line 167) * Notify.tmp file, in CVS directory: Working directory storage. (line 172) * Number, branch <1>: Branches and revisions. (line 6) * Number, branch: Revision numbers. (line 6) * Number, revision-: Revision numbers. (line 6) * Option defaults: ~/.cvsrc. (line 6) * Options, global: Global options. (line 6) * Options, in modules file: Module options. (line 6) * Outdating revisions: admin options. (line 95) * Overlap: Updating a file. (line 24) * Overriding CVSREAD: Global options. (line 98) * Overriding CVSROOT: Global options. (line 35) * Overriding EDITOR: Global options. (line 40) * Overriding RCSBIN: Global options. (line 21) * Overriding TMPDIR: Global options. (line 27) * Overview: Overview. (line 6) * Ownership, saving in CVS: Special Files. (line 6) * Parallel repositories: Multiple repositories. (line 6) * passwd (admin file): Password authentication server. (line 75) * Password client, using: Password authentication client. (line 6) * Password server, setting up: Password authentication server. (line 10) * PATH, environment variable: Environment variables. (line 45) * Per-directory sticky tags/dates: Working directory storage. (line 156) * Per-module editor: editinfo. (line 6) * Permissions, general: File permissions. (line 6) * Permissions, saving in CVS: Special Files. (line 6) * Permissions, Windows-specific: Windows permissions. (line 6) * Policy: When to commit. (line 6) * port, specifying for remote repositories <1>: Password authentication server. (line 10) * port, specifying for remote repositories: Remote repositories. (line 6) * Precommit checking: commitinfo. (line 6) * pserver (client/server connection method), port specification <1>: Password authentication server. (line 10) * pserver (client/server connection method), port specification: Remote repositories. (line 6) * pserver (subcommand): Password authentication server. (line 10) * PVCS, importing files from: From other version control systems. (line 45) * RCS history files: Repository files. (line 68) * RCS revision numbers: Tags. (line 10) * RCS, importing files from: From other version control systems. (line 10) * RCS-style locking: Multiple developers. (line 6) * RCSBIN, in CVSROOT/config: config. (line 15) * RCSBIN, internal variable: Variables. (line 32) * RCSBIN, overriding: Global options. (line 21) * RCSfile keyword: Keyword list. (line 56) * rcsinfo (admin file): rcsinfo. (line 6) * rdiff (subcommand): rdiff. (line 6) * Read-only files, and -r: Global options. (line 79) * Read-only files, and CVSREAD: Environment variables. (line 16) * Read-only files, and watches: Setting a watch. (line 10) * Read-only files, in repository: File permissions. (line 6) * Read-only mode: Global options. (line 60) * Read-only repository access: Read-only access. (line 6) * readers (admin file): Read-only access. (line 6) * Recursive (directory descending): Recursive behavior. (line 6) * Reference manual (files): Administrative files. (line 6) * Reference manual for variables: Environment variables. (line 6) * Reference, commands: Invoking CVS. (line 6) * Regular expression syntax: syntax. (line 10) * Regular modules: Regular modules. (line 6) * release (subcommand): release. (line 6) * Releases, revisions and versions: Versions revisions releases. (line 6) * Releasing your working copy: Cleaning up. (line 6) * Remote repositories: Remote repositories. (line 6) * Remote repositories, port specification <1>: Password authentication server. (line 10) * Remote repositories, port specification: Remote repositories. (line 6) * remove (subcommand): remove. (line 6) * Remove (subcommand): Removing files. (line 34) * Removing a change: Merging two revisions. (line 9) * Removing branch tags: Modifying tags. (line 19) * Removing directories: Removing directories. (line 6) * Removing files: Removing files. (line 6) * Removing tags: Modifying tags. (line 19) * Removing your working copy: Cleaning up. (line 6) * Renaming directories: Moving directories. (line 6) * Renaming files: Moving files. (line 6) * Renaming tags: Modifying tags. (line 57) * Replacing a log message: admin options. (line 73) * Reporting bugs: BUGS. (line 13) * Repositories, multiple: Multiple repositories. (line 6) * Repositories, remote: Remote repositories. (line 6) * Repositories, remote, port specification <1>: Password authentication server. (line 10) * Repositories, remote, port specification: Remote repositories. (line 6) * Repository (intro): Repository. (line 6) * Repository file, in CVS directory: Working directory storage. (line 32) * Repository, backing up: Backing up. (line 6) * Repository, example: Repository. (line 6) * Repository, how data is stored: Repository storage. (line 6) * Repository, moving: Moving a repository. (line 6) * Repository, setting up: Creating a repository. (line 6) * RereadLogAfterVerify, in CVSROOT/config: config. (line 68) * Reserved checkouts: Multiple developers. (line 6) * Resetting sticky tags: Sticky tags. (line 30) * Resolving a conflict: Conflicts example. (line 101) * Restoring old version of removed file: Merging two revisions. (line 19) * Resurrecting old version of dead file: Merging two revisions. (line 19) * Retrieve a branch: Accessing branches. (line 6) * Retrieving an old revision using tags: Tags. (line 84) * Reverting to repository version: Editing files. (line 34) * Revision keyword: Keyword list. (line 59) * Revision management: Revision management. (line 6) * Revision numbers: Revision numbers. (line 6) * Revision numbers (branches): Branches and revisions. (line 6) * Revision tree: Revision numbers. (line 6) * Revision tree, making branches: Branching and merging. (line 6) * Revisions, merging differences between: Merging two revisions. (line 6) * Revisions, versions and releases: Versions revisions releases. (line 6) * Right-hand options: Common options. (line 6) * Root file, in CVS directory: Specifying a repository. (line 25) * rsh: Connecting via rsh. (line 12) * rsh replacements (Kerberized, SSH, &c): Connecting via rsh. (line 42) * rtag (subcommand): Tagging by date/tag. (line 6) * rtag, creating a branch using: Creating a branch. (line 6) * Saving space: admin options. (line 95) * SCCS, importing files from: From other version control systems. (line 38) * Security, file permissions in repository: File permissions. (line 6) * Security, GSSAPI: GSSAPI authenticated. (line 6) * Security, Kerberos: Kerberos authenticated. (line 6) * Security, of pserver: Password authentication security. (line 6) * Security, setuid: File permissions. (line 59) * Server, CVS: Remote repositories. (line 6) * Server, temporary directories: Server temporary directory. (line 6) * Setgid: File permissions. (line 59) * Setting up a repository: Creating a repository. (line 6) * Setuid: File permissions. (line 59) * Source keyword: Keyword list. (line 62) * Source, getting CVS source: What is CVS?. (line 38) * Source, getting from CVS: Getting the source. (line 6) * Special files: Special Files. (line 6) * Specifying dates: Common options. (line 18) * Spreading information: Informing others. (line 6) * ssh: Connecting via rsh. (line 6) * SSH (rsh replacement): Connecting via rsh. (line 42) * Starting a project with CVS: Starting a new project. (line 6) * State keyword: Keyword list. (line 65) * Status of a file: File status. (line 6) * Status of a module: Module options. (line 22) * Sticky date: Sticky tags. (line 37) * Sticky tags: Sticky tags. (line 6) * Sticky tags, resetting: Sticky tags. (line 30) * Sticky tags/dates, per-directory: Working directory storage. (line 156) * Storing log messages: loginfo. (line 6) * Stream authentication: Global options. (line 13) * Structure: Structure. (line 6) * Subdirectories: Recursive behavior. (line 6) * Support, getting CVS support: BUGS. (line 17) * Symbolic link, importing: import output. (line 23) * Symbolic links: Special Files. (line 6) * Symbolic name (tag): Tags. (line 25) * Syntax of info files: syntax. (line 6) * SystemAuth, in CVSROOT/config: config. (line 21) * tag (subcommand): Tagging the working directory. (line 6) * Tag file, in CVS directory: Working directory storage. (line 156) * Tag program: Module options. (line 30) * tag, command, introduction: Tags. (line 25) * tag, creating a branch using: Creating a branch. (line 6) * Tag, example: Tags. (line 45) * Tag, retrieving old revisions: Tags. (line 84) * Tag, symbolic name: Tags. (line 25) * taginfo (admin file): taginfo. (line 6) * Tags: Tags. (line 6) * Tags, deleting: Modifying tags. (line 19) * Tags, logging: taginfo. (line 6) * Tags, moving: Modifying tags. (line 37) * Tags, renaming: Modifying tags. (line 57) * Tags, sticky: Sticky tags. (line 6) * Tags, verifying: taginfo. (line 6) * tc, Trivial Compiler (example): A sample session. (line 6) * Team of developers: Multiple developers. (line 6) * TEMP, environment variable: Environment variables. (line 116) * Template file, in CVS directory: Working directory storage. (line 198) * Template for log message: rcsinfo. (line 6) * Temporary directories, and server: Server temporary directory. (line 6) * Temporary files, location of: Environment variables. (line 117) * Third-party sources: Tracking sources. (line 6) * Time: Common options. (line 18) * Timezone, in input: Common options. (line 34) * Timezone, in output: log. (line 17) * TMP, environment variable: Environment variables. (line 115) * TMPDIR, environment variable: Environment variables. (line 114) * TMPDIR, overriding: Global options. (line 27) * TopLevelAdmin, in CVSROOT/config: config. (line 28) * Trace: Global options. (line 88) * Traceability: History browsing. (line 6) * Tracking sources: Tracking sources. (line 6) * Transactions, atomic, lack of: Concurrency. (line 27) * Trigger scripts: Trigger Scripts. (line 6) * Trigger scripts, security: Trigger Script Security. (line 6) * Trivial Compiler (example): A sample session. (line 6) * Typical repository: Repository. (line 6) * Umask, for repository files: File permissions. (line 35) * Undoing a change: Merging two revisions. (line 9) * unedit (subcommand): Editing files. (line 34) * Unknown: File status. (line 52) * Unreserved checkouts: Multiple developers. (line 6) * Unresolved Conflict: File status. (line 41) * Up-to-date: File status. (line 11) * update (subcommand): update. (line 6) * Update, introduction: Updating a file. (line 6) * update, to display file status: File status. (line 74) * Updating a file: Updating a file. (line 6) * User aliases: Password authentication server. (line 104) * User variables: Variables. (line 50) * USER, environment variable: Variables. (line 81) * USER, internal variable: Variables. (line 43) * users (admin file): Getting Notified. (line 75) * val-tags file, and read-only access to projects: File permissions. (line 26) * val-tags file, forcing tags into: Error messages. (line 197) * Variables: Variables. (line 6) * Vendor: Tracking sources. (line 10) * Vendor branch: Tracking sources. (line 10) * verifymsg (admin file): verifymsg. (line 6) * verifymsg, changing the log message <1>: config. (line 68) * verifymsg, changing the log message: verifymsg. (line 31) * version (subcommand): Invoking CVS. (line 779) * Versions, of CVS: Compatibility. (line 6) * Versions, revisions and releases: Versions revisions releases. (line 6) * Viewing differences: Viewing differences. (line 6) * VISUAL, environment variable <1>: Environment variables. (line 40) * VISUAL, environment variable: Committing your changes. (line 23) * VISUAL, internal variable: Variables. (line 39) * watch add (subcommand): Getting Notified. (line 11) * watch off (subcommand): Setting a watch. (line 26) * watch on (subcommand): Setting a watch. (line 9) * watch remove (subcommand): Getting Notified. (line 54) * watchers (subcommand): Watch information. (line 6) * Watches: Watches. (line 6) * wdiff (import example): First import. (line 19) * Web pages, maintaining with CVS: Keeping a checked out copy. (line 6) * What (shell command): Using keywords. (line 32) * What branches are good for: Branches motivation. (line 6) * What is CVS not?: What is CVS not?. (line 6) * What is CVS?: What is CVS?. (line 6) * When to commit: When to commit. (line 6) * Windows, and permissions: Windows permissions. (line 6) * Work-session, example of: A sample session. (line 6) * Working copy: Multiple developers. (line 6) * Working copy, removing: Cleaning up. (line 6) * Wrappers: Wrappers. (line 6) * writers (admin file): Read-only access. (line 6) * Ximbiot: BUGS. (line 17) * xinetd, configuring for pserver: Password authentication server. (line 10) * Zone, time, in input: Common options. (line 34) * Zone, time, in output: log. (line 17) 07070100106b9b000081a40000000000000000000000014d58a1f800048ff0000000b600010002ffffffffffffffff0000002500000000root/usr/local/share/info/cvs.info-1This is cvs.info, produced by makeinfo version 4.8 from cvs.texinfo. INFO-DIR-SECTION GNU Packages START-INFO-DIR-ENTRY * CVS: (cvs). Concurrent Versions System END-INFO-DIR-ENTRY INFO-DIR-SECTION Individual utilities START-INFO-DIR-ENTRY * cvs: (cvs)CVS commands. Concurrent Versions System END-INFO-DIR-ENTRY  File: cvs.info, Node: Top, Next: Overview, Up: (dir) CVS--Concurrent Versions System v1.11.23 **************************************** This info manual describes how to use and administer CVS version 1.11.23. Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Portions Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Derek R. Price, Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Ximbiot `http://ximbiot.com', Copyright (C) 1992, 1993, 1999 Signum Support AB, and Copyright (C) others. 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. * Menu: * Overview:: An introduction to CVS * Repository:: Where all your sources are stored * Starting a new project:: Starting a project with CVS * Revisions:: Numeric and symbolic names for revisions * Branching and merging:: Diverging/rejoining branches of development * Recursive behavior:: CVS descends directories * Adding and removing:: Adding/removing/renaming files/directories * History browsing:: Viewing the history of files in various ways CVS and the Real World. ----------------------- * Binary files:: CVS can handle binary files * Multiple developers:: How CVS helps a group of developers * Revision management:: Policy questions for revision management * Keyword substitution:: CVS can include the revision inside the file * Tracking sources:: Tracking third-party sources * Builds:: Issues related to CVS and builds * Special Files:: Devices, links and other non-regular files References. ----------- * CVS commands:: CVS commands share some things * Invoking CVS:: Quick reference to CVS commands * Administrative files:: Reference manual for the Administrative files * Environment variables:: All environment variables which affect CVS * Compatibility:: Upgrading CVS versions * Troubleshooting:: Some tips when nothing works * Credits:: Some of the contributors to this manual * BUGS:: Dealing with bugs in CVS or this manual * Index:: Index  File: cvs.info, Node: Overview, Next: Repository, Prev: Top, Up: Top 1 Overview ********** This chapter is for people who have never used CVS, and perhaps have never used version control software before. If you are already familiar with CVS and are just trying to learn a particular feature or remember a certain command, you can probably skip everything here. * Menu: * What is CVS?:: What you can do with CVS * What is CVS not?:: Problems CVS doesn't try to solve * A sample session:: A tour of basic CVS usage  File: cvs.info, Node: What is CVS?, Next: What is CVS not?, Up: Overview 1.1 What is CVS? ================ CVS is a version control system. Using it, you can record the history of your source files. For example, bugs sometimes creep in when software is modified, and you might not detect the bug until a long time after you make the modification. With CVS, you can easily retrieve old versions to see exactly which change caused the bug. This can sometimes be a big help. You could of course save every version of every file you have ever created. This would however waste an enormous amount of disk space. CVS stores all the versions of a file in a single file in a clever way that only stores the differences between versions. CVS also helps you if you are part of a group of people working on the same project. It is all too easy to overwrite each others' changes unless you are extremely careful. Some editors, like GNU Emacs, try to make sure that two people never modify the same file at the same time. Unfortunately, if someone is using another editor, that safeguard will not work. CVS solves this problem by insulating the different developers from each other. Every developer works in his own directory, and CVS merges the work when each developer is done. CVS started out as a bunch of shell scripts written by Dick Grune, posted to the newsgroup `comp.sources.unix' in the volume 6 release of July, 1986. While no actual code from these shell scripts is present in the current version of CVS much of the CVS conflict resolution algorithms come from them. In April, 1989, Brian Berliner designed and coded CVS. Jeff Polk later helped Brian with the design of the CVS module and vendor branch support. You can get CVS in a variety of ways, including free download from the Internet. For more information on downloading CVS and other CVS topics, see: `http://cvs.nongnu.org/' There is a mailing list, known as , devoted to CVS. To subscribe or unsubscribe write to . If you prefer a Usenet group, there is a one-way mirror (posts to the email list are usually sent to the news group, but not vice versa) of at `news:gnu.cvs.help'. The right Usenet group for posts is `news:comp.software.config-mgmt' which is for CVS discussions (along with other configuration management systems). In the future, it might be possible to create a `comp.software.config-mgmt.cvs', but probably only if there is sufficient CVS traffic on `news:comp.software.config-mgmt'. You can also subscribe to the mailing list, described in more detail in *Note BUGS::. To subscribe send mail to . There is a two-way Usenet mirror (posts to the Usenet group are usually sent to the email list and vice versa) of named `news:gnu.cvs.bug'.  File: cvs.info, Node: What is CVS not?, Next: A sample session, Prev: What is CVS?, Up: Overview 1.2 What is CVS not? ==================== CVS can do a lot of things for you, but it does not try to be everything for everyone. CVS is not a build system. Though the structure of your repository and modules file interact with your build system (e.g. `Makefile's), they are essentially independent. CVS does not dictate how you build anything. It merely stores files for retrieval in a tree structure you devise. CVS does not dictate how to use disk space in the checked out working directories. If you write your `Makefile's or scripts in every directory so they have to know the relative positions of everything else, you wind up requiring the entire repository to be checked out. If you modularize your work, and construct a build system that will share files (via links, mounts, `VPATH' in `Makefile's, etc.), you can arrange your disk usage however you like. But you have to remember that _any_ such system is a lot of work to construct and maintain. CVS does not address the issues involved. Of course, you should place the tools created to support such a build system (scripts, `Makefile's, etc.) under CVS. Figuring out what files need to be rebuilt when something changes is, again, something to be handled outside the scope of CVS. One traditional approach is to use `make' for building, and use some automated tool for generating the dependencies which `make' uses. See *Note Builds::, for more information on doing builds in conjunction with CVS. CVS is not a substitute for management. Your managers and project leaders are expected to talk to you frequently enough to make certain you are aware of schedules, merge points, branch names and release dates. If they don't, CVS can't help. CVS is an instrument for making sources dance to your tune. But you are the piper and the composer. No instrument plays itself or writes its own music. CVS is not a substitute for developer communication. When faced with conflicts within a single file, most developers manage to resolve them without too much effort. But a more general definition of "conflict" includes problems too difficult to solve without communication between developers. CVS cannot determine when simultaneous changes within a single file, or across a whole collection of files, will logically conflict with one another. Its concept of a "conflict" is purely textual, arising when two changes to the same base file are near enough to spook the merge (i.e., `diff3') command. CVS does not claim to help at all in figuring out non-textual or distributed conflicts in program logic. For example: Say you change the arguments to function `X' defined in file `A'. At the same time, someone edits file `B', adding new calls to function `X' using the old arguments. You are outside the realm of CVS's competence. Acquire the habit of reading specs and talking to your peers. CVS does not have change control Change control refers to a number of things. First of all it can mean "bug-tracking", that is being able to keep a database of reported bugs and the status of each one (Is it fixed? In what release? Has the bug submitter agreed that it is fixed?). For interfacing CVS to an external bug-tracking system, see the `rcsinfo' and `verifymsg' files (*note Administrative files::). Another aspect of change control is keeping track of the fact that changes to several files were in fact changed together as one logical change. If you check in several files in a single `cvs commit' operation, CVS then forgets that those files were checked in together, and the fact that they have the same log message is the only thing tying them together. Keeping a GNU style `ChangeLog' can help somewhat. Another aspect of change control, in some systems, is the ability to keep track of the status of each change. Some changes have been written by a developer, others have been reviewed by a second developer, and so on. Generally, the way to do this with CVS is to generate a diff (using `cvs diff' or `diff') and email it to someone who can then apply it using the `patch' utility. This is very flexible, but depends on mechanisms outside CVS to make sure nothing falls through the cracks. CVS is not an automated testing program It should be possible to enforce mandatory use of a test suite using the `commitinfo' file. I haven't heard a lot about projects trying to do that or whether there are subtle gotchas, however. CVS does not have a built-in process model Some systems provide ways to ensure that changes or releases go through various steps, with various approvals as needed. Generally, one can accomplish this with CVS but it might be a little more work. In some cases you'll want to use the `commitinfo', `loginfo', `rcsinfo', or `verifymsg' files, to require that certain steps be performed before cvs will allow a checkin. Also consider whether features such as branches and tags can be used to perform tasks such as doing work in a development tree and then merging certain changes over to a stable tree only once they have been proven.  File: cvs.info, Node: A sample session, Prev: What is CVS not?, Up: Overview 1.3 A sample session ==================== As a way of introducing CVS, we'll go through a typical work-session using CVS. The first thing to understand is that CVS stores all files in a centralized "repository" (*note Repository::); this section assumes that a repository is set up. Suppose you are working on a simple compiler. The source consists of a handful of C files and a `Makefile'. The compiler is called `tc' (Trivial Compiler), and the repository is set up so that there is a module called `tc'. * Menu: * Getting the source:: Creating a workspace * Committing your changes:: Making your work available to others * Cleaning up:: Cleaning up * Viewing differences:: Viewing differences  File: cvs.info, Node: Getting the source, Next: Committing your changes, Up: A sample session 1.3.1 Getting the source ------------------------ The first thing you must do is to get your own working copy of the source for `tc'. For this, you use the `checkout' command: $ cvs checkout tc This will create a new directory called `tc' and populate it with the source files. $ cd tc $ ls CVS Makefile backend.c driver.c frontend.c parser.c The `CVS' directory is used internally by CVS. Normally, you should not modify or remove any of the files in it. You start your favorite editor, hack away at `backend.c', and a couple of hours later you have added an optimization pass to the compiler. A note to RCS and SCCS users: There is no need to lock the files that you want to edit. *Note Multiple developers::, for an explanation.  File: cvs.info, Node: Committing your changes, Next: Cleaning up, Prev: Getting the source, Up: A sample session 1.3.2 Committing your changes ----------------------------- When you have checked that the compiler is still compilable you decide to make a new version of `backend.c'. This will store your new `backend.c' in the repository and make it available to anyone else who is using that same repository. $ cvs commit backend.c CVS starts an editor, to allow you to enter a log message. You type in "Added an optimization pass.", save the temporary file, and exit the editor. The environment variable `$CVSEDITOR' determines which editor is started. If `$CVSEDITOR' is not set, then if the environment variable `$EDITOR' is set, it will be used. If both `$CVSEDITOR' and `$EDITOR' are not set then there is a default which will vary with your operating system, for example `vi' for unix or `notepad' for Windows NT/95. In addition, CVS checks the `$VISUAL' environment variable. Opinions vary on whether this behavior is desirable and whether future releases of CVS should check `$VISUAL' or ignore it. You will be OK either way if you make sure that `$VISUAL' is either unset or set to the same thing as `$EDITOR'. When CVS starts the editor, it includes a list of files which are modified. For the CVS client, this list is based on comparing the modification time of the file against the modification time that the file had when it was last gotten or updated. Therefore, if a file's modification time has changed but its contents have not, it will show up as modified. The simplest way to handle this is simply not to worry about it--if you proceed with the commit CVS will detect that the contents are not modified and treat it as an unmodified file. The next `update' will clue CVS in to the fact that the file is unmodified, and it will reset its stored timestamp so that the file will not show up in future editor sessions. If you want to avoid starting an editor you can specify the log message on the command line using the `-m' flag instead, like this: $ cvs commit -m "Added an optimization pass" backend.c  File: cvs.info, Node: Cleaning up, Next: Viewing differences, Prev: Committing your changes, Up: A sample session 1.3.3 Cleaning up ----------------- Before you turn to other tasks you decide to remove your working copy of tc. One acceptable way to do that is of course $ cd .. $ rm -r tc but a better way is to use the `release' command (*note release::): $ cd .. $ cvs release -d tc M driver.c ? tc You have [1] altered files in this repository. Are you sure you want to release (and delete) directory `tc': n ** `release' aborted by user choice. The `release' command checks that all your modifications have been committed. If history logging is enabled it also makes a note in the history file. *Note history file::. When you use the `-d' flag with `release', it also removes your working copy. In the example above, the `release' command wrote a couple of lines of output. `? tc' means that the file `tc' is unknown to CVS. That is nothing to worry about: `tc' is the executable compiler, and it should not be stored in the repository. *Note cvsignore::, for information about how to make that warning go away. *Note release output::, for a complete explanation of all possible output from `release'. `M driver.c' is more serious. It means that the file `driver.c' has been modified since it was checked out. The `release' command always finishes by telling you how many modified files you have in your working copy of the sources, and then asks you for confirmation before deleting any files or making any note in the history file. You decide to play it safe and answer `n ' when `release' asks for confirmation.  File: cvs.info, Node: Viewing differences, Prev: Cleaning up, Up: A sample session 1.3.4 Viewing differences ------------------------- You do not remember modifying `driver.c', so you want to see what has happened to that file. $ cd tc $ cvs diff driver.c This command runs `diff' to compare the version of `driver.c' that you checked out with your working copy. When you see the output you remember that you added a command line option that enabled the optimization pass. You check it in, and release the module. $ cvs commit -m "Added an optimization pass" driver.c Checking in driver.c; /usr/local/cvsroot/tc/driver.c,v <-- driver.c new revision: 1.2; previous revision: 1.1 done $ cd .. $ cvs release -d tc ? tc You have [0] altered files in this repository. Are you sure you want to release (and delete) directory `tc': y  File: cvs.info, Node: Repository, Next: Starting a new project, Prev: Overview, Up: Top 2 The Repository **************** The CVS "repository" stores a complete copy of all the files and directories which are under version control. Normally, you never access any of the files in the repository directly. Instead, you use CVS commands to get your own copy of the files into a "working directory", and then work on that copy. When you've finished a set of changes, you check (or "commit") them back into the repository. The repository then contains the changes which you have made, as well as recording exactly what you changed, when you changed it, and other such information. Note that the repository is not a subdirectory of the working directory, or vice versa; they should be in separate locations. CVS can access a repository by a variety of means. It might be on the local computer, or it might be on a computer across the room or across the world. To distinguish various ways to access a repository, the repository name can start with an "access method". For example, the access method `:local:' means to access a repository directory, so the repository `:local:/usr/local/cvsroot' means that the repository is in `/usr/local/cvsroot' on the computer running CVS. For information on other access methods, see *Note Remote repositories::. If the access method is omitted, then if the repository starts with `/', then `:local:' is assumed. If it does not start with `/' then either `:ext:' or `:server:' is assumed. For example, if you have a local repository in `/usr/local/cvsroot', you can use `/usr/local/cvsroot' instead of `:local:/usr/local/cvsroot'. But if (under Windows NT, for example) your local repository is `c:\src\cvsroot', then you must specify the access method, as in `:local:c:/src/cvsroot'. The repository is split in two parts. `$CVSROOT/CVSROOT' contains administrative files for CVS. The other directories contain the actual user-defined modules. * Menu: * Specifying a repository:: Telling CVS where your repository is * Repository storage:: The structure of the repository * Working directory storage:: The structure of working directories * Intro administrative files:: Defining modules * Multiple repositories:: Multiple repositories * Creating a repository:: Creating a repository * Backing up:: Backing up a repository * Moving a repository:: Moving a repository * Remote repositories:: Accessing repositories on remote machines * Read-only access:: Granting read-only access to the repository * Server temporary directory:: The server creates temporary directories  File: cvs.info, Node: Specifying a repository, Next: Repository storage, Up: Repository 2.1 Telling CVS where your repository is ======================================== There are several ways to tell CVS where to find the repository. You can name the repository on the command line explicitly, with the `-d' (for "directory") option: cvs -d /usr/local/cvsroot checkout yoyodyne/tc Or you can set the `$CVSROOT' environment variable to an absolute path to the root of the repository, `/usr/local/cvsroot' in this example. To set `$CVSROOT', `csh' and `tcsh' users should have this line in their `.cshrc' or `.tcshrc' files: setenv CVSROOT /usr/local/cvsroot `sh' and `bash' users should instead have these lines in their `.profile' or `.bashrc': CVSROOT=/usr/local/cvsroot export CVSROOT A repository specified with `-d' will override the `$CVSROOT' environment variable. Once you've checked a working copy out from the repository, it will remember where its repository is (the information is recorded in the `CVS/Root' file in the working copy). The `-d' option and the `CVS/Root' file both override the `$CVSROOT' environment variable. If `-d' option differs from `CVS/Root', the former is used. Of course, for proper operation they should be two ways of referring to the same repository.  File: cvs.info, Node: Repository storage, Next: Working directory storage, Prev: Specifying a repository, Up: Repository 2.2 How data is stored in the repository ======================================== For most purposes it isn't important _how_ CVS stores information in the repository. In fact, the format has changed in the past, and is likely to change in the future. Since in almost all cases one accesses the repository via CVS commands, such changes need not be disruptive. However, in some cases it may be necessary to understand how CVS stores data in the repository, for example you might need to track down CVS locks (*note Concurrency::) or you might need to deal with the file permissions appropriate for the repository. * Menu: * Repository files:: What files are stored in the repository * File permissions:: File permissions * Windows permissions:: Issues specific to Windows * Attic:: Some files are stored in the Attic * CVS in repository:: Additional information in CVS directory * Locks:: CVS locks control concurrent accesses * CVSROOT storage:: A few things about CVSROOT are different  File: cvs.info, Node: Repository files, Next: File permissions, Up: Repository storage 2.2.1 Where files are stored within the repository -------------------------------------------------- The overall structure of the repository is a directory tree corresponding to the directories in the working directory. For example, supposing the repository is in /usr/local/cvsroot here is a possible directory tree (showing only the directories): /usr | +--local | | | +--cvsroot | | | | | +--CVSROOT | (administrative files) | +--gnu | | | +--diff | | (source code to GNU diff) | | | +--rcs | | (source code to RCS) | | | +--cvs | (source code to CVS) | +--yoyodyne | +--tc | | | +--man | | | +--testing | +--(other Yoyodyne software) With the directories are "history files" for each file under version control. The name of the history file is the name of the corresponding file with `,v' appended to the end. Here is what the repository for the `yoyodyne/tc' directory might look like: `$CVSROOT' | +--yoyodyne | | | +--tc | | | +--Makefile,v +--backend.c,v +--driver.c,v +--frontend.c,v +--parser.c,v +--man | | | +--tc.1,v | +--testing | +--testpgm.t,v +--test2.t,v The history files contain, among other things, enough information to recreate any revision of the file, a log of all commit messages and the user-name of the person who committed the revision. The history files are known as "RCS files", because the first program to store files in that format was a version control system known as RCS. For a full description of the file format, see the `man' page `rcsfile(5)', distributed with RCS, or the file `doc/RCSFILES' in the CVS source distribution. This file format has become very common--many systems other than CVS or RCS can at least import history files in this format. The RCS files used in CVS differ in a few ways from the standard format. The biggest difference is magic branches; for more information see *Note Magic branch numbers::. Also in CVS the valid tag names are a subset of what RCS accepts; for CVS's rules see *Note Tags::.  File: cvs.info, Node: File permissions, Next: Windows permissions, Prev: Repository files, Up: Repository storage 2.2.2 File permissions ---------------------- All `,v' files are created read-only, and you should not change the permission of those files. The directories inside the repository should be writable by the persons that have permission to modify the files in each directory. This normally means that you must create a UNIX group (see group(5)) consisting of the persons that are to edit the files in a project, and set up the repository so that it is that group that owns the directory. (On some systems, you also need to set the set-group-ID-on-execution bit on the repository directories (see chmod(1)) so that newly-created files and directories get the group-ID of the parent directory rather than that of the current process.) This means that you can only control access to files on a per-directory basis. Note that users must also have write access to check out files, because CVS needs to create lock files (*note Concurrency::). You can use LockDir in CVSROOT/config to put the lock files somewhere other than in the repository if you want to allow read-only access to some directories (*note config::). Also note that users must have write access to the `CVSROOT/val-tags' file. CVS uses it to keep track of what tags are valid tag names (it is sometimes updated when tags are used, as well as when they are created). Each RCS file will be owned by the user who last checked it in. This has little significance; what really matters is who owns the directories. CVS tries to set up reasonable file permissions for new directories that are added inside the tree, but you must fix the permissions manually when a new directory should have different permissions than its parent directory. If you set the `CVSUMASK' environment variable, that will control the file permissions which CVS uses in creating directories and/or files in the repository. `CVSUMASK' does not affect the file permissions in the working directory; such files have the permissions which are typical for newly created files, except that sometimes CVS creates them read-only (see the sections on watches, *Note Setting a watch::; -r, *Note Global options::; or `CVSREAD', *Note Environment variables::). Note that using the client/server CVS (*note Remote repositories::), there is no good way to set `CVSUMASK'; the setting on the client machine has no effect. If you are connecting with `rsh', you can set `CVSUMASK' in `.bashrc' or `.cshrc', as described in the documentation for your operating system. This behavior might change in future versions of CVS; do not rely on the setting of `CVSUMASK' on the client having no effect. Using pserver, you will generally need stricter permissions on the CVSROOT directory and directories above it in the tree; see *Note Password authentication security::. Some operating systems have features which allow a particular program to run with the ability to perform operations which the caller of the program could not. For example, the set user ID (setuid) or set group ID (setgid) features of unix or the installed image feature of VMS. CVS was not written to use such features and therefore attempting to install CVS in this fashion will provide protection against only accidental lapses; anyone who is trying to circumvent the measure will be able to do so, and depending on how you have set it up may gain access to more than just CVS. You may wish to instead consider pserver. It shares some of the same attributes, in terms of possibly providing a false sense of security or opening security holes wider than the ones you are trying to fix, so read the documentation on pserver security carefully if you are considering this option (*Note Password authentication security::).  File: cvs.info, Node: Windows permissions, Next: Attic, Prev: File permissions, Up: Repository storage 2.2.3 File Permission issues specific to Windows ------------------------------------------------ Some file permission issues are specific to Windows operating systems (Windows 95, Windows NT, and presumably future operating systems in this family. Some of the following might apply to OS/2 but I'm not sure). If you are using local CVS and the repository is on a networked file system which is served by the Samba SMB server, some people have reported problems with permissions. Enabling WRITE=YES in the samba configuration is said to fix/workaround it. Disclaimer: I haven't investigated enough to know the implications of enabling that option, nor do I know whether there is something which CVS could be doing differently in order to avoid the problem. If you find something out, please let us know as described in *Note BUGS::.  File: cvs.info, Node: Attic, Next: CVS in repository, Prev: Windows permissions, Up: Repository storage 2.2.4 The attic --------------- You will notice that sometimes CVS stores an RCS file in the `Attic'. For example, if the CVSROOT is `/usr/local/cvsroot' and we are talking about the file `backend.c' in the directory `yoyodyne/tc', then the file normally would be in /usr/local/cvsroot/yoyodyne/tc/backend.c,v but if it goes in the attic, it would be in /usr/local/cvsroot/yoyodyne/tc/Attic/backend.c,v instead. It should not matter from a user point of view whether a file is in the attic; CVS keeps track of this and looks in the attic when it needs to. But in case you want to know, the rule is that the RCS file is stored in the attic if and only if the head revision on the trunk has state `dead'. A `dead' state means that file has been removed, or never added, for that revision. For example, if you add a file on a branch, it will have a trunk revision in `dead' state, and a branch revision in a non-`dead' state.  File: cvs.info, Node: CVS in repository, Next: Locks, Prev: Attic, Up: Repository storage 2.2.5 The CVS directory in the repository ----------------------------------------- The `CVS' directory in each repository directory contains information such as file attributes (in a file called `CVS/fileattr'. In the future additional files may be added to this directory, so implementations should silently ignore additional files. This behavior is implemented only by CVS 1.7 and later; for details see *Note Watches Compatibility::. The format of the `fileattr' file is a series of entries of the following form (where `{' and `}' means the text between the braces can be repeated zero or more times): ENT-TYPE FILENAME ATTRNAME = ATTRVAL {; ATTRNAME = ATTRVAL} ENT-TYPE is `F' for a file, in which case the entry specifies the attributes for that file. ENT-TYPE is `D', and FILENAME empty, to specify default attributes to be used for newly added files. Other ENT-TYPE are reserved for future expansion. CVS 1.9 and older will delete them any time it writes file attributes. CVS 1.10 and later will preserve them. Note that the order of the lines is not significant; a program writing the fileattr file may rearrange them at its convenience. There is currently no way of quoting tabs or line feeds in the filename, `=' in ATTRNAME, `;' in ATTRVAL, etc. Note: some implementations also don't handle a NUL character in any of the fields, but implementations are encouraged to allow it. By convention, ATTRNAME starting with `_' is for an attribute given special meaning by CVS; other ATTRNAMEs are for user-defined attributes (or will be, once implementations start supporting user-defined attributes). Built-in attributes: `_watched' Present means the file is watched and should be checked out read-only. `_watchers' Users with watches for this file. Value is WATCHER > TYPE { , WATCHER > TYPE } where WATCHER is a username, and TYPE is zero or more of edit,unedit,commit separated by `+' (that is, nothing if none; there is no "none" or "all" keyword). `_editors' Users editing this file. Value is EDITOR > VAL { , EDITOR > VAL } where EDITOR is a username, and VAL is TIME+HOSTNAME+PATHNAME, where TIME is when the `cvs edit' command (or equivalent) happened, and HOSTNAME and PATHNAME are for the working directory. Example: Ffile1 _watched=;_watchers=joe>edit,mary>commit Ffile2 _watched=;_editors=sue>8 Jan 1975+workstn1+/home/sue/cvs D _watched= means that the file `file1' should be checked out read-only. Furthermore, joe is watching for edits and mary is watching for commits. The file `file2' should be checked out read-only; sue started editing it on 8 Jan 1975 in the directory `/home/sue/cvs' on the machine `workstn1'. Future files which are added should be checked out read-only. To represent this example here, we have shown a space after `D', `Ffile1', and `Ffile2', but in fact there must be a single tab character there and no spaces.  File: cvs.info, Node: Locks, Next: CVSROOT storage, Prev: CVS in repository, Up: Repository storage 2.2.6 CVS locks in the repository --------------------------------- For an introduction to CVS locks focusing on user-visible behavior, see *Note Concurrency::. The following section is aimed at people who are writing tools which want to access a CVS repository without interfering with other tools accessing the same repository. If you find yourself confused by concepts described here, like "read lock", "write lock", and "deadlock", you might consult the literature on operating systems or databases. Any file in the repository with a name starting with `#cvs.rfl.' is a read lock. Any file in the repository with a name starting with `#cvs.wfl' is a write lock. Old versions of CVS (before CVS 1.5) also created files with names starting with `#cvs.tfl', but they are not discussed here. The directory `#cvs.lock' serves as a master lock. That is, one must obtain this lock first before creating any of the other locks. To obtain a read lock, first create the `#cvs.lock' directory. This operation must be atomic (which should be true for creating a directory under most operating systems). If it fails because the directory already existed, wait for a while and try again. After obtaining the `#cvs.lock' lock, create a file whose name is `#cvs.rfl.' followed by information of your choice (for example, hostname and process identification number). Then remove the `#cvs.lock' directory to release the master lock. Then proceed with reading the repository. When you are done, remove the `#cvs.rfl' file to release the read lock. To obtain a write lock, first create the `#cvs.lock' directory, as with read locks. Then check that there are no files whose names start with `#cvs.rfl.'. If there are, remove `#cvs.lock', wait for a while, and try again. If there are no readers, then create a file whose name is `#cvs.wfl' followed by information of your choice (for example, hostname and process identification number). Hang on to the `#cvs.lock' lock. Proceed with writing the repository. When you are done, first remove the `#cvs.wfl' file and then the `#cvs.lock' directory. Note that unlike the `#cvs.rfl' file, the `#cvs.wfl' file is just informational; it has no effect on the locking operation beyond what is provided by holding on to the `#cvs.lock' lock itself. Note that each lock (write lock or read lock) only locks a single directory in the repository, including `Attic' and `CVS' but not including subdirectories which represent other directories under version control. To lock an entire tree, you need to lock each directory (note that if you fail to obtain any lock you need, you must release the whole tree before waiting and trying again, to avoid deadlocks). Note also that CVS expects write locks to control access to individual `foo,v' files. RCS has a scheme where the `,foo,' file serves as a lock, but CVS does not implement it and so taking out a CVS write lock is recommended. See the comments at rcs_internal_lockfile in the CVS source code for further discussion/rationale.  File: cvs.info, Node: CVSROOT storage, Prev: Locks, Up: Repository storage 2.2.7 How files are stored in the CVSROOT directory --------------------------------------------------- The `$CVSROOT/CVSROOT' directory contains the various administrative files. In some ways this directory is just like any other directory in the repository; it contains RCS files whose names end in `,v', and many of the CVS commands operate on it the same way. However, there are a few differences. For each administrative file, in addition to the RCS file, there is also a checked out copy of the file. For example, there is an RCS file `loginfo,v' and a file `loginfo' which contains the latest revision contained in `loginfo,v'. When you check in an administrative file, CVS should print cvs commit: Rebuilding administrative file database and update the checked out copy in `$CVSROOT/CVSROOT'. If it does not, there is something wrong (*note BUGS::). To add your own files to the files to be updated in this fashion, you can add them to the `checkoutlist' administrative file (*note checkoutlist::). By default, the `modules' file behaves as described above. If the modules file is very large, storing it as a flat text file may make looking up modules slow (I'm not sure whether this is as much of a concern now as when CVS first evolved this feature; I haven't seen benchmarks). Therefore, by making appropriate edits to the CVS source code one can store the modules file in a database which implements the `ndbm' interface, such as Berkeley db or GDBM. If this option is in use, then the modules database will be stored in the files `modules.db', `modules.pag', and/or `modules.dir'. For information on the meaning of the various administrative files, see *Note Administrative files::.  File: cvs.info, Node: Working directory storage, Next: Intro administrative files, Prev: Repository storage, Up: Repository 2.3 How data is stored in the working directory =============================================== While we are discussing CVS internals which may become visible from time to time, we might as well talk about what CVS puts in the `CVS' directories in the working directories. As with the repository, CVS handles this information and one can usually access it via CVS commands. But in some cases it may be useful to look at it, and other programs, such as the `jCVS' graphical user interface or the `VC' package for emacs, may need to look at it. Such programs should follow the recommendations in this section if they hope to be able to work with other programs which use those files, including future versions of the programs just mentioned and the command-line CVS client. The `CVS' directory contains several files. Programs which are reading this directory should silently ignore files which are in the directory but which are not documented here, to allow for future expansion. The files are stored according to the text file convention for the system in question. This means that working directories are not portable between systems with differing conventions for storing text files. This is intentional, on the theory that the files being managed by CVS probably will not be portable between such systems either. `Root' This file contains the current CVS root, as described in *Note Specifying a repository::. `Repository' This file contains the directory within the repository which the current directory corresponds with. It can be either an absolute pathname or a relative pathname; CVS has had the ability to read either format since at least version 1.3 or so. The relative pathname is relative to the root, and is the more sensible approach, but the absolute pathname is quite common and implementations should accept either. For example, after the command cvs -d :local:/usr/local/cvsroot checkout yoyodyne/tc `Root' will contain :local:/usr/local/cvsroot and `Repository' will contain either /usr/local/cvsroot/yoyodyne/tc or yoyodyne/tc If the particular working directory does not correspond to a directory in the repository, then `Repository' should contain `CVSROOT/Emptydir'. `Entries' This file lists the files and directories in the working directory. The first character of each line indicates what sort of line it is. If the character is unrecognized, programs reading the file should silently skip that line, to allow for future expansion. If the first character is `/', then the format is: /NAME/REVISION/TIMESTAMP[+CONFLICT]/OPTIONS/TAGDATE where `[' and `]' are not part of the entry, but instead indicate that the `+' and conflict marker are optional. NAME is the name of the file within the directory. REVISION is the revision that the file in the working derives from, or `0' for an added file, or `-' followed by a revision for a removed file. TIMESTAMP is the timestamp of the file at the time that CVS created it; if the timestamp differs with the actual modification time of the file it means the file has been modified. It is stored in the format used by the ISO C asctime() function (for example, `Sun Apr 7 01:29:26 1996'). One may write a string which is not in that format, for example, `Result of merge', to indicate that the file should always be considered to be modified. This is not a special case; to see whether a file is modified a program should take the timestamp of the file and simply do a string compare with TIMESTAMP. If there was a conflict, CONFLICT can be set to the modification time of the file after the file has been written with conflict markers (*note Conflicts example::). Thus if CONFLICT is subsequently the same as the actual modification time of the file it means that the user has obviously not resolved the conflict. OPTIONS contains sticky options (for example `-kb' for a binary file). TAGDATE contains `T' followed by a tag name, or `D' for a date, followed by a sticky tag or date. Note that if TIMESTAMP contains a pair of timestamps separated by a space, rather than a single timestamp, you are dealing with a version of CVS earlier than CVS 1.5 (not documented here). The timezone on the timestamp in CVS/Entries (local or universal) should be the same as the operating system stores for the timestamp of the file itself. For example, on Unix the file's timestamp is in universal time (UT), so the timestamp in CVS/Entries should be too. On VMS, the file's timestamp is in local time, so CVS on VMS should use local time. This rule is so that files do not appear to be modified merely because the timezone changed (for example, to or from summer time). If the first character of a line in `Entries' is `D', then it indicates a subdirectory. `D' on a line all by itself indicates that the program which wrote the `Entries' file does record subdirectories (therefore, if there is such a line and no other lines beginning with `D', one knows there are no subdirectories). Otherwise, the line looks like: D/NAME/FILLER1/FILLER2/FILLER3/FILLER4 where NAME is the name of the subdirectory, and all the FILLER fields should be silently ignored, for future expansion. Programs which modify `Entries' files should preserve these fields. The lines in the `Entries' file can be in any order. `Entries.Log' This file does not record any information beyond that in `Entries', but it does provide a way to update the information without having to rewrite the entire `Entries' file, including the ability to preserve the information even if the program writing `Entries' and `Entries.Log' abruptly aborts. Programs which are reading the `Entries' file should also check for `Entries.Log'. If the latter exists, they should read `Entries' and then apply the changes mentioned in `Entries.Log'. After applying the changes, the recommended practice is to rewrite `Entries' and then delete `Entries.Log'. The format of a line in `Entries.Log' is a single character command followed by a space followed by a line in the format specified for a line in `Entries'. The single character command is `A' to indicate that the entry is being added, `R' to indicate that the entry is being removed, or any other character to indicate that the entire line in `Entries.Log' should be silently ignored (for future expansion). If the second character of the line in `Entries.Log' is not a space, then it was written by an older version of CVS (not documented here). Programs which are writing rather than reading can safely ignore `Entries.Log' if they so choose. `Entries.Backup' This is a temporary file. Recommended usage is to write a new entries file to `Entries.Backup', and then to rename it (atomically, where possible) to `Entries'. `Entries.Static' The only relevant thing about this file is whether it exists or not. If it exists, then it means that only part of a directory was gotten and CVS will not create additional files in that directory. To clear it, use the `update' command with the `-d' option, which will get the additional files and remove `Entries.Static'. `Tag' This file contains per-directory sticky tags or dates. The first character is `T' for a branch tag, `N' for a non-branch tag, or `D' for a date, or another character to mean the file should be silently ignored, for future expansion. This character is followed by the tag or date. Note that per-directory sticky tags or dates are used for things like applying to files which are newly added; they might not be the same as the sticky tags or dates on individual files. For general information on sticky tags and dates, see *Note Sticky tags::. `Notify' This file stores notifications (for example, for `edit' or `unedit') which have not yet been sent to the server. Its format is not yet documented here. `Notify.tmp' This file is to `Notify' as `Entries.Backup' is to `Entries'. That is, to write `Notify', first write the new contents to `Notify.tmp' and then (atomically where possible), rename it to `Notify'. `Base' If watches are in use, then an `edit' command stores the original copy of the file in the `Base' directory. This allows the `unedit' command to operate even if it is unable to communicate with the server. `Baserev' The file lists the revision for each of the files in the `Base' directory. The format is: BNAME/REV/EXPANSION where EXPANSION should be ignored, to allow for future expansion. `Baserev.tmp' This file is to `Baserev' as `Entries.Backup' is to `Entries'. That is, to write `Baserev', first write the new contents to `Baserev.tmp' and then (atomically where possible), rename it to `Baserev'. `Template' This file contains the template specified by the `rcsinfo' file (*note rcsinfo::). It is only used by the client; the non-client/server CVS consults `rcsinfo' directly.  File: cvs.info, Node: Intro administrative files, Next: Multiple repositories, Prev: Working directory storage, Up: Repository 2.4 The administrative files ============================ The directory `$CVSROOT/CVSROOT' contains some "administrative files". *Note Administrative files::, for a complete description. You can use CVS without any of these files, but some commands work better when at least the `modules' file is properly set up. The most important of these files is the `modules' file. It defines all modules in the repository. This is a sample `modules' file. CVSROOT CVSROOT modules CVSROOT modules cvs gnu/cvs rcs gnu/rcs diff gnu/diff tc yoyodyne/tc The `modules' file is line oriented. In its simplest form each line contains the name of the module, whitespace, and the directory where the module resides. The directory is a path relative to `$CVSROOT'. The last four lines in the example above are examples of such lines. The line that defines the module called `modules' uses features that are not explained here. *Note modules::, for a full explanation of all the available features. 2.4.1 Editing administrative files ---------------------------------- You edit the administrative files in the same way that you would edit any other module. Use `cvs checkout CVSROOT' to get a working copy, edit it, and commit your changes in the normal way. It is possible to commit an erroneous administrative file. You can often fix the error and check in a new revision, but sometimes a particularly bad error in the administrative file makes it impossible to commit new revisions. If and when this happens, you can correct the problem by temporarily copying a corrected administrative file directly into the `$CVSROOT/CVSROOT' repository directory, then committing the same correction via a checkout of the `CVSROOT' module. It is important that the correction also be made via the checked out copy, or the next checkout and commit to the CVSROOT module will overwrite the correction that was copied directly into the repository, possibly breaking things in such a way as to prevent commits again.  File: cvs.info, Node: Multiple repositories, Next: Creating a repository, Prev: Intro administrative files, Up: Repository 2.5 Multiple repositories ========================= In some situations it is a good idea to have more than one repository, for instance if you have two development groups that work on separate projects without sharing any code. All you have to do to have several repositories is to specify the appropriate repository, using the `CVSROOT' environment variable, the `-d' option to CVS, or (once you have checked out a working directory) by simply allowing CVS to use the repository that was used to check out the working directory (*note Specifying a repository::). The big advantage of having multiple repositories is that they can reside on different servers. With CVS version 1.10, a single command cannot recurse into directories from different repositories. With development versions of CVS, you can check out code from multiple servers into your working directory. CVS will recurse and handle all the details of making connections to as many server machines as necessary to perform the requested command. Here is an example of how to set up a working directory: cvs -d server1:/cvs co dir1 cd dir1 cvs -d server2:/root co sdir cvs update The `cvs co' commands set up the working directory, and then the `cvs update' command will contact server2, to update the dir1/sdir subdirectory, and server1, to update everything else.  File: cvs.info, Node: Creating a repository, Next: Backing up, Prev: Multiple repositories, Up: Repository 2.6 Creating a repository ========================= This section describes how to set up a CVS repository for any sort of access method. After completing the setup described in this section, you should be able to access your CVS repository immediately via the local access method and several remote access methods. For more information on setting up remote access to the repository you create in this section, please read the section on *Note Remote repositories::. To set up a CVS repository, first choose the machine and disk on which you want to store the revision history of the source files. CPU and memory requirements are modest, so most machines should be adequate. For details see *Note Server requirements::. To estimate disk space requirements, if you are importing RCS files from another system, the size of those files is the approximate initial size of your repository, or if you are starting without any version history, a rule of thumb is to allow for the server approximately three times the size of the code to be under CVS for the repository (you will eventually outgrow this, but not for a while). On the machines on which the developers will be working, you'll want disk space for approximately one working directory for each developer (either the entire tree or a portion of it, depending on what each developer uses). The repository should be accessible (directly or via a networked file system) from all machines which want to use CVS in server or local mode; the client machines need not have any access to it other than via the CVS protocol. It is not possible to use CVS to read from a repository which one only has read access to; CVS needs to be able to create lock files (*note Concurrency::). To create a repository, run the `cvs init' command. It will set up an empty repository in the CVS root specified in the usual way (*note Repository::). For example, cvs -d /usr/local/cvsroot init `cvs init' is careful to never overwrite any existing files in the repository, so no harm is done if you run `cvs init' on an already set-up repository. `cvs init' will enable history logging; if you don't want that, remove the history file after running `cvs init'. *Note history file::.  File: cvs.info, Node: Backing up, Next: Moving a repository, Prev: Creating a repository, Up: Repository 2.7 Backing up a repository =========================== There is nothing particularly magical about the files in the repository; for the most part it is possible to back them up just like any other files. However, there are a few issues to consider. The first is that to be paranoid, one should either not use CVS during the backup, or have the backup program lock CVS while doing the backup. To not use CVS, you might forbid logins to machines which can access the repository, turn off your CVS server, or similar mechanisms. The details would depend on your operating system and how you have CVS set up. To lock CVS, you would create `#cvs.rfl' locks in each repository directory. See *Note Concurrency::, for more on CVS locks. Having said all this, if you just back up without any of these precautions, the results are unlikely to be particularly dire. Restoring from backup, the repository might be in an inconsistent state, but this would not be particularly hard to fix manually. When you restore a repository from backup, assuming that changes in the repository were made after the time of the backup, working directories which were not affected by the failure may refer to revisions which no longer exist in the repository. Trying to run CVS in such directories will typically produce an error message. One way to get those changes back into the repository is as follows: * Get a new working directory. * Copy the files from the working directory from before the failure over to the new working directory (do not copy the contents of the `CVS' directories, of course). * Working in the new working directory, use commands such as `cvs update' and `cvs diff' to figure out what has changed, and then when you are ready, commit the changes into the repository.  File: cvs.info, Node: Moving a repository, Next: Remote repositories, Prev: Backing up, Up: Repository 2.8 Moving a repository ======================= Just as backing up the files in the repository is pretty much like backing up any other files, if you need to move a repository from one place to another it is also pretty much like just moving any other collection of files. The main thing to consider is that working directories point to the repository. The simplest way to deal with a moved repository is to just get a fresh working directory after the move. Of course, you'll want to make sure that the old working directory had been checked in before the move, or you figured out some other way to make sure that you don't lose any changes. If you really do want to reuse the existing working directory, it should be possible with manual surgery on the `CVS/Repository' files. You can see *Note Working directory storage::, for information on the `CVS/Repository' and `CVS/Root' files, but unless you are sure you want to bother, it probably isn't worth it.  File: cvs.info, Node: Remote repositories, Next: Read-only access, Prev: Moving a repository, Up: Repository 2.9 Remote repositories ======================= Your working copy of the sources can be on a different machine than the repository. Using CVS in this manner is known as "client/server" operation. You run CVS on a machine which can mount your working directory, known as the "client", and tell it to communicate to a machine which can mount the repository, known as the "server". Generally, using a remote repository is just like using a local one, except that the format of the repository name is: [:METHOD:][[USER][:PASSWORD]@]HOSTNAME[:[PORT]]/path/to/repository Specifying a password in the repository name is not recommended during checkout, since this will cause CVS to store a cleartext copy of the password in each created directory. `cvs login' first instead (*note Password authentication client::). The details of exactly what needs to be set up depend on how you are connecting to the server. If METHOD is not specified, and the repository name contains `:', then the default is `ext' or `server', depending on your platform; both are described in *Note Connecting via rsh::. * Menu: * Server requirements:: Memory and other resources for servers * Connecting via rsh:: Using the `rsh' program to connect * Password authenticated:: Direct connections using passwords * GSSAPI authenticated:: Direct connections using GSSAPI * Kerberos authenticated:: Direct connections with Kerberos * Connecting via fork:: Using a forked `cvs server' to connect  File: cvs.info, Node: Server requirements, Next: Connecting via rsh, Up: Remote repositories 2.9.1 Server requirements ------------------------- The quick answer to what sort of machine is suitable as a server is that requirements are modest--a server with 32M of memory or even less can handle a fairly large source tree with a fair amount of activity. The real answer, of course, is more complicated. Estimating the known areas of large memory consumption should be sufficient to estimate memory requirements. There are two such areas documented here; other memory consumption should be small by comparison (if you find that is not the case, let us know, as described in *Note BUGS::, so we can update this documentation). The first area of big memory consumption is large checkouts, when using the CVS server. The server consists of two processes for each client that it is serving. Memory consumption on the child process should remain fairly small. Memory consumption on the parent process, particularly if the network connection to the client is slow, can be expected to grow to slightly more than the size of the sources in a single directory, or two megabytes, whichever is larger. Multiplying the size of each CVS server by the number of servers which you expect to have active at one time should give an idea of memory requirements for the server. For the most part, the memory consumed by the parent process probably can be swap space rather than physical memory. The second area of large memory consumption is `diff', when checking in large files. This is required even for binary files. The rule of thumb is to allow about ten times the size of the largest file you will want to check in, although five times may be adequate. For example, if you want to check in a file which is 10 megabytes, you should have 100 megabytes of memory on the machine doing the checkin (the server machine for client/server, or the machine running CVS for non-client/server). This can be swap space rather than physical memory. Because the memory is only required briefly, there is no particular need to allow memory for more than one such checkin at a time. Resource consumption for the client is even more modest--any machine with enough capacity to run the operating system in question should have little trouble. For information on disk space requirements, see *Note Creating a repository::.  File: cvs.info, Node: Connecting via rsh, Next: Password authenticated, Prev: Server requirements, Up: Remote repositories 2.9.2 Connecting with rsh or ssh -------------------------------- CVS may use the `ssh' protocol to perform these operations, so the remote user host needs to have a either an agent like `ssh-agent' to hold credentials or a `.shosts' file which grants access to the local user. Note that the program that CVS uses for this purpose may be specified using the `--with-ssh' flag to configure. CVS uses the `rsh' protocol to perform these operations, so the remote user host needs to have a `.rhosts' file which grants access to the local user. Note that the program that CVS uses for this purpose may be specified using the `--with-rsh' flag to configure. For example, suppose you are the user `mozart' on the local machine `toe.example.com', and the server machine is `faun.example.org'. On faun, put the following line into the file `.rhosts' in `bach''s home directory: toe.example.com mozart Then test that `rsh' is working with rsh -l bach faun.example.org 'echo $PATH' To test that `ssh' is working use ssh -l bach faun.example.org 'echo $PATH' Next you have to make sure that `rsh' will be able to find the server. Make sure that the path which `rsh' printed in the above example includes the directory containing a program named `cvs' which is the server. You need to set the path in `.bashrc', `.cshrc', etc., not `.login' or `.profile'. Alternately, you can set the environment variable `CVS_SERVER' on the client machine to the filename of the server you want to use, for example `/usr/local/bin/cvs-1.6'. There is no need to edit `inetd.conf' or start a CVS server daemon. There are three access methods that you use in `CVSROOT' for rsh or ssh. `:server:' specifies an internal rsh client, which is supported only by some CVS ports. `:extssh:' specifies an external ssh program. By default this is `ssh' (unless otherwise specified by the `--with-ssh' flag to configure) but you may set the `CVS_SSH' environment variable to invoke another program or wrapper script. `:ext:' specifies an external rsh program. By default this is `rsh' (unless otherwise specified by the `--with-rsh' flag to configure) but you may set the `CVS_RSH' environment variable to invoke another program which can access the remote server (for example, `remsh' on HP-UX 9 because `rsh' is something different). It must be a program which can transmit data to and from the server without modifying it; for example the Windows NT `rsh' is not suitable since it by default translates between CRLF and LF. The OS/2 CVS port has a hack to pass `-b' to `rsh' to get around this, but since this could potentially cause problems for programs other than the standard `rsh', it may change in the future. If you set `CVS_RSH' to `SSH' or some other rsh replacement, the instructions in the rest of this section concerning `.rhosts' and so on are likely to be inapplicable; consult the documentation for your rsh replacement. Continuing our example, supposing you want to access the module `foo' in the repository `/usr/local/cvsroot/', on machine `faun.example.org', you are ready to go: cvs -d :ext:bach@faun.example.org:/usr/local/cvsroot checkout foo (The `bach@' can be omitted if the username is the same on both the local and remote hosts.)  File: cvs.info, Node: Password authenticated, Next: GSSAPI authenticated, Prev: Connecting via rsh, Up: Remote repositories 2.9.3 Direct connection with password authentication ---------------------------------------------------- The CVS client can also connect to the server using a password protocol. This is particularly useful if using `rsh' is not feasible (for example, the server is behind a firewall), and Kerberos also is not available. To use this method, it is necessary to make some adjustments on both the server and client sides. * Menu: * Password authentication server:: Setting up the server * Password authentication client:: Using the client * Password authentication security:: What this method does and does not do  File: cvs.info, Node: Password authentication server, Next: Password authentication client, Up: Password authenticated 2.9.3.1 Setting up the server for password authentication ......................................................... First of all, you probably want to tighten the permissions on the `$CVSROOT' and `$CVSROOT/CVSROOT' directories. See *Note Password authentication security::, for more details. On the server side, the file `/etc/inetd.conf' needs to be edited so `inetd' knows to run the command `cvs pserver' when it receives a connection on the right port. By default, the port number is 2401; it would be different if your client were compiled with `CVS_AUTH_PORT' defined to something else, though. This can also be specified in the CVSROOT variable (*note Remote repositories::) or overridden with the CVS_CLIENT_PORT environment variable (*note Environment variables::). If your `inetd' allows raw port numbers in `/etc/inetd.conf', then the following (all on a single line in `inetd.conf') should be sufficient: 2401 stream tcp nowait root /usr/local/bin/cvs cvs -f --allow-root=/usr/cvsroot pserver (You could also use the `-T' option to specify a temporary directory.) The `--allow-root' option specifies the allowable CVSROOT directory. Clients which attempt to use a different CVSROOT directory will not be allowed to connect. If there is more than one CVSROOT directory which you want to allow, repeat the option. Unfortunately, many versions of `inetd' have very small limits on the number of arguments and/or the total length of the command. The usual solution to this problem is to have `inetd' run a shell script which then invokes CVS with the necessary arguments: #! /bin/sh exec /usr/local/bin/cvs -f \ --allow-root=/repo1 \ --allow-root=/repo2 \ ... --allow-root=/repoN \ pserver If your `inetd' wants a symbolic service name instead of a raw port number, then put this in `/etc/services': cvspserver 2401/tcp and put `cvspserver' instead of `2401' in `inetd.conf'. If your system uses `xinetd' instead of `inetd', the procedure is slightly different. Create a file called `/etc/xinetd.d/cvspserver' containing the following: service cvspserver { port = 2401 socket_type = stream protocol = tcp wait = no user = root passenv = PATH server = /usr/local/bin/cvs server_args = -f --allow-root=/usr/cvsroot pserver } (If `cvspserver' is defined in `/etc/services', you can omit the `port' line.) Once the above is taken care of, restart your `inetd', or do whatever is necessary to force it to reread its initialization files. If you are having trouble setting this up, see *Note Connection::. Because the client stores and transmits passwords in cleartext (almost--see *Note Password authentication security::, for details), a separate CVS password file is generally used, so people don't compromise their regular passwords when they access the repository. This file is `$CVSROOT/CVSROOT/passwd' (*note Intro administrative files::). It uses a colon-separated format, similar to `/etc/passwd' on Unix systems, except that it has fewer fields: CVS username, optional password, and an optional system username for CVS to run as if authentication succeeds. Here is an example `passwd' file with five entries: anonymous: bach:ULtgRLXo7NRxs spwang:1sOp854gDF3DY melissa:tGX1fS8sun6rY:pubcvs qproj:XR4EZcEs0szik:pubcvs (The passwords are encrypted according to the standard Unix `crypt()' function, so it is possible to paste in passwords directly from regular Unix `/etc/passwd' files.) The first line in the example will grant access to any CVS client attempting to authenticate as user `anonymous', no matter what password they use, including an empty password. (This is typical for sites granting anonymous read-only access; for information on how to do the "read-only" part, see *Note Read-only access::.) The second and third lines will grant access to `bach' and `spwang' if they supply their respective plaintext passwords. The fourth line will grant access to `melissa', if she supplies the correct password, but her CVS operations will actually run on the server side under the system user `pubcvs'. Thus, there need not be any system user named `melissa', but there _must_ be one named `pubcvs'. The fifth line shows that system user identities can be shared: any client who successfully authenticates as `qproj' will actually run as `pubcvs', just as `melissa' does. That way you could create a single, shared system user for each project in your repository, and give each developer their own line in the `$CVSROOT/CVSROOT/passwd' file. The CVS username on each line would be different, but the system username would be the same. The reason to have different CVS usernames is that CVS will log their actions under those names: when `melissa' commits a change to a project, the checkin is recorded in the project's history under the name `melissa', not `pubcvs'. And the reason to have them share a system username is so that you can arrange permissions in the relevant area of the repository such that only that account has write-permission there. If the system-user field is present, all password-authenticated CVS commands run as that user; if no system user is specified, CVS simply takes the CVS username as the system username and runs commands as that user. In either case, if there is no such user on the system, then the CVS operation will fail (regardless of whether the client supplied a valid password). The password and system-user fields can both be omitted (and if the system-user field is omitted, then also omit the colon that would have separated it from the encrypted password). For example, this would be a valid `$CVSROOT/CVSROOT/passwd' file: anonymous::pubcvs fish:rKa5jzULzmhOo:kfogel sussman:1sOp854gDF3DY When the password field is omitted or empty, then the client's authentication attempt will succeed with any password, including the empty string. However, the colon after the CVS username is always necessary, even if the password is empty. CVS can also fall back to use system authentication. When authenticating a password, the server first checks for the user in the `$CVSROOT/CVSROOT/passwd' file. If it finds the user, it will use that entry for authentication as described above. But if it does not find the user, or if the CVS `passwd' file does not exist, then the server can try to authenticate the username and password using the operating system's user-lookup routines (this "fallback" behavior can be disabled by setting `SystemAuth=no' in the CVS `config' file, *note config::). Be aware, however, that falling back to system authentication might be a security risk: CVS operations would then be authenticated with that user's regular login password, and the password flies across the network in plaintext. See *Note Password authentication security:: for more on this. Right now, the only way to put a password in the CVS `passwd' file is to paste it there from somewhere else. Someday, there may be a `cvs passwd' command. Unlike many of the files in `$CVSROOT/CVSROOT', it is normal to edit the `passwd' file in-place, rather than via CVS. This is because of the possible security risks of having the `passwd' file checked out to people's working copies. If you do want to include the `passwd' file in checkouts of `$CVSROOT/CVSROOT', see *Note checkoutlist::.  File: cvs.info, Node: Password authentication client, Next: Password authentication security, Prev: Password authentication server, Up: Password authenticated 2.9.3.2 Using the client with password authentication ..................................................... To run a CVS command on a remote repository via the password-authenticating server, one specifies the `pserver' protocol, optional username, repository host, an optional port number, and path to the repository. For example: cvs -d :pserver:faun.example.org:/usr/local/cvsroot checkout someproj or CVSROOT=:pserver:bach@faun.example.org:2401/usr/local/cvsroot cvs checkout someproj However, unless you're connecting to a public-access repository (i.e., one where that username doesn't require a password), you'll need to supply a password or "log in" first. Logging in verifies your password with the repository and stores it in a file. It's done with the `login' command, which will prompt you interactively for the password if you didn't supply one as part of $CVSROOT: cvs -d :pserver:bach@faun.example.org:/usr/local/cvsroot login CVS password: or cvs -d :pserver:bach:p4ss30rd@faun.example.org:/usr/local/cvsroot login After you enter the password, CVS verifies it with the server. If the verification succeeds, then that combination of username, host, repository, and password is permanently recorded, so future transactions with that repository won't require you to run `cvs login'. (If verification fails, CVS will exit complaining that the password was incorrect, and nothing will be recorded.) The records are stored, by default, in the file `$HOME/.cvspass'. That file's format is human-readable, and to a degree human-editable, but note that the passwords are not stored in cleartext--they are trivially encoded to protect them from "innocent" compromise (i.e., inadvertent viewing by a system administrator or other non-malicious person). You can change the default location of this file by setting the `CVS_PASSFILE' environment variable. If you use this variable, make sure you set it _before_ `cvs login' is run. If you were to set it after running `cvs login', then later CVS commands would be unable to look up the password for transmission to the server. Once you have logged in, all CVS commands using that remote repository and username will authenticate with the stored password. So, for example cvs -d :pserver:bach@faun.example.org:/usr/local/cvsroot checkout foo should just work (unless the password changes on the server side, in which case you'll have to re-run `cvs login'). Note that if the `:pserver:' were not present in the repository specification, CVS would assume it should use `rsh' to connect with the server instead (*note Connecting via rsh::). Of course, once you have a working copy checked out and are running CVS commands from within it, there is no longer any need to specify the repository explicitly, because CVS can deduce the repository from the working copy's `CVS' subdirectory. The password for a given remote repository can be removed from the `CVS_PASSFILE' by using the `cvs logout' command.  File: cvs.info, Node: Password authentication security, Prev: Password authentication client, Up: Password authenticated 2.9.3.3 Security considerations with password authentication ............................................................ The passwords are stored on the client side in a trivial encoding of the cleartext, and transmitted in the same encoding. The encoding is done only to prevent inadvertent password compromises (i.e., a system administrator accidentally looking at the file), and will not prevent even a naive attacker from gaining the password. The separate CVS password file (*note Password authentication server::) allows people to use a different password for repository access than for login access. On the other hand, once a user has non-read-only access to the repository, she can execute programs on the server system through a variety of means. Thus, repository access implies fairly broad system access as well. It might be possible to modify CVS to prevent that, but no one has done so as of this writing. Note that because the `$CVSROOT/CVSROOT' directory contains `passwd' and other files which are used to check security, you must control the permissions on this directory as tightly as the permissions on `/etc'. The same applies to the `$CVSROOT' directory itself and any directory above it in the tree. Anyone who has write access to such a directory will have the ability to become any user on the system. Note that these permissions are typically tighter than you would use if you are not using pserver. In summary, anyone who gets the password gets repository access (which may imply some measure of general system access as well). The password is available to anyone who can sniff network packets or read a protected (i.e., user read-only) file. If you want real security, get Kerberos.  File: cvs.info, Node: GSSAPI authenticated, Next: Kerberos authenticated, Prev: Password authenticated, Up: Remote repositories 2.9.4 Direct connection with GSSAPI ----------------------------------- GSSAPI is a generic interface to network security systems such as Kerberos 5. If you have a working GSSAPI library, you can have CVS connect via a direct TCP connection, authenticating with GSSAPI. To do this, CVS needs to be compiled with GSSAPI support; when configuring CVS it tries to detect whether GSSAPI libraries using Kerberos version 5 are present. You can also use the `--with-gssapi' flag to configure. The connection is authenticated using GSSAPI, but the message stream is _not_ authenticated by default. You must use the `-a' global option to request stream authentication. The data transmitted is _not_ encrypted by default. Encryption support must be compiled into both the client and the server; use the `--enable-encrypt' configure option to turn it on. You must then use the `-x' global option to request encryption. GSSAPI connections are handled on the server side by the same server which handles the password authentication server; see *Note Password authentication server::. If you are using a GSSAPI mechanism such as Kerberos which provides for strong authentication, you will probably want to disable the ability to authenticate via cleartext passwords. To do so, create an empty `CVSROOT/passwd' password file, and set `SystemAuth=no' in the config file (*note config::). The GSSAPI server uses a principal name of cvs/HOSTNAME, where HOSTNAME is the canonical name of the server host. You will have to set this up as required by your GSSAPI mechanism. To connect using GSSAPI, use the `:gserver:' method. For example, cvs -d :gserver:faun.example.org:/usr/local/cvsroot checkout foo  File: cvs.info, Node: Kerberos authenticated, Next: Connecting via fork, Prev: GSSAPI authenticated, Up: Remote repositories 2.9.5 Direct connection with Kerberos ------------------------------------- The easiest way to use Kerberos is to use the Kerberos `rsh', as described in *Note Connecting via rsh::. The main disadvantage of using rsh is that all the data needs to pass through additional programs, so it may be slower. So if you have Kerberos installed you can connect via a direct TCP connection, authenticating with Kerberos. This section concerns the Kerberos network security system, version 4. Kerberos version 5 is supported via the GSSAPI generic network security interface, as described in the previous section. To do this, CVS needs to be compiled with Kerberos support; when configuring CVS it tries to detect whether Kerberos is present or you can use the `--with-krb4' flag to configure. The data transmitted is _not_ encrypted by default. Encryption support must be compiled into both the client and server; use the `--enable-encryption' configure option to turn it on. You must then use the `-x' global option to request encryption. You need to edit `inetd.conf' on the server machine to run `cvs kserver'. The client uses port 1999 by default; if you want to use another port specify it in the `CVSROOT' (*note Remote repositories::) or the `CVS_CLIENT_PORT' environment variable (*note Environment variables::) on the client. When you want to use CVS, get a ticket in the usual way (generally `kinit'); it must be a ticket which allows you to log into the server machine. Then you are ready to go: cvs -d :kserver:faun.example.org:/usr/local/cvsroot checkout foo Previous versions of CVS would fall back to a connection via rsh; this version will not do so.  File: cvs.info, Node: Connecting via fork, Prev: Kerberos authenticated, Up: Remote repositories 2.9.6 Connecting with fork -------------------------- This access method allows you to connect to a repository on your local disk via the remote protocol. In other words it does pretty much the same thing as `:local:', but various quirks, bugs and the like are those of the remote CVS rather than the local CVS. For day-to-day operations you might prefer either `:local:' or `:fork:', depending on your preferences. Of course `:fork:' comes in particularly handy in testing or debugging `cvs' and the remote protocol. Specifically, we avoid all of the network-related setup/configuration, timeouts, and authentication inherent in the other remote access methods but still create a connection which uses the remote protocol. To connect using the `fork' method, use `:fork:' and the pathname to your local repository. For example: cvs -d :fork:/usr/local/cvsroot checkout foo As with `:ext:', the server is called `cvs' by default, or the value of the `CVS_SERVER' environment variable.  File: cvs.info, Node: Read-only access, Next: Server temporary directory, Prev: Remote repositories, Up: Repository 2.10 Read-only repository access ================================ It is possible to grant read-only repository access to people using the password-authenticated server (*note Password authenticated::). (The other access methods do not have explicit support for read-only users because those methods all assume login access to the repository machine anyway, and therefore the user can do whatever local file permissions allow her to do.) A user who has read-only access can do only those CVS operations which do not modify the repository, except for certain "administrative" files (such as lock files and the history file). It may be desirable to use this feature in conjunction with user-aliasing (*note Password authentication server::). Unlike with previous versions of CVS, read-only users should be able merely to read the repository, and not to execute programs on the server or otherwise gain unexpected levels of access. Or to be more accurate, the _known_ holes have been plugged. Because this feature is new and has not received a comprehensive security audit, you should use whatever level of caution seems warranted given your attitude concerning security. There are two ways to specify read-only access for a user: by inclusion, and by exclusion. "Inclusion" means listing that user specifically in the `$CVSROOT/CVSROOT/readers' file, which is simply a newline-separated list of users. Here is a sample `readers' file: melissa splotnik jrandom (Don't forget the newline after the last user.) "Exclusion" means explicitly listing everyone who has _write_ access--if the file $CVSROOT/CVSROOT/writers exists, then only those users listed in it have write access, and everyone else has read-only access (of course, even the read-only users still need to be listed in the CVS `passwd' file). The `writers' file has the same format as the `readers' file. Note: if your CVS `passwd' file maps cvs users onto system users (*note Password authentication server::), make sure you deny or grant read-only access using the _cvs_ usernames, not the system usernames. That is, the `readers' and `writers' files contain cvs usernames, which may or may not be the same as system usernames. Here is a complete description of the server's behavior in deciding whether to grant read-only or read-write access: If `readers' exists, and this user is listed in it, then she gets read-only access. Or if `writers' exists, and this user is NOT listed in it, then she also gets read-only access (this is true even if `readers' exists but she is not listed there). Otherwise, she gets full read-write access. Of course there is a conflict if the user is listed in both files. This is resolved in the more conservative way, it being better to protect the repository too much than too little: such a user gets read-only access.  File: cvs.info, Node: Server temporary directory, Prev: Read-only access, Up: Repository 2.11 Temporary directories for the server ========================================= While running, the CVS server creates temporary directories. They are named cvs-servPID where PID is the process identification number of the server. They are located in the directory specified by the `-T' global option (*note Global options::), the `TMPDIR' environment variable (*note Environment variables::), or, failing that, `/tmp'. In most cases the server will remove the temporary directory when it is done, whether it finishes normally or abnormally. However, there are a few cases in which the server does not or cannot remove the temporary directory, for example: * If the server aborts due to an internal server error, it may preserve the directory to aid in debugging * If the server is killed in a way that it has no way of cleaning up (most notably, `kill -KILL' on unix). * If the system shuts down without an orderly shutdown, which tells the server to clean up. In cases such as this, you will need to manually remove the `cvs-servPID' directories. As long as there is no server running with process identification number PID, it is safe to do so.  File: cvs.info, Node: Starting a new project, Next: Revisions, Prev: Repository, Up: Top 3 Starting a project with CVS ***************************** Because renaming files and moving them between directories is somewhat inconvenient, the first thing you do when you start a new project should be to think through your file organization. It is not impossible to rename or move files, but it does increase the potential for confusion and CVS does have some quirks particularly in the area of renaming directories. *Note Moving files::. What to do next depends on the situation at hand. * Menu: * Setting up the files:: Getting the files into the repository * Defining the module:: How to make a module of the files  File: cvs.info, Node: Setting up the files, Next: Defining the module, Up: Starting a new project 3.1 Setting up the files ======================== The first step is to create the files inside the repository. This can be done in a couple of different ways. * Menu: * From files:: This method is useful with old projects where files already exists. * From other version control systems:: Old projects where you want to preserve history from another system. * From scratch:: Creating a directory tree from scratch.  File: cvs.info, Node: From files, Next: From other version control systems, Up: Setting up the files 3.1.1 Creating a directory tree from a number of files ------------------------------------------------------ When you begin using CVS, you will probably already have several projects that can be put under CVS control. In these cases the easiest way is to use the `import' command. An example is probably the easiest way to explain how to use it. If the files you want to install in CVS reside in `WDIR', and you want them to appear in the repository as `$CVSROOT/yoyodyne/RDIR', you can do this: $ cd WDIR $ cvs import -m "Imported sources" yoyodyne/RDIR yoyo start Unless you supply a log message with the `-m' flag, CVS starts an editor and prompts for a message. The string `yoyo' is a "vendor tag", and `start' is a "release tag". They may fill no purpose in this context, but since CVS requires them they must be present. *Note Tracking sources::, for more information about them. You can now verify that it worked, and remove your original source directory. $ cd .. $ cvs checkout yoyodyne/RDIR # Explanation below $ diff -r WDIR yoyodyne/RDIR $ rm -r WDIR Erasing the original sources is a good idea, to make sure that you do not accidentally edit them in WDIR, bypassing CVS. Of course, it would be wise to make sure that you have a backup of the sources before you remove them. The `checkout' command can either take a module name as argument (as it has done in all previous examples) or a path name relative to `$CVSROOT', as it did in the example above. It is a good idea to check that the permissions CVS sets on the directories inside `$CVSROOT' are reasonable, and that they belong to the proper groups. *Note File permissions::. If some of the files you want to import are binary, you may want to use the wrappers features to specify which files are binary and which are not. *Note Wrappers::.  File: cvs.info, Node: From other version control systems, Next: From scratch, Prev: From files, Up: Setting up the files 3.1.2 Creating Files From Other Version Control Systems ------------------------------------------------------- If you have a project which you are maintaining with another version control system, such as RCS, you may wish to put the files from that project into CVS, and preserve the revision history of the files. From RCS If you have been using RCS, find the RCS files--usually a file named `foo.c' will have its RCS file in `RCS/foo.c,v' (but it could be other places; consult the RCS documentation for details). Then create the appropriate directories in CVS if they do not already exist. Then copy the files into the appropriate directories in the CVS repository (the name in the repository must be the name of the source file with `,v' added; the files go directly in the appropriate directory of the repository, not in an `RCS' subdirectory). This is one of the few times when it is a good idea to access the CVS repository directly, rather than using CVS commands. Then you are ready to check out a new working directory. The RCS file should not be locked when you move it into CVS; if it is, CVS will have trouble letting you operate on it. From another version control system Many version control systems have the ability to export RCS files in the standard format. If yours does, export the RCS files and then follow the above instructions. Failing that, probably your best bet is to write a script that will check out the files one revision at a time using the command line interface to the other system, and then check the revisions into CVS. The `sccs2rcs' script mentioned below may be a useful example to follow. From SCCS There is a script in the `contrib' directory of the CVS source distribution called `sccs2rcs' which converts SCCS files to RCS files. Note: you must run it on a machine which has both SCCS and RCS installed, and like everything else in contrib it is unsupported (your mileage may vary). From PVCS There is a script in the `contrib' directory of the CVS source distribution called `pvcs_to_rcs' which converts PVCS archives to RCS files. You must run it on a machine which has both PVCS and RCS installed, and like everything else in contrib it is unsupported (your mileage may vary). See the comments in the script for details.  File: cvs.info, Node: From scratch, Prev: From other version control systems, Up: Setting up the files 3.1.3 Creating a directory tree from scratch -------------------------------------------- For a new project, the easiest thing to do is probably to create an empty directory structure, like this: $ mkdir tc $ mkdir tc/man $ mkdir tc/testing After that, you use the `import' command to create the corresponding (empty) directory structure inside the repository: $ cd tc $ cvs import -m "Created directory structure" yoyodyne/DIR yoyo start This will add yoyodyne/DIR as a directory under `$CVSROOT'. Use `checkout' to get the new project. Then, use `add' to add files (and new directories) as needed. $ cd .. $ cvs co yoyodyne/DIR Check that the permissions CVS sets on the directories inside `$CVSROOT' are reasonable.  File: cvs.info, Node: Defining the module, Prev: Setting up the files, Up: Starting a new project 3.2 Defining the module ======================= The next step is to define the module in the `modules' file. This is not strictly necessary, but modules can be convenient in grouping together related files and directories. In simple cases these steps are sufficient to define a module. 1. Get a working copy of the modules file. $ cvs checkout CVSROOT/modules $ cd CVSROOT 2. Edit the file and insert a line that defines the module. *Note Intro administrative files::, for an introduction. *Note modules::, for a full description of the modules file. You can use the following line to define the module `tc': tc yoyodyne/tc 3. Commit your changes to the modules file. $ cvs commit -m "Added the tc module." modules 4. Release the modules module. $ cd .. $ cvs release -d CVSROOT  File: cvs.info, Node: Revisions, Next: Branching and merging, Prev: Starting a new project, Up: Top 4 Revisions *********** For many uses of CVS, one doesn't need to worry too much about revision numbers; CVS assigns numbers such as `1.1', `1.2', and so on, and that is all one needs to know. However, some people prefer to have more knowledge and control concerning how CVS assigns revision numbers. If one wants to keep track of a set of revisions involving more than one file, such as which revisions went into a particular release, one uses a "tag", which is a symbolic revision which can be assigned to a numeric revision in each file. * Menu: * Revision numbers:: The meaning of a revision number * Versions revisions releases:: Terminology used in this manual * Assigning revisions:: Assigning revisions * Tags:: Tags--Symbolic revisions * Tagging the working directory:: The cvs tag command * Tagging by date/tag:: The cvs rtag command * Modifying tags:: Adding, renaming, and deleting tags * Tagging add/remove:: Tags with adding and removing files * Sticky tags:: Certain tags are persistent  File: cvs.info, Node: Revision numbers, Next: Versions revisions releases, Up: Revisions 4.1 Revision numbers ==================== Each version of a file has a unique "revision number". Revision numbers look like `1.1', `1.2', `1.3.2.2' or even `1.3.2.2.4.5'. A revision number always has an even number of period-separated decimal integers. By default revision 1.1 is the first revision of a file. Each successive revision is given a new number by increasing the rightmost number by one. The following figure displays a few revisions, with newer revisions to the right. +-----+ +-----+ +-----+ +-----+ +-----+ ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! +-----+ +-----+ +-----+ +-----+ +-----+ It is also possible to end up with numbers containing more than one period, for example `1.3.2.2'. Such revisions represent revisions on branches (*note Branching and merging::); such revision numbers are explained in detail in *Note Branches and revisions::.  File: cvs.info, Node: Versions revisions releases, Next: Assigning revisions, Prev: Revision numbers, Up: Revisions 4.2 Versions, revisions and releases ==================================== A file can have several versions, as described above. Likewise, a software product can have several versions. A software product is often given a version number such as `4.1.1'. Versions in the first sense are called "revisions" in this document, and versions in the second sense are called "releases". To avoid confusion, the word "version" is almost never used in this document.  File: cvs.info, Node: Assigning revisions, Next: Tags, Prev: Versions revisions releases, Up: Revisions 4.3 Assigning revisions ======================= By default, CVS will assign numeric revisions by leaving the first number the same and incrementing the second number. For example, `1.1', `1.2', `1.3', etc. When adding a new file, the second number will always be one and the first number will equal the highest first number of any file in that directory. For example, the current directory contains files whose highest numbered revisions are `1.7', `3.1', and `4.12', then an added file will be given the numeric revision `4.1'. (When using client/server CVS, only files that are actually sent to the server are considered.) Normally there is no reason to care about the revision numbers--it is easier to treat them as internal numbers that CVS maintains, and tags provide a better way to distinguish between things like release 1 versus release 2 of your product (*note Tags::). However, if you want to set the numeric revisions, the `-r' option to `cvs commit' can do that. The `-r' option implies the `-f' option, in the sense that it causes the files to be committed even if they are not modified. For example, to bring all your files up to revision 3.0 (including those that haven't changed), you might invoke: $ cvs commit -r 3.0 Note that the number you specify with `-r' must be larger than any existing revision number. That is, if revision 3.0 exists, you cannot `cvs commit -r 1.3'. If you want to maintain several releases in parallel, you need to use a branch (*note Branching and merging::).  File: cvs.info, Node: Tags, Next: Tagging the working directory, Prev: Assigning revisions, Up: Revisions 4.4 Tags-Symbolic revisions =========================== The revision numbers live a life of their own. They need not have anything at all to do with the release numbers of your software product. Depending on how you use CVS the revision numbers might change several times between two releases. As an example, some of the source files that make up RCS 5.6 have the following revision numbers: ci.c 5.21 co.c 5.9 ident.c 5.3 rcs.c 5.12 rcsbase.h 5.11 rcsdiff.c 5.10 rcsedit.c 5.11 rcsfcmp.c 5.9 rcsgen.c 5.10 rcslex.c 5.11 rcsmap.c 5.2 rcsutil.c 5.10 You can use the `tag' command to give a symbolic name to a certain revision of a file. You can use the `-v' flag to the `status' command to see all tags that a file has, and which revision numbers they represent. Tag names must start with an uppercase or lowercase letter and can contain uppercase and lowercase letters, digits, `-', and `_'. The two tag names `BASE' and `HEAD' are reserved for use by CVS. It is expected that future names which are special to CVS will be specially named, for example by starting with `.', rather than being named analogously to `BASE' and `HEAD', to avoid conflicts with actual tag names. You'll want to choose some convention for naming tags, based on information such as the name of the program and the version number of the release. For example, one might take the name of the program, immediately followed by the version number with `.' changed to `-', so that CVS 1.9 would be tagged with the name `cvs1-9'. If you choose a consistent convention, then you won't constantly be guessing whether a tag is `cvs-1-9' or `cvs1_9' or what. You might even want to consider enforcing your convention in the `taginfo' file (*note taginfo::). The following example shows how you can add a tag to a file. The commands must be issued inside your working directory. That is, you should issue the command in the directory where `backend.c' resides. $ cvs tag rel-0-4 backend.c T backend.c $ cvs status -v backend.c =================================================================== File: backend.c Status: Up-to-date Version: 1.4 Tue Dec 1 14:39:01 1992 RCS Version: 1.4 /u/cvsroot/yoyodyne/tc/backend.c,v Sticky Tag: (none) Sticky Date: (none) Sticky Options: (none) Existing Tags: rel-0-4 (revision: 1.4) For a complete summary of the syntax of `cvs tag', including the various options, see *Note Invoking CVS::. There is seldom reason to tag a file in isolation. A more common use is to tag all the files that constitute a module with the same tag at strategic points in the development life-cycle, such as when a release is made. $ cvs tag rel-1-0 . cvs tag: Tagging . T Makefile T backend.c T driver.c T frontend.c T parser.c (When you give CVS a directory as argument, it generally applies the operation to all the files in that directory, and (recursively), to any subdirectories that it may contain. *Note Recursive behavior::.) The `checkout' command has a flag, `-r', that lets you check out a certain revision of a module. This flag makes it easy to retrieve the sources that make up release 1.0 of the module `tc' at any time in the future: $ cvs checkout -r rel-1-0 tc This is useful, for instance, if someone claims that there is a bug in that release, but you cannot find the bug in the current working copy. You can also check out a module as it was at any given date. *Note checkout options::. When specifying `-r' to any of these commands, you will need beware of sticky tags; see *Note Sticky tags::. When you tag more than one file with the same tag you can think about the tag as "a curve drawn through a matrix of filename vs. revision number." Say we have 5 files with the following revisions: file1 file2 file3 file4 file5 1.1 1.1 1.1 1.1 /--1.1* <-*- TAG 1.2*- 1.2 1.2 -1.2*- 1.3 \- 1.3*- 1.3 / 1.3 1.4 \ 1.4 / 1.4 \-1.5*- 1.5 1.6 At some time in the past, the `*' versions were tagged. You can think of the tag as a handle attached to the curve drawn through the tagged revisions. When you pull on the handle, you get all the tagged revisions. Another way to look at it is that you "sight" through a set of revisions that is "flat" along the tagged revisions, like this: file1 file2 file3 file4 file5 1.1 1.2 1.1 1.3 _ 1.1 1.2 1.4 1.1 / 1.2*----1.3*----1.5*----1.2*----1.1 (--- <--- Look here 1.3 1.6 1.3 \_ 1.4 1.4 1.5  File: cvs.info, Node: Tagging the working directory, Next: Tagging by date/tag, Prev: Tags, Up: Revisions 4.5 Specifying what to tag from the working directory ===================================================== The example in the previous section demonstrates one of the most common ways to choose which revisions to tag. Namely, running the `cvs tag' command without arguments causes CVS to select the revisions which are checked out in the current working directory. For example, if the copy of `backend.c' in working directory was checked out from revision 1.4, then CVS will tag revision 1.4. Note that the tag is applied immediately to revision 1.4 in the repository; tagging is not like modifying a file, or other operations in which one first modifies the working directory and then runs `cvs commit' to transfer that modification to the repository. One potentially surprising aspect of the fact that `cvs tag' operates on the repository is that you are tagging the checked-in revisions, which may differ from locally modified files in your working directory. If you want to avoid doing this by mistake, specify the `-c' option to `cvs tag'. If there are any locally modified files, CVS will abort with an error before it tags any files: $ cvs tag -c rel-0-4 cvs tag: backend.c is locally modified cvs [tag aborted]: correct the above errors first!  File: cvs.info, Node: Tagging by date/tag, Next: Modifying tags, Prev: Tagging the working directory, Up: Revisions 4.6 Specifying what to tag by date or revision ============================================== The `cvs rtag' command tags the repository as of a certain date or time (or can be used to tag the latest revision). `rtag' works directly on the repository contents (it requires no prior checkout and does not look for a working directory). The following options specify which date or revision to tag. See *Note Common options::, for a complete description of them. `-D DATE' Tag the most recent revision no later than DATE. `-f' Only useful with the `-D DATE' or `-r TAG' flags. If no matching revision is found, use the most recent revision (instead of ignoring the file). `-r TAG' Only tag those files that contain existing tag TAG. The `cvs tag' command also allows one to specify files by revision or date, using the same `-r', `-D', and `-f' options. However, this feature is probably not what you want. The reason is that `cvs tag' chooses which files to tag based on the files that exist in the working directory, rather than the files which existed as of the given tag/date. Therefore, you are generally better off using `cvs rtag'. The exceptions might be cases like: cvs tag -r 1.4 backend.c  File: cvs.info, Node: Modifying tags, Next: Tagging add/remove, Prev: Tagging by date/tag, Up: Revisions 4.7 Deleting, moving, and renaming tags ======================================= Normally one does not modify tags. They exist in order to record the history of the repository and so deleting them or changing their meaning would, generally, not be what you want. However, there might be cases in which one uses a tag temporarily or accidentally puts one in the wrong place. Therefore, one might delete, move, or rename a tag. *WARNING: The commands in this section are dangerous; they permanently discard historical information and it can be difficult or impossible to recover from errors. If you are a CVS administrator, you may consider restricting these commands with the `taginfo' file (*note taginfo::).* To delete a tag, specify the `-d' option to either `cvs tag' or `cvs rtag'. For example: cvs rtag -d rel-0-4 tc deletes the non-branch tag `rel-0-4' from the module `tc'. In the event that branch tags are encountered within the repository with the given name, a warning message will be issued and the branch tag will not be deleted. If you are absolutely certain you know what you are doing, the `-B' option may be specified to allow deletion of branch tags. In that case, any non-branch tags encountered will trigger warnings and will not be deleted. *WARNING: Moving branch tags is very dangerous! If you think you need the `-B' option, think again and ask your CVS administrator about it (if that isn't you). There is almost certainly another way to accomplish what you want to accomplish.* When we say "move" a tag, we mean to make the same name point to different revisions. For example, the `stable' tag may currently point to revision 1.4 of `backend.c' and perhaps we want to make it point to revision 1.6. To move a non-branch tag, specify the `-F' option to either `cvs tag' or `cvs rtag'. For example, the task just mentioned might be accomplished as: cvs tag -r 1.6 -F stable backend.c If any branch tags are encountered in the repository with the given name, a warning is issued and the branch tag is not disturbed. If you are absolutely certain you wish to move the branch tag, the `-B' option may be specified. In that case, non-branch tags encountered with the given name are ignored with a warning message. *WARNING: Moving branch tags is very dangerous! If you think you need the `-B' option, think again and ask your CVS administrator about it (if that isn't you). There is almost certainly another way to accomplish what you want to accomplish.* When we say "rename" a tag, we mean to make a different name point to the same revisions as the old tag. For example, one may have misspelled the tag name and want to correct it (hopefully before others are relying on the old spelling). To rename a tag, first create a new tag using the `-r' option to `cvs rtag', and then delete the old name. (Caution: this method will not work with branch tags.) This leaves the new tag on exactly the same files as the old tag. For example: cvs rtag -r old-name-0-4 rel-0-4 tc cvs rtag -d old-name-0-4 tc  File: cvs.info, Node: Tagging add/remove, Next: Sticky tags, Prev: Modifying tags, Up: Revisions 4.8 Tagging and adding and removing files ========================================= The subject of exactly how tagging interacts with adding and removing files is somewhat obscure; for the most part CVS will keep track of whether files exist or not without too much fussing. By default, tags are applied to only files which have a revision corresponding to what is being tagged. Files which did not exist yet, or which were already removed, simply omit the tag, and CVS knows to treat the absence of a tag as meaning that the file didn't exist as of that tag. However, this can lose a small amount of information. For example, suppose a file was added and then removed. Then, if the tag is missing for that file, there is no way to know whether the tag refers to the time before the file was added, or the time after it was removed. If you specify the `-r' option to `cvs rtag', then CVS tags the files which have been removed, and thereby avoids this problem. For example, one might specify `-r HEAD' to tag the head. On the subject of adding and removing files, the `cvs rtag' command has a `-a' option which means to clear the tag from removed files that would not otherwise be tagged. For example, one might specify this option in conjunction with `-F' when moving a tag. If one moved a tag without `-a', then the tag in the removed files might still refer to the old revision, rather than reflecting the fact that the file had been removed. I don't think this is necessary if `-r' is specified, as noted above.  File: cvs.info, Node: Sticky tags, Prev: Tagging add/remove, Up: Revisions 4.9 Sticky tags =============== Sometimes a working copy's revision has extra data associated with it, for example it might be on a branch (*note Branching and merging::), or restricted to versions prior to a certain date by `checkout -D' or `update -D'. Because this data persists - that is, it applies to subsequent commands in the working copy - we refer to it as "sticky". Most of the time, stickiness is an obscure aspect of CVS that you don't need to think about. However, even if you don't want to use the feature, you may need to know _something_ about sticky tags (for example, how to avoid them!). You can use the `status' command to see if any sticky tags or dates are set: $ cvs status driver.c =================================================================== File: driver.c Status: Up-to-date Version: 1.7.2.1 Sat Dec 5 19:35:03 1992 RCS Version: 1.7.2.1 /u/cvsroot/yoyodyne/tc/driver.c,v Sticky Tag: rel-1-0-patches (branch: 1.7.2) Sticky Date: (none) Sticky Options: (none) The sticky tags will remain on your working files until you delete them with `cvs update -A'. The `-A' option merges local changes into the version of the file from the head of the trunk, removing any sticky tags, dates, or options (other than sticky `-k' options on locally modified files). See *Note update:: for more on the operation of `cvs update'. The most common use of sticky tags is to identify which branch one is working on, as described in *Note Accessing branches::. However, non-branch sticky tags have uses as well. For example, suppose that you want to avoid updating your working directory, to isolate yourself from possibly destabilizing changes other people are making. You can, of course, just refrain from running `cvs update'. But if you want to avoid updating only a portion of a larger tree, then sticky tags can help. If you check out a certain revision (such as 1.4) it will become sticky. Subsequent `cvs update' commands will not retrieve the latest revision until you reset the tag with `cvs update -A'. Likewise, use of the `-D' option to `update' or `checkout' sets a "sticky date", which, similarly, causes that date to be used for future retrievals. People often want to retrieve an old version of a file without setting a sticky tag. This can be done with the `-p' option to `checkout' or `update', which sends the contents of the file to standard output. For example: $ cvs update -p -r 1.1 file1 >file1 =================================================================== Checking out file1 RCS: /tmp/cvs-sanity/cvsroot/first-dir/Attic/file1,v VERS: 1.1 *************** $ However, this isn't the easiest way, if you are asking how to undo a previous checkin (in this example, put `file1' back to the way it was as of revision 1.1). In that case you are better off using the `-j' option to `update'; for further discussion see *Note Merging two revisions::.  File: cvs.info, Node: Branching and merging, Next: Recursive behavior, Prev: Revisions, Up: Top 5 Branching and merging *********************** CVS allows you to isolate changes onto a separate line of development, known as a "branch". When you change files on a branch, those changes do not appear on the main trunk or other branches. Later you can move changes from one branch to another branch (or the main trunk) by "merging". Merging involves first running `cvs update -j', to merge the changes into the working directory. You can then commit that revision, and thus effectively copy the changes onto another branch. * Menu: * Branches motivation:: What branches are good for * Creating a branch:: Creating a branch * Accessing branches:: Checking out and updating branches * Branches and revisions:: Branches are reflected in revision numbers * Magic branch numbers:: Magic branch numbers * Merging a branch:: Merging an entire branch * Merging more than once:: Merging from a branch several times * Merging two revisions:: Merging differences between two revisions * Merging adds and removals:: What if files are added or removed? * Merging and keywords:: Avoiding conflicts due to keyword substitution  File: cvs.info, Node: Branches motivation, Next: Creating a branch, Up: Branching and merging 5.1 What branches are good for ============================== Suppose that release 1.0 of tc has been made. You are continuing to develop tc, planning to create release 1.1 in a couple of months. After a while your customers start to complain about a fatal bug. You check out release 1.0 (*note Tags::) and find the bug (which turns out to have a trivial fix). However, the current revision of the sources are in a state of flux and are not expected to be stable for at least another month. There is no way to make a bug fix release based on the newest sources. The thing to do in a situation like this is to create a "branch" on the revision trees for all the files that make up release 1.0 of tc. You can then make modifications to the branch without disturbing the main trunk. When the modifications are finished you can elect to either incorporate them on the main trunk, or leave them on the branch.  File: cvs.info, Node: Creating a branch, Next: Accessing branches, Prev: Branches motivation, Up: Branching and merging 5.2 Creating a branch ===================== You can create a branch with `tag -b'; for example, assuming you're in a working copy: $ cvs tag -b rel-1-0-patches This splits off a branch based on the current revisions in the working copy, assigning that branch the name `rel-1-0-patches'. It is important to understand that branches get created in the repository, not in the working copy. Creating a branch based on current revisions, as the above example does, will _not_ automatically switch the working copy to be on the new branch. For information on how to do that, see *Note Accessing branches::. You can also create a branch without reference to any working copy, by using `rtag': $ cvs rtag -b -r rel-1-0 rel-1-0-patches tc `-r rel-1-0' says that this branch should be rooted at the revision that corresponds to the tag `rel-1-0'. It need not be the most recent revision - it's often useful to split a branch off an old revision (for example, when fixing a bug in a past release otherwise known to be stable). As with `tag', the `-b' flag tells `rtag' to create a branch (rather than just a symbolic revision name). Note that the numeric revision number that matches `rel-1-0' will probably be different from file to file. So, the full effect of the command is to create a new branch - named `rel-1-0-patches' - in module `tc', rooted in the revision tree at the point tagged by `rel-1-0'.  File: cvs.info, Node: Accessing branches, Next: Branches and revisions, Prev: Creating a branch, Up: Branching and merging 5.3 Accessing branches ====================== You can retrieve a branch in one of two ways: by checking it out fresh from the repository, or by switching an existing working copy over to the branch. To check out a branch from the repository, invoke `checkout' with the `-r' flag, followed by the tag name of the branch (*note Creating a branch::): $ cvs checkout -r rel-1-0-patches tc Or, if you already have a working copy, you can switch it to a given branch with `update -r': $ cvs update -r rel-1-0-patches tc or equivalently: $ cd tc $ cvs update -r rel-1-0-patches It does not matter if the working copy was originally on the main trunk or on some other branch - the above command will switch it to the named branch. And similarly to a regular `update' command, `update -r' merges any changes you have made, notifying you of conflicts where they occur. Once you have a working copy tied to a particular branch, it remains there until you tell it otherwise. This means that changes checked in from the working copy will add new revisions on that branch, while leaving the main trunk and other branches unaffected. To find out what branch a working copy is on, you can use the `status' command. In its output, look for the field named `Sticky tag' (*note Sticky tags::) - that's CVS's way of telling you the branch, if any, of the current working files: $ cvs status -v driver.c backend.c =================================================================== File: driver.c Status: Up-to-date Version: 1.7 Sat Dec 5 18:25:54 1992 RCS Version: 1.7 /u/cvsroot/yoyodyne/tc/driver.c,v Sticky Tag: rel-1-0-patches (branch: 1.7.2) Sticky Date: (none) Sticky Options: (none) Existing Tags: rel-1-0-patches (branch: 1.7.2) rel-1-0 (revision: 1.7) =================================================================== File: backend.c Status: Up-to-date Version: 1.4 Tue Dec 1 14:39:01 1992 RCS Version: 1.4 /u/cvsroot/yoyodyne/tc/backend.c,v Sticky Tag: rel-1-0-patches (branch: 1.4.2) Sticky Date: (none) Sticky Options: (none) Existing Tags: rel-1-0-patches (branch: 1.4.2) rel-1-0 (revision: 1.4) rel-0-4 (revision: 1.4) Don't be confused by the fact that the branch numbers for each file are different (`1.7.2' and `1.4.2' respectively). The branch tag is the same, `rel-1-0-patches', and the files are indeed on the same branch. The numbers simply reflect the point in each file's revision history at which the branch was made. In the above example, one can deduce that `driver.c' had been through more changes than `backend.c' before this branch was created. See *Note Branches and revisions:: for details about how branch numbers are constructed.  File: cvs.info, Node: Branches and revisions, Next: Magic branch numbers, Prev: Accessing branches, Up: Branching and merging 5.4 Branches and revisions ========================== Ordinarily, a file's revision history is a linear series of increments (*note Revision numbers::): +-----+ +-----+ +-----+ +-----+ +-----+ ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! +-----+ +-----+ +-----+ +-----+ +-----+ However, CVS is not limited to linear development. The "revision tree" can be split into "branches", where each branch is a self-maintained line of development. Changes made on one branch can easily be moved back to the main trunk. Each branch has a "branch number", consisting of an odd number of period-separated decimal integers. The branch number is created by appending an integer to the revision number where the corresponding branch forked off. Having branch numbers allows more than one branch to be forked off from a certain revision. All revisions on a branch have revision numbers formed by appending an ordinal number to the branch number. The following figure illustrates branching with an example. +-------------+ Branch 1.2.2.3.2 -> ! 1.2.2.3.2.1 ! / +-------------+ / / +---------+ +---------+ +---------+ Branch 1.2.2 -> _! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 ! / +---------+ +---------+ +---------+ / / +-----+ +-----+ +-----+ +-----+ +-----+ ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! <- The main trunk +-----+ +-----+ +-----+ +-----+ +-----+ ! ! ! +---------+ +---------+ +---------+ Branch 1.2.4 -> +---! 1.2.4.1 !----! 1.2.4.2 !----! 1.2.4.3 ! +---------+ +---------+ +---------+ The exact details of how the branch number is constructed is not something you normally need to be concerned about, but here is how it works: When CVS creates a branch number it picks the first unused even integer, starting with 2. So when you want to create a branch from revision 6.4 it will be numbered 6.4.2. All branch numbers ending in a zero (such as 6.4.0) are used internally by CVS (*note Magic branch numbers::). The branch 1.1.1 has a special meaning. *Note Tracking sources::.  File: cvs.info, Node: Magic branch numbers, Next: Merging a branch, Prev: Branches and revisions, Up: Branching and merging 5.5 Magic branch numbers ======================== This section describes a CVS feature called "magic branches". For most purposes, you need not worry about magic branches; CVS handles them for you. However, they are visible to you in certain circumstances, so it may be useful to have some idea of how it works. Externally, branch numbers consist of an odd number of dot-separated decimal integers. *Note Revision numbers::. That is not the whole truth, however. For efficiency reasons CVS sometimes inserts an extra 0 in the second rightmost position (1.2.4 becomes 1.2.0.4, 8.9.10.11.12 becomes 8.9.10.11.0.12 and so on). CVS does a pretty good job at hiding these so called magic branches, but in a few places the hiding is incomplete: * The magic branch number appears in the output from `cvs log'. * You cannot specify a symbolic branch name to `cvs admin'. You can use the `admin' command to reassign a symbolic name to a branch the way RCS expects it to be. If `R4patches' is assigned to the branch 1.4.2 (magic branch number 1.4.0.2) in file `numbers.c' you can do this: $ cvs admin -NR4patches:1.4.2 numbers.c It only works if at least one revision is already committed on the branch. Be very careful so that you do not assign the tag to the wrong number. (There is no way to see how the tag was assigned yesterday).  File: cvs.info, Node: Merging a branch, Next: Merging more than once, Prev: Magic branch numbers, Up: Branching and merging 5.6 Merging an entire branch ============================ You can merge changes made on a branch into your working copy by giving the `-j BRANCHNAME' flag to the `update' subcommand. With one `-j BRANCHNAME' option it merges the changes made between the greatest common ancestor (GCA) of the branch and the destination revision (in the simple case below the GCA is the point where the branch forked) and the newest revision on that branch into your working copy. The `-j' stands for "join". Consider this revision tree: +-----+ +-----+ +-----+ +-----+ ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 ! <- The main trunk +-----+ +-----+ +-----+ +-----+ ! ! ! +---------+ +---------+ Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 ! +---------+ +---------+ The branch 1.2.2 has been given the tag (symbolic name) `R1fix'. The following example assumes that the module `mod' contains only one file, `m.c'. $ cvs checkout mod # Retrieve the latest revision, 1.4 $ cvs update -j R1fix m.c # Merge all changes made on the branch, # i.e. the changes between revision 1.2 # and 1.2.2.2, into your working copy # of the file. $ cvs commit -m "Included R1fix" # Create revision 1.5. A conflict can result from a merge operation. If that happens, you should resolve it before committing the new revision. *Note Conflicts example::. If your source files contain keywords (*note Keyword substitution::), you might be getting more conflicts than strictly necessary. See *Note Merging and keywords::, for information on how to avoid this. The `checkout' command also supports the `-j BRANCHNAME' flag. The same effect as above could be achieved with this: $ cvs checkout -j R1fix mod $ cvs commit -m "Included R1fix" It should be noted that `update -j TAGNAME' will also work but may not produce the desired result. *Note Merging adds and removals::, for more.  File: cvs.info, Node: Merging more than once, Next: Merging two revisions, Prev: Merging a branch, Up: Branching and merging 5.7 Merging from a branch several times ======================================= Continuing our example, the revision tree now looks like this: +-----+ +-----+ +-----+ +-----+ +-----+ ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! <- The main trunk +-----+ +-----+ +-----+ +-----+ +-----+ ! * ! * ! +---------+ +---------+ Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 ! +---------+ +---------+ where the starred line represents the merge from the `R1fix' branch to the main trunk, as just discussed. Now suppose that development continues on the `R1fix' branch: +-----+ +-----+ +-----+ +-----+ +-----+ ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! <- The main trunk +-----+ +-----+ +-----+ +-----+ +-----+ ! * ! * ! +---------+ +---------+ +---------+ Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 ! +---------+ +---------+ +---------+ and then you want to merge those new changes onto the main trunk. If you just use the `cvs update -j R1fix m.c' command again, CVS will attempt to merge again the changes which you have already merged, which can have undesirable side effects. So instead you need to specify that you only want to merge the changes on the branch which have not yet been merged into the trunk. To do that you specify two `-j' options, and CVS merges the changes from the first revision to the second revision. For example, in this case the simplest way would be cvs update -j 1.2.2.2 -j R1fix m.c # Merge changes from 1.2.2.2 to the # head of the R1fix branch The problem with this is that you need to specify the 1.2.2.2 revision manually. A slightly better approach might be to use the date the last merge was done: cvs update -j R1fix:yesterday -j R1fix m.c Better yet, tag the R1fix branch after every merge into the trunk, and then use that tag for subsequent merges: cvs update -j merged_from_R1fix_to_trunk -j R1fix m.c  File: cvs.info, Node: Merging two revisions, Next: Merging adds and removals, Prev: Merging more than once, Up: Branching and merging 5.8 Merging differences between any two revisions ================================================= With two `-j REVISION' flags, the `update' (and `checkout') command can merge the differences between any two revisions into your working file. $ cvs update -j 1.5 -j 1.3 backend.c will undo all changes made between revision 1.3 and 1.5. Note the order of the revisions! If you try to use this option when operating on multiple files, remember that the numeric revisions will probably be very different between the various files. You almost always use symbolic tags rather than revision numbers when operating on multiple files. Specifying two `-j' options can also undo file removals or additions. For example, suppose you have a file named `file1' which existed as revision 1.1, and you then removed it (thus adding a dead revision 1.2). Now suppose you want to add it again, with the same contents it had previously. Here is how to do it: $ cvs update -j 1.2 -j 1.1 file1 U file1 $ cvs commit -m test Checking in file1; /tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1 new revision: 1.3; previous revision: 1.2 done $  File: cvs.info, Node: Merging adds and removals, Next: Merging and keywords, Prev: Merging two revisions, Up: Branching and merging 5.9 Merging can add or remove files =================================== If the changes which you are merging involve removing or adding some files, `update -j' will reflect such additions or removals. For example: cvs update -A touch a b c cvs add a b c ; cvs ci -m "added" a b c cvs tag -b branchtag cvs update -r branchtag touch d ; cvs add d rm a ; cvs rm a cvs ci -m "added d, removed a" cvs update -A cvs update -jbranchtag After these commands are executed and a `cvs commit' is done, file `a' will be removed and file `d' added in the main branch. Note that using a single static tag (`-j TAGNAME') rather than a dynamic tag (`-j BRANCHNAME') to merge changes from a branch will usually not remove files which were removed on the branch since CVS does not automatically add static tags to dead revisions. The exception to this rule occurs when a static tag has been attached to a dead revision manually. Use the branch tag to merge all changes from the branch or use two static tags as merge endpoints to be sure that all intended changes are propagated in the merge.  File: cvs.info, Node: Merging and keywords, Prev: Merging adds and removals, Up: Branching and merging 5.10 Merging and keywords ========================= If you merge files containing keywords (*note Keyword substitution::), you will normally get numerous conflicts during the merge, because the keywords are expanded differently in the revisions which you are merging. Therefore, you will often want to specify the `-kk' (*note Substitution modes::) switch to the merge command line. By substituting just the name of the keyword, not the expanded value of that keyword, this option ensures that the revisions which you are merging will be the same as each other, and avoid spurious conflicts. For example, suppose you have a file like this: +---------+ _! 1.1.2.1 ! <- br1 / +---------+ / / +-----+ +-----+ ! 1.1 !----! 1.2 ! +-----+ +-----+ and your working directory is currently on the trunk (revision 1.2). Then you might get the following results from a merge: $ cat file1 key $Revision: 1.2 $ . . . $ cvs update -j br1 U file1 RCS file: /cvsroot/first-dir/file1,v retrieving revision 1.1 retrieving revision 1.1.2.1 Merging differences between 1.1 and 1.1.2.1 into file1 rcsmerge: warning: conflicts during merge $ cat file1 <<<<<<< file1 key $Revision: 1.2 $ ======= key $Revision: 1.1.2.1 $ >>>>>>> 1.1.2.1 . . . What happened was that the merge tried to merge the differences between 1.1 and 1.1.2.1 into your working directory. So, since the keyword changed from `Revision: 1.1' to `Revision: 1.1.2.1', CVS tried to merge that change into your working directory, which conflicted with the fact that your working directory had contained `Revision: 1.2'. Here is what happens if you had used `-kk': $ cat file1 key $Revision: 1.2 $ . . . $ cvs update -kk -j br1 U file1 RCS file: /cvsroot/first-dir/file1,v retrieving revision 1.1 retrieving revision 1.1.2.1 Merging differences between 1.1 and 1.1.2.1 into file1 $ cat file1 key $Revision$ . . . What is going on here is that revision 1.1 and 1.1.2.1 both expand as plain `Revision', and therefore merging the changes between them into the working directory need not change anything. Therefore, there is no conflict. There is, however, one major caveat with using `-kk' on merges. Namely, it overrides whatever keyword expansion mode CVS would normally have used. In particular, this is a problem if the mode had been `-kb' for a binary file. Therefore, if your repository contains binary files, you will need to deal with the conflicts rather than using `-kk'. As a result of using `-kk' during the merge, each file examined by the update will have `-kk' set as sticky options. Running `update -A' will clear the sticky options on unmodified files, but it will not clear the sticky options on modified files. To get back to the default keyword substitution for modified files, you must commit the results of the merge and then run `update -A'.  File: cvs.info, Node: Recursive behavior, Next: Adding and removing, Prev: Branching and merging, Up: Top 6 Recursive behavior ******************** Almost all of the subcommands of CVS work recursively when you specify a directory as an argument. For instance, consider this directory structure: `$HOME' | +--tc | | +--CVS | (internal CVS files) +--Makefile +--backend.c +--driver.c +--frontend.c +--parser.c +--man | | | +--CVS | | (internal CVS files) | +--tc.1 | +--testing | +--CVS | (internal CVS files) +--testpgm.t +--test2.t If `tc' is the current working directory, the following is true: * `cvs update testing' is equivalent to cvs update testing/testpgm.t testing/test2.t * `cvs update testing man' updates all files in the subdirectories * `cvs update .' or just `cvs update' updates all files in the `tc' directory If no arguments are given to `update' it will update all files in the current working directory and all its subdirectories. In other words, `.' is a default argument to `update'. This is also true for most of the CVS subcommands, not only the `update' command. The recursive behavior of the CVS subcommands can be turned off with the `-l' option. Conversely, the `-R' option can be used to force recursion if `-l' is specified in `~/.cvsrc' (*note ~/.cvsrc::). $ cvs update -l # Don't update files in subdirectories  File: cvs.info, Node: Adding and removing, Next: History browsing, Prev: Recursive behavior, Up: Top 7 Adding, removing, and renaming files and directories ****************************************************** In the course of a project, one will often add new files. Likewise with removing or renaming, or with directories. The general concept to keep in mind in all these cases is that instead of making an irreversible change you want CVS to record the fact that a change has taken place, just as with modifying an existing file. The exact mechanisms to do this in CVS vary depending on the situation. * Menu: * Adding files:: Adding files * Removing files:: Removing files * Removing directories:: Removing directories * Moving files:: Moving and renaming files * Moving directories:: Moving and renaming directories  File: cvs.info, Node: Adding files, Next: Removing files, Up: Adding and removing 7.1 Adding files to a directory =============================== To add a new file to a directory, follow these steps. * You must have a working copy of the directory. *Note Getting the source::. * Create the new file inside your working copy of the directory. * Use `cvs add FILENAME' to tell CVS that you want to version control the file. If the file contains binary data, specify `-kb' (*note Binary files::). * Use `cvs commit FILENAME' to actually check in the file into the repository. Other developers cannot see the file until you perform this step. You can also use the `add' command to add a new directory. Unlike most other commands, the `add' command is not recursive. You have to explicitly name files and directories that you wish to add to the repository. However, each directory will need to be added separately before you will be able to add new files to those directories. $ mkdir -p foo/bar $ cp ~/myfile foo/bar/myfile $ cvs add foo foo/bar $ cvs add foo/bar/myfile -- Command: cvs add [`-k' kflag] [`-m' message] files ... Schedule FILES to be added to the repository. The files or directories specified with `add' must already exist in the current directory. To add a whole new directory hierarchy to the source repository (for example, files received from a third-party vendor), use the `import' command instead. *Note import::. The added files are not placed in the source repository until you use `commit' to make the change permanent. Doing an `add' on a file that was removed with the `remove' command will undo the effect of the `remove', unless a `commit' command intervened. *Note Removing files::, for an example. The `-k' option specifies the default way that this file will be checked out; for more information see *Note Substitution modes::. The `-m' option specifies a description for the file. This description appears in the history log (if it is enabled, *note history file::). It will also be saved in the version history inside the repository when the file is committed. The `log' command displays this description. The description can be changed using `admin -t'. *Note admin::. If you omit the `-m DESCRIPTION' flag, an empty string will be used. You will not be prompted for a description. For example, the following commands add the file `backend.c' to the repository: $ cvs add backend.c $ cvs commit -m "Early version. Not yet compilable." backend.c When you add a file it is added only on the branch which you are working on (*note Branching and merging::). You can later merge the additions to another branch if you want (*note Merging adds and removals::).  File: cvs.info, Node: Removing files, Next: Removing directories, Prev: Adding files, Up: Adding and removing 7.2 Removing files ================== Directories change. New files are added, and old files disappear. Still, you want to be able to retrieve an exact copy of old releases. Here is what you can do to remove a file, but remain able to retrieve old revisions: * Make sure that you have not made any uncommitted modifications to the file. *Note Viewing differences::, for one way to do that. You can also use the `status' or `update' command. If you remove the file without committing your changes, you will of course not be able to retrieve the file as it was immediately before you deleted it. * Remove the file from your working copy of the directory. You can for instance use `rm'. * Use `cvs remove FILENAME' to tell CVS that you really want to delete the file. * Use `cvs commit FILENAME' to actually perform the removal of the file from the repository. When you commit the removal of the file, CVS records the fact that the file no longer exists. It is possible for a file to exist on only some branches and not on others, or to re-add another file with the same name later. CVS will correctly create or not create the file, based on the `-r' and `-D' options specified to `checkout' or `update'. -- Command: cvs remove [options] files ... Schedule file(s) to be removed from the repository (files which have not already been removed from the working directory are not processed). This command does not actually remove the file from the repository until you commit the removal. For a full list of options, see *Note Invoking CVS::. Here is an example of removing several files: $ cd test $ rm *.c $ cvs remove cvs remove: Removing . cvs remove: scheduling a.c for removal cvs remove: scheduling b.c for removal cvs remove: use 'cvs commit' to remove these files permanently $ cvs ci -m "Removed unneeded files" cvs commit: Examining . cvs commit: Committing . As a convenience you can remove the file and `cvs remove' it in one step, by specifying the `-f' option. For example, the above example could also be done like this: $ cd test $ cvs remove -f *.c cvs remove: scheduling a.c for removal cvs remove: scheduling b.c for removal cvs remove: use 'cvs commit' to remove these files permanently $ cvs ci -m "Removed unneeded files" cvs commit: Examining . cvs commit: Committing . If you execute `remove' for a file, and then change your mind before you commit, you can undo the `remove' with an `add' command. $ ls CVS ja.h oj.c $ rm oj.c $ cvs remove oj.c cvs remove: scheduling oj.c for removal cvs remove: use 'cvs commit' to remove this file permanently $ cvs add oj.c U oj.c cvs add: oj.c, version 1.1.1.1, resurrected If you realize your mistake before you run the `remove' command you can use `update' to resurrect the file: $ rm oj.c $ cvs update oj.c cvs update: warning: oj.c was lost U oj.c When you remove a file it is removed only on the branch which you are working on (*note Branching and merging::). You can later merge the removals to another branch if you want (*note Merging adds and removals::).  File: cvs.info, Node: Removing directories, Next: Moving files, Prev: Removing files, Up: Adding and removing 7.3 Removing directories ======================== In concept, removing directories is somewhat similar to removing files--you want the directory to not exist in your current working directories, but you also want to be able to retrieve old releases in which the directory existed. The way that you remove a directory is to remove all the files in it. You don't remove the directory itself; there is no way to do that. Instead you specify the `-P' option to `cvs update' or `cvs checkout', which will cause CVS to remove empty directories from working directories. (Note that `cvs export' always removes empty directories.) Probably the best way to do this is to always specify `-P'; if you want an empty directory then put a dummy file (for example `.keepme') in it to prevent `-P' from removing it. Note that `-P' is implied by the `-r' or `-D' options of `checkout'. This way, CVS will be able to correctly create the directory or not depending on whether the particular version you are checking out contains any files in that directory.  File: cvs.info, Node: Moving files, Next: Moving directories, Prev: Removing directories, Up: Adding and removing 7.4 Moving and renaming files ============================= Moving files to a different directory or renaming them is not difficult, but some of the ways in which this works may be non-obvious. (Moving or renaming a directory is even harder. *Note Moving directories::.). The examples below assume that the file OLD is renamed to NEW. * Menu: * Outside:: The normal way to Rename * Inside:: A tricky, alternative way * Rename by copying:: Another tricky, alternative way  File: cvs.info, Node: Outside, Next: Inside, Up: Moving files 7.4.1 The Normal way to Rename ------------------------------ The normal way to move a file is to copy OLD to NEW, and then issue the normal CVS commands to remove OLD from the repository, and add NEW to it. $ mv OLD NEW $ cvs remove OLD $ cvs add NEW $ cvs commit -m "Renamed OLD to NEW" OLD NEW This is the simplest way to move a file, it is not error-prone, and it preserves the history of what was done. Note that to access the history of the file you must specify the old or the new name, depending on what portion of the history you are accessing. For example, `cvs log OLD' will give the log up until the time of the rename. When NEW is committed its revision numbers will start again, usually at 1.1, so if that bothers you, use the `-r rev' option to commit. For more information see *Note Assigning revisions::.  File: cvs.info, Node: Inside, Next: Rename by copying, Prev: Outside, Up: Moving files 7.4.2 Moving the history file ----------------------------- This method is more dangerous, since it involves moving files inside the repository. Read this entire section before trying it out! $ cd $CVSROOT/DIR $ mv OLD,v NEW,v Advantages: * The log of changes is maintained intact. * The revision numbers are not affected. Disadvantages: * Old releases cannot easily be fetched from the repository. (The file will show up as NEW even in revisions from the time before it was renamed). * There is no log information of when the file was renamed. * Nasty things might happen if someone accesses the history file while you are moving it. Make sure no one else runs any of the CVS commands while you move it.  File: cvs.info, Node: Rename by copying, Prev: Inside, Up: Moving files 7.4.3 Copying the history file ------------------------------ This way also involves direct modifications to the repository. It is safe, but not without drawbacks. # Copy the RCS file inside the repository $ cd $CVSROOT/DIR $ cp OLD,v NEW,v # Remove the old file $ cd ~/DIR $ rm OLD $ cvs remove OLD $ cvs commit OLD # Remove all tags from NEW $ cvs update NEW $ cvs log NEW # Remember the non-branch tag names $ cvs tag -d TAG1 NEW $ cvs tag -d TAG2 NEW ... By removing the tags you will be able to check out old revisions. Advantages: * Checking out old revisions works correctly, as long as you use `-rTAG' and not `-DDATE' to retrieve the revisions. * The log of changes is maintained intact. * The revision numbers are not affected. Disadvantages: * You cannot easily see the history of the file across the rename.  File: cvs.info, Node: Moving directories, Prev: Moving files, Up: Adding and removing 7.5 Moving and renaming directories =================================== The normal way to rename or move a directory is to rename or move each file within it as described in *Note Outside::. Then check out with the `-P' option, as described in *Note Removing directories::. If you really want to hack the repository to rename or delete a directory in the repository, you can do it like this: 1. Inform everyone who has a checked out copy of the directory that the directory will be renamed. They should commit all their changes in all their copies of the project containing the directory to be removed, and remove all their working copies of said project, before you take the steps below. 2. Rename the directory inside the repository. $ cd $CVSROOT/PARENT-DIR $ mv OLD-DIR NEW-DIR 3. Fix the CVS administrative files, if necessary (for instance if you renamed an entire module). 4. Tell everyone that they can check out again and continue working. If someone had a working copy the CVS commands will cease to work for him, until he removes the directory that disappeared inside the repository. It is almost always better to move the files in the directory instead of moving the directory. If you move the directory you are unlikely to be able to retrieve old releases correctly, since they probably depend on the name of the directories.  File: cvs.info, Node: History browsing, Next: Binary files, Prev: Adding and removing, Up: Top 8 History browsing ****************** Once you have used CVS to store a version control history--what files have changed when, how, and by whom, there are a variety of mechanisms for looking through the history. * Menu: * log messages:: Log messages * history database:: The history database * user-defined logging:: User-defined logging  File: cvs.info, Node: log messages, Next: history database, Up: History browsing 8.1 Log messages ================ Whenever you commit a file you specify a log message. To look through the log messages which have been specified for every revision which has been committed, use the `cvs log' command (*note log::).  File: cvs.info, Node: history database, Next: user-defined logging, Prev: log messages, Up: History browsing 8.2 The history database ======================== You can use the history file (*note history file::) to log various CVS actions. To retrieve the information from the history file, use the `cvs history' command (*note history::). Note: you can control what is logged to this file by using the `LogHistory' keyword in the `CVSROOT/config' file (*note config::).  File: cvs.info, Node: user-defined logging, Prev: history database, Up: History browsing 8.3 User-defined logging ======================== You can customize CVS to log various kinds of actions, in whatever manner you choose. These mechanisms operate by executing a script at various times. The script might append a message to a file listing the information and the programmer who created it, or send mail to a group of developers, or, perhaps, post a message to a particular newsgroup. To log commits, use the `loginfo' file (*note loginfo::). To log tags, use the `taginfo' file (*note taginfo::). To log checkouts, exports, and tags, respectively, you can also use the `-o', `-e', and `-t' options in the modules file. For a more flexible way of giving notifications to various users, which requires less in the way of keeping centralized scripts up to date, use the `cvs watch add' command (*note Getting Notified::); this command is useful even if you are not using `cvs watch on'.  File: cvs.info, Node: Binary files, Next: Multiple developers, Prev: History browsing, Up: Top 9 Handling binary files *********************** The most common use for CVS is to store text files. With text files, CVS can merge revisions, display the differences between revisions in a human-visible fashion, and other such operations. However, if you are willing to give up a few of these abilities, CVS can store binary files. For example, one might store a web site in CVS including both text files and binary images. * Menu: * Binary why:: More details on issues with binary files * Binary howto:: How to store them  File: cvs.info, Node: Binary why, Next: Binary howto, Up: Binary files 9.1 The issues with binary files ================================ While the need to manage binary files may seem obvious if the files that you customarily work with are binary, putting them into version control does present some additional issues. One basic function of version control is to show the differences between two revisions. For example, if someone else checked in a new version of a file, you may wish to look at what they changed and determine whether their changes are good. For text files, CVS provides this functionality via the `cvs diff' command. For binary files, it may be possible to extract the two revisions and then compare them with a tool external to CVS (for example, word processing software often has such a feature). If there is no such tool, one must track changes via other mechanisms, such as urging people to write good log messages, and hoping that the changes they actually made were the changes that they intended to make. Another ability of a version control system is the ability to merge two revisions. For CVS this happens in two contexts. The first is when users make changes in separate working directories (*note Multiple developers::). The second is when one merges explicitly with the `update -j' command (*note Branching and merging::). In the case of text files, CVS can merge changes made independently, and signal a conflict if the changes conflict. With binary files, the best that CVS can do is present the two different copies of the file, and leave it to the user to resolve the conflict. The user may choose one copy or the other, or may run an external merge tool which knows about that particular file format, if one exists. Note that having the user merge relies primarily on the user to not accidentally omit some changes, and thus is potentially error prone. If this process is thought to be undesirable, the best choice may be to avoid merging. To avoid the merges that result from separate working directories, see the discussion of reserved checkouts (file locking) in *Note Multiple developers::. To avoid the merges resulting from branches, restrict use of branches.  File: cvs.info, Node: Binary howto, Prev: Binary why, Up: Binary files 9.2 How to store binary files ============================= There are two issues with using CVS to store binary files. The first is that CVS by default converts line endings between the canonical form in which they are stored in the repository (linefeed only), and the form appropriate to the operating system in use on the client (for example, carriage return followed by line feed for Windows NT). The second is that a binary file might happen to contain data which looks like a keyword (*note Keyword substitution::), so keyword expansion must be turned off. The `-kb' option available with some CVS commands insures that neither line ending conversion nor keyword expansion will be done. Here is an example of how you can create a new file using the `-kb' flag: $ echo '$Id$' > kotest $ cvs add -kb -m"A test file" kotest $ cvs ci -m"First checkin; contains a keyword" kotest If a file accidentally gets added without `-kb', one can use the `cvs admin' command to recover. For example: $ echo '$Id$' > kotest $ cvs add -m"A test file" kotest $ cvs ci -m"First checkin; contains a keyword" kotest $ cvs admin -kb kotest $ cvs update -A kotest # For non-unix systems: # Copy in a good copy of the file from outside CVS $ cvs commit -m "make it binary" kotest When you check in the file `kotest' the file is not preserved as a binary file, because you did not check it in as a binary file. The `cvs admin -kb' command sets the default keyword substitution method for this file, but it does not alter the working copy of the file that you have. If you need to cope with line endings (that is, you are using CVS on a non-unix system), then you need to check in a new copy of the file, as shown by the `cvs commit' command above. On unix, the `cvs update -A' command suffices. (Note that you can use `cvs log' to determine the default keyword substitution method for a file and `cvs status' to determine the keyword substitution method for a working copy.) However, in using `cvs admin -k' to change the keyword expansion, be aware that the keyword expansion mode is not version controlled. This means that, for example, that if you have a text file in old releases, and a binary file with the same name in new releases, CVS provides no way to check out the file in text or binary mode depending on what version you are checking out. There is no good workaround for this problem. You can also set a default for whether `cvs add' and `cvs import' treat a file as binary based on its name; for example you could say that files who names end in `.exe' are binary. *Note Wrappers::. There is currently no way to have CVS detect whether a file is binary based on its contents. The main difficulty with designing such a feature is that it is not clear how to distinguish between binary and non-binary files, and the rules to apply would vary considerably with the operating system.  File: cvs.info, Node: Multiple developers, Next: Revision management, Prev: Binary files, Up: Top 10 Multiple developers ********************** When more than one person works on a software project things often get complicated. Often, two people try to edit the same file simultaneously. One solution, known as "file locking" or "reserved checkouts", is to allow only one person to edit each file at a time. This is the only solution with some version control systems, including RCS and SCCS. Currently the usual way to get reserved checkouts with CVS is the `cvs admin -l' command (*note admin options::). This is not as nicely integrated into CVS as the watch features, described below, but it seems that most people with a need for reserved checkouts find it adequate. It also may be possible to use the watches features described below, together with suitable procedures (not enforced by software), to avoid having two people edit at the same time. The default model with CVS is known as "unreserved checkouts". In this model, developers can edit their own "working copy" of a file simultaneously. The first person that commits his changes has no automatic way of knowing that another has started to edit it. Others will get an error message when they try to commit the file. They must then use CVS commands to bring their working copy up to date with the repository revision. This process is almost automatic. CVS also supports mechanisms which facilitate various kinds of communication, without actually enforcing rules like reserved checkouts do. The rest of this chapter describes how these various models work, and some of the issues involved in choosing between them. * Menu: * File status:: A file can be in several states * Updating a file:: Bringing a file up-to-date * Conflicts example:: An informative example * Informing others:: To cooperate you must inform * Concurrency:: Simultaneous repository access * Watches:: Mechanisms to track who is editing files * Choosing a model:: Reserved or unreserved checkouts?  File: cvs.info, Node: File status, Next: Updating a file, Up: Multiple developers 10.1 File status ================ Based on what operations you have performed on a checked out file, and what operations others have performed to that file in the repository, one can classify a file in a number of states. The states, as reported by the `status' command, are: Up-to-date The file is identical with the latest revision in the repository for the branch in use. Locally Modified You have edited the file, and not yet committed your changes. Locally Added You have added the file with `add', and not yet committed your changes. Locally Removed You have removed the file with `remove', and not yet committed your changes. Needs Checkout Someone else has committed a newer revision to the repository. The name is slightly misleading; you will ordinarily use `update' rather than `checkout' to get that newer revision. Needs Patch Like Needs Checkout, but the CVS server will send a patch rather than the entire file. Sending a patch or sending an entire file accomplishes the same thing. Needs Merge Someone else has committed a newer revision to the repository, and you have also made modifications to the file. Unresolved Conflict A file with the same name as this new file has been added to the repository from a second workspace. This file will need to be moved out of the way to allow an `update' to complete. File had conflicts on merge This is like Locally Modified, except that a previous `update' command gave a conflict. If you have not already done so, you need to resolve the conflict as described in *Note Conflicts example::. Unknown CVS doesn't know anything about this file. For example, you have created a new file and have not run `add'. To help clarify the file status, `status' also reports the `Working revision' which is the revision that the file in the working directory derives from, and the `Repository revision' which is the latest revision in the repository for the branch in use. The options to `status' are listed in *Note Invoking CVS::. For information on its `Sticky tag' and `Sticky date' output, see *Note Sticky tags::. For information on its `Sticky options' output, see the `-k' option in *Note update options::. You can think of the `status' and `update' commands as somewhat complementary. You use `update' to bring your files up to date, and you can use `status' to give you some idea of what an `update' would do (of course, the state of the repository might change before you actually run `update'). In fact, if you want a command to display file status in a more brief format than is displayed by the `status' command, you can invoke $ cvs -n -q update The `-n' option means to not actually do the update, but merely to display statuses; the `-q' option avoids printing the name of each directory. For more information on the `update' command, and these options, see *Note Invoking CVS::.  File: cvs.info, Node: Updating a file, Next: Conflicts example, Prev: File status, Up: Multiple developers 10.2 Bringing a file up to date =============================== When you want to update or merge a file, use the `cvs update -d' command. For files that are not up to date this is roughly equivalent to a `checkout' command: the newest revision of the file is extracted from the repository and put in your working directory. The `-d' option, not necessary with `checkout', tells CVS that you wish it to create directories added by other developers. Your modifications to a file are never lost when you use `update'. If no newer revision exists, running `update' has no effect. If you have edited the file, and a newer revision is available, CVS will merge all changes into your working copy. For instance, imagine that you checked out revision 1.4 and started editing it. In the meantime someone else committed revision 1.5, and shortly after that revision 1.6. If you run `update' on the file now, CVS will incorporate all changes between revision 1.4 and 1.6 into your file. If any of the changes between 1.4 and 1.6 were made too close to any of the changes you have made, an "overlap" occurs. In such cases a warning is printed, and the resulting file includes both versions of the lines that overlap, delimited by special markers. *Note update::, for a complete description of the `update' command.  File: cvs.info, Node: Conflicts example, Next: Informing others, Prev: Updating a file, Up: Multiple developers 10.3 Conflicts example ====================== Suppose revision 1.4 of `driver.c' contains this: #include void main() { parse(); if (nerr == 0) gencode(); else fprintf(stderr, "No code generated.\n"); exit(nerr == 0 ? 0 : 1); } Revision 1.6 of `driver.c' contains this: #include int main(int argc, char **argv) { parse(); if (argc != 1) { fprintf(stderr, "tc: No args expected.\n"); exit(1); } if (nerr == 0) gencode(); else fprintf(stderr, "No code generated.\n"); exit(!!nerr); } Your working copy of `driver.c', based on revision 1.4, contains this before you run `cvs update': #include #include void main() { init_scanner(); parse(); if (nerr == 0) gencode(); else fprintf(stderr, "No code generated.\n"); exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE); } You run `cvs update': $ cvs update driver.c RCS file: /usr/local/cvsroot/yoyodyne/tc/driver.c,v retrieving revision 1.4 retrieving revision 1.6 Merging differences between 1.4 and 1.6 into driver.c rcsmerge warning: overlaps during merge cvs update: conflicts found in driver.c C driver.c CVS tells you that there were some conflicts. Your original working file is saved unmodified in `.#driver.c.1.4'. The new version of `driver.c' contains this: #include #include int main(int argc, char **argv) { init_scanner(); parse(); if (argc != 1) { fprintf(stderr, "tc: No args expected.\n"); exit(1); } if (nerr == 0) gencode(); else fprintf(stderr, "No code generated.\n"); <<<<<<< driver.c exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE); ======= exit(!!nerr); >>>>>>> 1.6 } Note how all non-overlapping modifications are incorporated in your working copy, and that the overlapping section is clearly marked with `<<<<<<<', `=======' and `>>>>>>>'. You resolve the conflict by editing the file, removing the markers and the erroneous line. Suppose you end up with this file: #include #include int main(int argc, char **argv) { init_scanner(); parse(); if (argc != 1) { fprintf(stderr, "tc: No args expected.\n"); exit(1); } if (nerr == 0) gencode(); else fprintf(stderr, "No code generated.\n"); exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE); } You can now go ahead and commit this as revision 1.7. $ cvs commit -m "Initialize scanner. Use symbolic exit values." driver.c Checking in driver.c; /usr/local/cvsroot/yoyodyne/tc/driver.c,v <-- driver.c new revision: 1.7; previous revision: 1.6 done For your protection, CVS will refuse to check in a file if a conflict occurred and you have not resolved the conflict. Currently to resolve a conflict, you must change the timestamp on the file. In previous versions of CVS, you also needed to insure that the file contains no conflict markers. Because your file may legitimately contain conflict markers (that is, occurrences of `>>>>>>> ' at the start of a line that don't mark a conflict), the current version of CVS will print a warning and proceed to check in the file. If you use release 1.04 or later of pcl-cvs (a GNU Emacs front-end for CVS) you can use an Emacs package called emerge to help you resolve conflicts. See the documentation for pcl-cvs.  File: cvs.info, Node: Informing others, Next: Concurrency, Prev: Conflicts example, Up: Multiple developers 10.4 Informing others about commits =================================== It is often useful to inform others when you commit a new revision of a file. The `loginfo' file can be used to automate this process. *Note loginfo::. You can use these features of CVS to, for instance, instruct CVS to mail a message to all developers, or post a message to a local newsgroup.  File: cvs.info, Node: Concurrency, Next: Watches, Prev: Informing others, Up: Multiple developers 10.5 Several developers simultaneously attempting to run CVS ============================================================ If several developers try to run CVS at the same time, one may get the following message: [11:43:23] waiting for bach's lock in /usr/local/cvsroot/foo CVS will try again every 30 seconds, and either continue with the operation or print the message again, if it still needs to wait. If a lock seems to stick around for an undue amount of time, find the person holding the lock and ask them about the cvs command they are running. If they aren't running a cvs command, look in the repository directory mentioned in the message and remove files which they own whose names start with `#cvs.rfl', `#cvs.wfl', or `#cvs.lock'. Note that these locks are to protect CVS's internal data structures and have no relationship to the word "lock" in the sense used by RCS--which refers to reserved checkouts (*note Multiple developers::). Any number of people can be reading from a given repository at a time; only when someone is writing do the locks prevent other people from reading or writing. One might hope for the following property: If someone commits some changes in one cvs command, then an update by someone else will either get all the changes, or none of them. but CVS does _not_ have this property. For example, given the files a/one.c a/two.c b/three.c b/four.c if someone runs cvs ci a/two.c b/three.c and someone else runs `cvs update' at the same time, the person running `update' might get only the change to `b/three.c' and not the change to `a/two.c'.  File: cvs.info, Node: Watches, Next: Choosing a model, Prev: Concurrency, Up: Multiple developers 10.6 Mechanisms to track who is editing files ============================================= For many groups, use of CVS in its default mode is perfectly satisfactory. Users may sometimes go to check in a modification only to find that another modification has intervened, but they deal with it and proceed with their check in. Other groups prefer to be able to know who is editing what files, so that if two people try to edit the same file they can choose to talk about who is doing what when rather than be surprised at check in time. The features in this section allow such coordination, while retaining the ability of two developers to edit the same file at the same time. For maximum benefit developers should use `cvs edit' (not `chmod') to make files read-write to edit them, and `cvs release' (not `rm') to discard a working directory which is no longer in use, but CVS is not able to enforce this behavior. * Menu: * Setting a watch:: Telling CVS to watch certain files * Getting Notified:: Telling CVS to notify you * Editing files:: How to edit a file which is being watched * Watch information:: Information about who is watching and editing * Watches Compatibility:: Watches interact poorly with CVS 1.6 or earlier  File: cvs.info, Node: Setting a watch, Next: Getting Notified, Up: Watches 10.6.1 Telling CVS to watch certain files ----------------------------------------- To enable the watch features, you first specify that certain files are to be watched. -- Command: cvs watch on [`-lR'] [FILES]... Specify that developers should run `cvs edit' before editing FILES. CVS will create working copies of FILES read-only, to remind developers to run the `cvs edit' command before working on them. If FILES includes the name of a directory, CVS arranges to watch all files added to the corresponding repository directory, and sets a default for files added in the future; this allows the user to set notification policies on a per-directory basis. The contents of the directory are processed recursively, unless the `-l' option is given. The `-R' option can be used to force recursion if the `-l' option is set in `~/.cvsrc' (*note ~/.cvsrc::). If FILES is omitted, it defaults to the current directory. -- Command: cvs watch off [`-lR'] [FILES]... Do not create FILES read-only on checkout; thus, developers will not be reminded to use `cvs edit' and `cvs unedit'. The FILES and options are processed as for `cvs watch on'.  File: cvs.info, Node: Getting Notified, Next: Editing files, Prev: Setting a watch, Up: Watches 10.6.2 Telling CVS to notify you -------------------------------- You can tell CVS that you want to receive notifications about various actions taken on a file. You can do this without using `cvs watch on' for the file, but generally you will want to use `cvs watch on', to remind developers to use the `cvs edit' command. -- Command: cvs watch add [`-lR'] [`-a' ACTION]... [FILES]... Add the current user to the list of people to receive notification of work done on FILES. The `-a' option specifies what kinds of events CVS should notify the user about. ACTION is one of the following: `edit' Another user has applied the `cvs edit' command (described below) to a watched file. `commit' Another user has committed changes to one of the named FILES. `unedit' Another user has abandoned editing a file (other than by committing changes). They can do this in several ways, by: * applying the `cvs unedit' command (described below) to the file * applying the `cvs release' command (*note release::) to the file's parent directory (or recursively to a directory more than one level up) * deleting the file and allowing `cvs update' to recreate it `all' All of the above. `none' None of the above. (This is useful with `cvs edit', described below.) The `-a' option may appear more than once, or not at all. If omitted, the action defaults to `all'. The FILES and options are processed as for `cvs watch on'. -- Command: cvs watch remove [`-lR'] [`-a' ACTION]... [FILES]... Remove a notification request established using `cvs watch add'; the arguments are the same. If the `-a' option is present, only watches for the specified actions are removed. When the conditions exist for notification, CVS calls the `notify' administrative file. Edit `notify' as one edits the other administrative files (*note Intro administrative files::). This file follows the usual conventions for administrative files (*note syntax::), where each line is a regular expression followed by a command to execute. The command should contain a single occurrence of `%s' which will be replaced by the user to notify; the rest of the information regarding the notification will be supplied to the command on standard input. The standard thing to put in the `notify' file is the single line: ALL mail %s -s "CVS notification" This causes users to be notified by electronic mail. Note that if you set this up in the straightforward way, users receive notifications on the server machine. One could of course write a `notify' script which directed notifications elsewhere, but to make this easy, CVS allows you to associate a notification address for each user. To do so create a file `users' in `CVSROOT' with a line for each user in the format USER:VALUE. Then instead of passing the name of the user to be notified to `notify', CVS will pass the VALUE (normally an email address on some other machine). CVS does not notify you for your own changes. Currently this check is done based on whether the user name of the person taking the action which triggers notification matches the user name of the person getting notification. In fact, in general, the watches features only track one edit by each user. It probably would be more useful if watches tracked each working directory separately, so this behavior might be worth changing.  File: cvs.info, Node: Editing files, Next: Watch information, Prev: Getting Notified, Up: Watches 10.6.3 How to edit a file which is being watched ------------------------------------------------ Since a file which is being watched is checked out read-only, you cannot simply edit it. To make it read-write, and inform others that you are planning to edit it, use the `cvs edit' command. Some systems call this a "checkout", but CVS uses that term for obtaining a copy of the sources (*note Getting the source::), an operation which those systems call a "get" or a "fetch". -- Command: cvs edit [`-lR'] [`-a' ACTION]... [FILES]... Prepare to edit the working files FILES. CVS makes the FILES read-write, and notifies users who have requested `edit' notification for any of FILES. The `cvs edit' command accepts the same options as the `cvs watch add' command, and establishes a temporary watch for the user on FILES; CVS will remove the watch when FILES are `unedit'ed or `commit'ted. If the user does not wish to receive notifications, she should specify `-a none'. The FILES and the options are processed as for the `cvs watch' commands. Normally when you are done with a set of changes, you use the `cvs commit' command, which checks in your changes and returns the watched files to their usual read-only state. But if you instead decide to abandon your changes, or not to make any changes, you can use the `cvs unedit' command. -- Command: cvs unedit [`-lR'] [FILES]... Abandon work on the working files FILES, and revert them to the repository versions on which they are based. CVS makes those FILES read-only for which users have requested notification using `cvs watch on'. CVS notifies users who have requested `unedit' notification for any of FILES. The FILES and options are processed as for the `cvs watch' commands. If watches are not in use, the `unedit' command probably does not work, and the way to revert to the repository version is with the command `cvs update -C file' (*note update::). The meaning is not precisely the same; the latter may also bring in some changes which have been made in the repository since the last time you updated. When using client/server CVS, you can use the `cvs edit' and `cvs unedit' commands even if CVS is unable to successfully communicate with the server; the notifications will be sent upon the next successful CVS command.  File: cvs.info, Node: Watch information, Next: Watches Compatibility, Prev: Editing files, Up: Watches 10.6.4 Information about who is watching and editing ---------------------------------------------------- -- Command: cvs watchers [`-lR'] [FILES]... List the users currently watching changes to FILES. The report includes the files being watched, and the mail address of each watcher. The FILES and options are processed as for the `cvs watch' commands. -- Command: cvs editors [`-lR'] [FILES]... List the users currently working on FILES. The report includes the mail address of each user, the time when the user began working with the file, and the host and path of the working directory containing the file. The FILES and options are processed as for the `cvs watch' commands.  File: cvs.info, Node: Watches Compatibility, Prev: Watch information, Up: Watches 10.6.5 Using watches with old versions of CVS --------------------------------------------- If you use the watch features on a repository, it creates `CVS' directories in the repository and stores the information about watches in that directory. If you attempt to use CVS 1.6 or earlier with the repository, you get an error message such as the following (all on one line): cvs update: cannot open CVS/Entries for reading: No such file or directory and your operation will likely be aborted. To use the watch features, you must upgrade all copies of CVS which use that repository in local or server mode. If you cannot upgrade, use the `watch off' and `watch remove' commands to remove all watches, and that will restore the repository to a state which CVS 1.6 can cope with.  File: cvs.info, Node: Choosing a model, Prev: Watches, Up: Multiple developers 10.7 Choosing between reserved or unreserved checkouts ====================================================== Reserved and unreserved checkouts each have pros and cons. Let it be said that a lot of this is a matter of opinion or what works given different groups' working styles, but here is a brief description of some of the issues. There are many ways to organize a team of developers. CVS does not try to enforce a certain organization. It is a tool that can be used in several ways. Reserved checkouts can be very counter-productive. If two persons want to edit different parts of a file, there may be no reason to prevent either of them from doing so. Also, it is common for someone to take out a lock on a file, because they are planning to edit it, but then forget to release the lock. People, especially people who are familiar with reserved checkouts, often wonder how often conflicts occur if unreserved checkouts are used, and how difficult they are to resolve. The experience with many groups is that they occur rarely and usually are relatively straightforward to resolve. The rarity of serious conflicts may be surprising, until one realizes that they occur only when two developers disagree on the proper design for a given section of code; such a disagreement suggests that the team has not been communicating properly in the first place. In order to collaborate under _any_ source management regimen, developers must agree on the general design of the system; given this agreement, overlapping changes are usually straightforward to merge. In some cases unreserved checkouts are clearly inappropriate. If no merge tool exists for the kind of file you are managing (for example word processor files or files edited by Computer Aided Design programs), and it is not desirable to change to a program which uses a mergeable data format, then resolving conflicts is going to be unpleasant enough that you generally will be better off to simply avoid the conflicts instead, by using reserved checkouts. The watches features described above in *Note Watches:: can be considered to be an intermediate model between reserved checkouts and unreserved checkouts. When you go to edit a file, it is possible to find out who else is editing it. And rather than having the system simply forbid both people editing the file, it can tell you what the situation is and let you figure out whether it is a problem in that particular case or not. Therefore, for some groups it can be considered the best of both the reserved checkout and unreserved checkout worlds.  File: cvs.info, Node: Revision management, Next: Keyword substitution, Prev: Multiple developers, Up: Top 11 Revision management ********************** If you have read this far, you probably have a pretty good grasp on what CVS can do for you. This chapter talks a little about things that you still have to decide. If you are doing development on your own using CVS you could probably skip this chapter. The questions this chapter takes up become more important when more than one person is working in a repository. * Menu: * When to commit:: Some discussion on the subject  File: cvs.info, Node: When to commit, Up: Revision management 11.1 When to commit? ==================== Your group should decide which policy to use regarding commits. Several policies are possible, and as your experience with CVS grows you will probably find out what works for you. If you commit files too quickly you might commit files that do not even compile. If your partner updates his working sources to include your buggy file, he will be unable to compile the code. On the other hand, other persons will not be able to benefit from the improvements you make to the code if you commit very seldom, and conflicts will probably be more common. It is common to only commit files after making sure that they can be compiled. Some sites require that the files pass a test suite. Policies like this can be enforced using the commitinfo file (*note commitinfo::), but you should think twice before you enforce such a convention. By making the development environment too controlled it might become too regimented and thus counter-productive to the real goal, which is to get software written.  File: cvs.info, Node: Keyword substitution, Next: Tracking sources, Prev: Revision management, Up: Top 12 Keyword substitution *********************** As long as you edit source files inside a working directory you can always find out the state of your files via `cvs status' and `cvs log'. But as soon as you export the files from your development environment it becomes harder to identify which revisions they are. CVS can use a mechanism known as "keyword substitution" (or "keyword expansion") to help identifying the files. Embedded strings of the form `$KEYWORD$' and `$KEYWORD:...$' in a file are replaced with strings of the form `$KEYWORD:VALUE$' whenever you obtain a new revision of the file. * Menu: * Keyword list:: Keywords * Using keywords:: Using keywords * Avoiding substitution:: Avoiding substitution * Substitution modes:: Substitution modes * Log keyword:: Problems with the $Log$ keyword.  File: cvs.info, Node: Keyword list, Next: Using keywords, Up: Keyword substitution 12.1 Keyword List ================= This is a list of the keywords: `$Author$' The login name of the user who checked in the revision. `$Date$' The date and time (UTC) the revision was checked in. `$Header$' A standard header containing the full pathname of the RCS file, the revision number, the date (UTC), the author, the state, and the locker (if locked). Files will normally never be locked when you use CVS. `$Id$' Same as `$Header$', except that the RCS filename is without a path. `$Name$' Tag name used to check out this file. The keyword is expanded only if one checks out with an explicit tag name. For example, when running the command `cvs co -r first', the keyword expands to `Name: first'. `$Locker$' The login name of the user who locked the revision (empty if not locked, which is the normal case unless `cvs admin -l' is in use). `$Log$' The log message supplied during commit, preceded by a header containing the RCS filename, the revision number, the author, and the date (UTC). Existing log messages are _not_ replaced. Instead, the new log message is inserted after `$Log:...$'. Each new line is prefixed with the same string which precedes the `$Log' keyword. For example, if the file contains: /* Here is what people have been up to: * * $Log: frob.c,v $ * Revision 1.1 1997/01/03 14:23:51 joe * Add the superfrobnicate option * */ then additional lines which are added when expanding the `$Log' keyword will be preceded by ` * '. Unlike previous versions of CVS and RCS, the "comment leader" from the RCS file is not used. The `$Log' keyword is useful for accumulating a complete change log in a source file, but for several reasons it can be problematic. *Note Log keyword::. `$RCSfile$' The name of the RCS file without a path. `$Revision$' The revision number assigned to the revision. `$Source$' The full pathname of the RCS file. `$State$' The state assigned to the revision. States can be assigned with `cvs admin -s'--see *Note admin options::.  File: cvs.info, Node: Using keywords, Next: Avoiding substitution, Prev: Keyword list, Up: Keyword substitution 12.2 Using keywords =================== To include a keyword string you simply include the relevant text string, such as `$Id$', inside the file, and commit the file. CVS will automatically (Or, more accurately, as part of the update run that automatically happens after a commit.) expand the string as part of the commit operation. It is common to embed the `$Id$' string in the source files so that it gets passed through to generated files. For example, if you are managing computer program source code, you might include a variable which is initialized to contain that string. Or some C compilers may provide a `#pragma ident' directive. Or a document management system might provide a way to pass a string through to generated files. The `ident' command (which is part of the RCS package) can be used to extract keywords and their values from a file. This can be handy for text files, but it is even more useful for extracting keywords from binary files. $ ident samp.c samp.c: $Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $ $ gcc samp.c $ ident a.out a.out: $Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $ SCCS is another popular revision control system. It has a command, `what', which is very similar to `ident' and used for the same purpose. Many sites without RCS have SCCS. Since `what' looks for the character sequence `@(#)' it is easy to include keywords that are detected by either command. Simply prefix the keyword with the magic SCCS phrase, like this: static char *id="@(#) $Id: ab.c,v 1.5 1993/10/19 14:57:32 ceder Exp $";  File: cvs.info, Node: Avoiding substitution, Next: Substitution modes, Prev: Using keywords, Up: Keyword substitution 12.3 Avoiding substitution ========================== Keyword substitution has its disadvantages. Sometimes you might want the literal text string `$Author$' to appear inside a file without CVS interpreting it as a keyword and expanding it into something like `$Author: ceder $'. There is unfortunately no way to selectively turn off keyword substitution. You can use `-ko' (*note Substitution modes::) to turn off keyword substitution entirely. In many cases you can avoid using keywords in the source, even though they appear in the final product. For example, the source for this manual contains `$@asis{}Author$' whenever the text `$Author$' should appear. In `nroff' and `troff' you can embed the null-character `\&' inside the keyword for a similar effect.  File: cvs.info, Node: Substitution modes, Next: Log keyword, Prev: Avoiding substitution, Up: Keyword substitution 12.4 Substitution modes ======================= Each file has a stored default substitution mode, and each working directory copy of a file also has a substitution mode. The former is set by the `-k' option to `cvs add' and `cvs admin'; the latter is set by the `-k' or `-A' options to `cvs checkout' or `cvs update'. `cvs diff' and `cvs rdiff' also have `-k' options. For some examples, see *Note Binary files::, and *Note Merging and keywords::. The modes available are: `-kkv' Generate keyword strings using the default form, e.g. `$Revision: 5.7 $' for the `Revision' keyword. `-kkvl' Like `-kkv', except that a locker's name is always inserted if the given revision is currently locked. The locker's name is only relevant if `cvs admin -l' is in use. `-kk' Generate only keyword names in keyword strings; omit their values. For example, for the `Revision' keyword, generate the string `$Revision$' instead of `$Revision: 5.7 $'. This option is useful to ignore differences due to keyword substitution when comparing different revisions of a file (*note Merging and keywords::). `-ko' Generate the old keyword string, present in the working file just before it was checked in. For example, for the `Revision' keyword, generate the string `$Revision: 1.1 $' instead of `$Revision: 5.7 $' if that is how the string appeared when the file was checked in. `-kb' Like `-ko', but also inhibit conversion of line endings between the canonical form in which they are stored in the repository (linefeed only), and the form appropriate to the operating system in use on the client. For systems, like unix, which use linefeed only to terminate lines, this is the same as `-ko'. For more information on binary files, see *Note Binary files::. `-kv' Generate only keyword values for keyword strings. For example, for the `Revision' keyword, generate the string `5.7' instead of `$Revision: 5.7 $'. This can help generate files in programming languages where it is hard to strip keyword delimiters like `$Revision: $' from a string. However, further keyword substitution cannot be performed once the keyword names are removed, so this option should be used with care. One often would like to use `-kv' with `cvs export'--*note export::. But be aware that doesn't handle an export containing binary files correctly.  File: cvs.info, Node: Log keyword, Prev: Substitution modes, Up: Keyword substitution 12.5 Problems with the $Log$ keyword. ===================================== The `$Log$' keyword is somewhat controversial. As long as you are working on your development system the information is easily accessible even if you do not use the `$Log$' keyword--just do a `cvs log'. Once you export the file the history information might be useless anyhow. A more serious concern is that CVS is not good at handling `$Log$' entries when a branch is merged onto the main trunk. Conflicts often result from the merging operation. People also tend to "fix" the log entries in the file (correcting spelling mistakes and maybe even factual errors). If that is done the information from `cvs log' will not be consistent with the information inside the file. This may or may not be a problem in real life. It has been suggested that the `$Log$' keyword should be inserted _last_ in the file, and not in the files header, if it is to be used at all. That way the long list of change messages will not interfere with everyday source file browsing.  File: cvs.info, Node: Tracking sources, Next: Builds, Prev: Keyword substitution, Up: Top 13 Tracking third-party sources ******************************* If you modify a program to better fit your site, you probably want to include your modifications when the next release of the program arrives. CVS can help you with this task. In the terminology used in CVS, the supplier of the program is called a "vendor". The unmodified distribution from the vendor is checked in on its own branch, the "vendor branch". CVS reserves branch 1.1.1 for this use. When you modify the source and commit it, your revision will end up on the main trunk. When a new release is made by the vendor, you commit it on the vendor branch and copy the modifications onto the main trunk. Use the `import' command to create and update the vendor branch. When you import a new file, the vendor branch is made the `head' revision, so anyone that checks out a copy of the file gets that revision. When a local modification is committed it is placed on the main trunk, and made the `head' revision. * Menu: * First import:: Importing for the first time * Update imports:: Updating with the import command * Reverting local changes:: Reverting to the latest vendor release * Binary files in imports:: Binary files require special handling * Keywords in imports:: Keyword substitution might be undesirable * Multiple vendor branches:: What if you get sources from several places?  File: cvs.info, Node: First import, Next: Update imports, Up: Tracking sources 13.1 Importing for the first time ================================= Use the `import' command to check in the sources for the first time. When you use the `import' command to track third-party sources, the "vendor tag" and "release tags" are useful. The "vendor tag" is a symbolic name for the branch (which is always 1.1.1, unless you use the `-b BRANCH' flag--see *Note Multiple vendor branches::.). The "release tags" are symbolic names for a particular release, such as `FSF_0_04'. Note that `import' does _not_ change the directory in which you invoke it. In particular, it does not set up that directory as a CVS working directory; if you want to work with the sources import them first and then check them out into a different directory (*note Getting the source::). Suppose you have the sources to a program called `wdiff' in a directory `wdiff-0.04', and are going to make private modifications that you want to be able to use even when new releases are made in the future. You start by importing the source to your repository: $ cd wdiff-0.04 $ cvs import -m "Import of FSF v. 0.04" fsf/wdiff FSF_DIST WDIFF_0_04 The vendor tag is named `FSF_DIST' in the above example, and the only release tag assigned is `WDIFF_0_04'.  File: cvs.info, Node: Update imports, Next: Reverting local changes, Prev: First import, Up: Tracking sources 13.2 Updating with the import command ===================================== When a new release of the source arrives, you import it into the repository with the same `import' command that you used to set up the repository in the first place. The only difference is that you specify a different release tag this time: $ tar xfz wdiff-0.05.tar.gz $ cd wdiff-0.05 $ cvs import -m "Import of FSF v. 0.05" fsf/wdiff FSF_DIST WDIFF_0_05 *WARNING: If you use a release tag that already exists in one of the repository archives, files removed by an import may not be detected.* For files that have not been modified locally, the newly created revision becomes the head revision. If you have made local changes, `import' will warn you that you must merge the changes into the main trunk, and tell you to use `checkout -j' to do so: $ cvs checkout -jFSF_DIST:yesterday -jFSF_DIST wdiff The above command will check out the latest revision of `wdiff', merging the changes made on the vendor branch `FSF_DIST' since yesterday into the working copy. If any conflicts arise during the merge they should be resolved in the normal way (*note Conflicts example::). Then, the modified files may be committed. However, it is much better to use the two release tags rather than using a date on the branch as suggested above: $ cvs checkout -jWDIFF_0_04 -jWDIFF_0_05 wdiff The reason this is better is that using a date, as suggested above, assumes that you do not import more than one release of a product per day. More importantly, using the release tags allows CVS to detect files that were removed between the two vendor releases and mark them for removal. Since `import' has no way to detect removed files, you should do a merge like this even if `import' doesn't tell you to.  File: cvs.info, Node: Reverting local changes, Next: Binary files in imports, Prev: Update imports, Up: Tracking sources 13.3 Reverting to the latest vendor release =========================================== You can also revert local changes completely and return to the latest vendor release by changing the `head' revision back to the vendor branch on all files. For example, if you have a checked-out copy of the sources in `~/work.d/wdiff', and you want to revert to the vendor's version for all the files in that directory, you would type: $ cd ~/work.d/wdiff $ cvs admin -bFSF_DIST . You must specify the `-bFSF_DIST' without any space after the `-b'. *Note admin options::.  File: cvs.info, Node: Binary files in imports, Next: Keywords in imports, Prev: Reverting local changes, Up: Tracking sources 13.4 How to handle binary files with cvs import =============================================== Use the `-k' wrapper option to tell import which files are binary. *Note Wrappers::.  File: cvs.info, Node: Keywords in imports, Next: Multiple vendor branches, Prev: Binary files in imports, Up: Tracking sources 13.5 How to handle keyword substitution with cvs import ======================================================= The sources which you are importing may contain keywords (*note Keyword substitution::). For example, the vendor may use CVS or some other system which uses similar keyword expansion syntax. If you just import the files in the default fashion, then the keyword expansions supplied by the vendor will be replaced by keyword expansions supplied by your own copy of CVS. It may be more convenient to maintain the expansions supplied by the vendor, so that this information can supply information about the sources that you imported from the vendor. To maintain the keyword expansions supplied by the vendor, supply the `-ko' option to `cvs import' the first time you import the file. This will turn off keyword expansion for that file entirely, so if you want to be more selective you'll have to think about what you want and use the `-k' option to `cvs update' or `cvs admin' as appropriate.  File: cvs.info, Node: Multiple vendor branches, Prev: Keywords in imports, Up: Tracking sources 13.6 Multiple vendor branches ============================= All the examples so far assume that there is only one vendor from which you are getting sources. In some situations you might get sources from a variety of places. For example, suppose that you are dealing with a project where many different people and teams are modifying the software. There are a variety of ways to handle this, but in some cases you have a bunch of source trees lying around and what you want to do more than anything else is just to all put them in CVS so that you at least have them in one place. For handling situations in which there may be more than one vendor, you may specify the `-b' option to `cvs import'. It takes as an argument the vendor branch to import to. The default is `-b 1.1.1'. For example, suppose that there are two teams, the red team and the blue team, that are sending you sources. You want to import the red team's efforts to branch 1.1.1 and use the vendor tag RED. You want to import the blue team's efforts to branch 1.1.3 and use the vendor tag BLUE. So the commands you might use are: $ cvs import dir RED RED_1-0 $ cvs import -b 1.1.3 dir BLUE BLUE_1-5 Note that if your vendor tag does not match your `-b' option, CVS will not detect this case! For example, $ cvs import -b 1.1.3 dir RED RED_1-0 Be careful; this kind of mismatch is sure to sow confusion or worse. I can't think of a useful purpose for the ability to specify a mismatch here, but if you discover such a use, don't. CVS is likely to make this an error in some future release.  File: cvs.info, Node: Builds, Next: Special Files, Prev: Tracking sources, Up: Top 14 How your build system interacts with CVS ******************************************* As mentioned in the introduction, CVS does not contain software for building your software from source code. This section describes how various aspects of your build system might interact with CVS. One common question, especially from people who are accustomed to RCS, is how to make their build get an up to date copy of the sources. The answer to this with CVS is two-fold. First of all, since CVS itself can recurse through directories, there is no need to modify your `Makefile' (or whatever configuration file your build tool uses) to make sure each file is up to date. Instead, just use two commands, first `cvs -q update' and then `make' or whatever the command is to invoke your build tool. Secondly, you do not necessarily _want_ to get a copy of a change someone else made until you have finished your own work. One suggested approach is to first update your sources, then implement, build and test the change you were thinking of, and then commit your sources (updating first if necessary). By periodically (in between changes, using the approach just described) updating your entire tree, you ensure that your sources are sufficiently up to date. One common need is to record which versions of which source files went into a particular build. This kind of functionality is sometimes called "bill of materials" or something similar. The best way to do this with CVS is to use the `tag' command to record which versions went into a given build (*note Tags::). Using CVS in the most straightforward manner possible, each developer will have a copy of the entire source tree which is used in a particular build. If the source tree is small, or if developers are geographically dispersed, this is the preferred solution. In fact one approach for larger projects is to break a project down into smaller separately-compiled subsystems, and arrange a way of releasing them internally so that each developer need check out only those subsystems which they are actively working on. Another approach is to set up a structure which allows developers to have their own copies of some files, and for other files to access source files from a central location. Many people have come up with some such a system using features such as the symbolic link feature found in many operating systems, or the `VPATH' feature found in many versions of `make'. One build tool which is designed to help with this kind of thing is Odin (see `ftp://ftp.cs.colorado.edu/pub/distribs/odin').  File: cvs.info, Node: Special Files, Next: CVS commands, Prev: Builds, Up: Top 15 Special Files **************** In normal circumstances, CVS works only with regular files. Every file in a project is assumed to be persistent; it must be possible to open, read and close them; and so on. CVS also ignores file permissions and ownerships, leaving such issues to be resolved by the developer at installation time. In other words, it is not possible to "check in" a device into a repository; if the device file cannot be opened, CVS will refuse to handle it. Files also lose their ownerships and permissions during repository transactions.  File: cvs.info, Node: CVS commands, Next: Invoking CVS, Prev: Special Files, Up: Top Appendix A Guide to CVS commands ******************************** This appendix describes the overall structure of CVS commands, and describes some commands in detail (others are described elsewhere; for a quick reference to CVS commands, *note Invoking CVS::). * Menu: * Structure:: Overall structure of CVS commands * Exit status:: Indicating CVS's success or failure * ~/.cvsrc:: Default options with the ~/.cvsrc file * Global options:: Options you give to the left of cvs_command * Common options:: Options you give to the right of cvs_command * add:: Add files and directories to the repository * admin:: Administration * annotate:: What revision modified each line of a file? * checkout:: Checkout sources for editing * commit:: Check files into the repository * diff:: Show differences between revisions * export:: Export sources from CVS, similar to checkout * history:: Show status of files and users * import:: Import sources into CVS, using vendor branches * log:: Show log messages for files * rdiff:: 'patch' format diffs between releases * release:: Indicate that a directory is no longer in use * remove:: Remove files from active development * update:: Bring work tree in sync with repository  File: cvs.info, Node: Structure, Next: Exit status, Up: CVS commands A.1 Overall structure of CVS commands ===================================== The overall format of all CVS commands is: cvs [ cvs_options ] cvs_command [ command_options ] [ command_args ] `cvs' The name of the CVS program. `cvs_options' Some options that affect all sub-commands of CVS. These are described below. `cvs_command' One of several different sub-commands. Some of the commands have aliases that can be used instead; those aliases are noted in the reference manual for that command. There are only two situations where you may omit `cvs_command': `cvs -H' elicits a list of available commands, and `cvs -v' displays version information on CVS itself. `command_options' Options that are specific for the command. `command_args' Arguments to the commands. There is unfortunately some confusion between `cvs_options' and `command_options'. When given as a `cvs_option', some options only affect some of the commands. When given as a `command_option' it may have a different meaning, and be accepted by more commands. In other words, do not take the above categorization too seriously. Look at the documentation instead.  File: cvs.info, Node: Exit status, Next: ~/.cvsrc, Prev: Structure, Up: CVS commands A.2 CVS's exit status ===================== CVS can indicate to the calling environment whether it succeeded or failed by setting its "exit status". The exact way of testing the exit status will vary from one operating system to another. For example in a unix shell script the `$?' variable will be 0 if the last command returned a successful exit status, or greater than 0 if the exit status indicated failure. If CVS is successful, it returns a successful status; if there is an error, it prints an error message and returns a failure status. The one exception to this is the `cvs diff' command. It will return a successful status if it found no differences, or a failure status if there were differences or if there was an error. Because this behavior provides no good way to detect errors, in the future it is possible that `cvs diff' will be changed to behave like the other CVS commands.  File: cvs.info, Node: ~/.cvsrc, Next: Global options, Prev: Exit status, Up: CVS commands A.3 Default options and the ~/.cvsrc file ========================================= There are some `command_options' that are used so often that you might have set up an alias or some other means to make sure you always specify that option. One example (the one that drove the implementation of the `.cvsrc' support, actually) is that many people find the default output of the `diff' command to be very hard to read, and that either context diffs or unidiffs are much easier to understand. The `~/.cvsrc' file is a way that you can add default options to `cvs_commands' within cvs, instead of relying on aliases or other shell scripts. The format of the `~/.cvsrc' file is simple. The file is searched for a line that begins with the same name as the `cvs_command' being executed. If a match is found, then the remainder of the line is split up (at whitespace characters) into separate options and added to the command arguments _before_ any options from the command line. If a command has two names (e.g., `checkout' and `co'), the official name, not necessarily the one used on the command line, will be used to match against the file. So if this is the contents of the user's `~/.cvsrc' file: log -N diff -uN rdiff -u update -Pd checkout -P release -d the command `cvs checkout foo' would have the `-P' option added to the arguments, as well as `cvs co foo'. With the example file above, the output from `cvs diff foobar' will be in unidiff format. `cvs diff -c foobar' will provide context diffs, as usual. Getting "old" format diffs would be slightly more complicated, because `diff' doesn't have an option to specify use of the "old" format, so you would need `cvs -f diff foobar'. In place of the command name you can use `cvs' to specify global options (*note Global options::). For example the following line in `.cvsrc' cvs -z6 causes CVS to use compression level 6.  File: cvs.info, Node: Global options, Next: Common options, Prev: ~/.cvsrc, Up: CVS commands A.4 Global options ================== The available `cvs_options' (that are given to the left of `cvs_command') are: `--allow-root=ROOTDIR' Specify legal CVSROOT directory. See *Note Password authentication server::. `-a' Authenticate all communication between the client and the server. Only has an effect on the CVS client. As of this writing, this is only implemented when using a GSSAPI connection (*note GSSAPI authenticated::). Authentication prevents certain sorts of attacks involving hijacking the active TCP connection. Enabling authentication does not enable encryption. `-b BINDIR' In CVS 1.9.18 and older, this specified that RCS programs are in the BINDIR directory. Current versions of CVS do not run RCS programs; for compatibility this option is accepted, but it does nothing. `-T TEMPDIR' Use TEMPDIR as the directory where temporary files are located. Overrides the setting of the `$TMPDIR' environment variable and any precompiled directory. This parameter should be specified as an absolute pathname. (When running client/server, `-T' affects only the local process; specifying `-T' for the client has no effect on the server and vice versa.) `-d CVS_ROOT_DIRECTORY' Use CVS_ROOT_DIRECTORY as the root directory pathname of the repository. Overrides the setting of the `$CVSROOT' environment variable. See *Note Repository::. `-e EDITOR' Use EDITOR to enter revision log information. Overrides the setting of the `$CVSEDITOR' and `$EDITOR' environment variables. For more information, see *Note Committing your changes::. `-f' Do not read the `~/.cvsrc' file. This option is most often used because of the non-orthogonality of the CVS option set. For example, the `cvs log' option `-N' (turn off display of tag names) does not have a corresponding option to turn the display on. So if you have `-N' in the `~/.cvsrc' entry for `log', you may need to use `-f' to show the tag names. `-H' `--help' Display usage information about the specified `cvs_command' (but do not actually execute the command). If you don't specify a command name, `cvs -H' displays overall help for CVS, including a list of other help options. `-n' Do not change any files. Attempt to execute the `cvs_command', but only to issue reports; do not remove, update, or merge any existing files, or create any new files. Note that CVS will not necessarily produce exactly the same output as without `-n'. In some cases the output will be the same, but in other cases CVS will skip some of the processing that would have been required to produce the exact same output. `-Q' Cause the command to be really quiet; the command will only generate output for serious problems. `-q' Cause the command to be somewhat quiet; informational messages, such as reports of recursion through subdirectories, are suppressed. `-r' Make new working files read-only. Same effect as if the `$CVSREAD' environment variable is set (*note Environment variables::). The default is to make working files writable, unless watches are on (*note Watches::). `-s VARIABLE=VALUE' Set a user variable (*note Variables::). `-t' Trace program execution; display messages showing the steps of CVS activity. Particularly useful with `-n' to explore the potential impact of an unfamiliar command. `-v' `--version' Display version and copyright information for CVS. `-w' Make new working files read-write. Overrides the setting of the `$CVSREAD' environment variable. Files are created read-write by default, unless `$CVSREAD' is set or `-r' is given. `-x' Encrypt all communication between the client and the server. Only has an effect on the CVS client. As of this writing, this is only implemented when using a GSSAPI connection (*note GSSAPI authenticated::) or a Kerberos connection (*note Kerberos authenticated::). Enabling encryption implies that message traffic is also authenticated. Encryption support is not available by default; it must be enabled using a special configure option, `--enable-encryption', when you build CVS. `-z GZIP-LEVEL' Set the compression level. Valid levels are 1 (high speed, low compression) to 9 (low speed, high compression), or 0 to disable compression (the default). Only has an effect on the CVS client.  File: cvs.info, Node: Common options, Next: add, Prev: Global options, Up: CVS commands A.5 Common command options ========================== This section describes the `command_options' that are available across several CVS commands. These options are always given to the right of `cvs_command'. Not all commands support all of these options; each option is only supported for commands where it makes sense. However, when a command has one of these options you can almost always count on the same behavior of the option as in other commands. (Other command options, which are listed with the individual commands, may have different behavior from one CVS command to the other). *The `history' command is an exception; it supports many options that conflict even with these standard options.* `-D DATE_SPEC' Use the most recent revision no later than DATE_SPEC. DATE_SPEC is a single argument, a date description specifying a date in the past. The specification is "sticky" when you use it to make a private copy of a source file; that is, when you get a working file using `-D', CVS records the date you specified, so that further updates in the same directory will use the same date (for more information on sticky tags/dates, *note Sticky tags::). `-D' is available with the `annotate', `checkout', `diff', `export', `history', `rdiff', `rtag', and `update' commands. (The `history' command uses this option in a slightly different way; *note history options::). A wide variety of date formats are supported by CVS. The most standard ones are ISO8601 (from the International Standards Organization) and the Internet e-mail standard (specified in RFC822 as amended by RFC1123). ISO8601 dates have many variants but a few examples are: 1972-09-24 1972-09-24 20:05 There are a lot more ISO8601 date formats, and CVS accepts many of them, but you probably don't want to hear the _whole_ long story :-). In addition to the dates allowed in Internet e-mail itself, CVS also allows some of the fields to be omitted. For example: 24 Sep 1972 20:05 24 Sep The date is interpreted as being in the local timezone, unless a specific timezone is specified. These two date formats are preferred. However, CVS currently accepts a wide variety of other date formats. They are intentionally not documented here in any detail, and future versions of CVS might not accept all of them. One such format is `MONTH/DAY/YEAR'. This may confuse people who are accustomed to having the month and day in the other order; `1/4/96' is January 4, not April 1. Remember to quote the argument to the `-D' flag so that your shell doesn't interpret spaces as argument separators. A command using the `-D' flag can look like this: $ cvs diff -D "1 hour ago" cvs.texinfo `-f' When you specify a particular date or tag to CVS commands, they normally ignore files that do not contain the tag (or did not exist prior to the date) that you specified. Use the `-f' option if you want files retrieved even when there is no match for the tag or date. (The most recent revision of the file will be used). Note that even with `-f', a tag that you specify must exist (that is, in some file, not necessary in every file). This is so that CVS will continue to give an error if you mistype a tag name. `-f' is available with these commands: `annotate', `checkout', `export', `rdiff', `rtag', and `update'. *WARNING: The `commit' and `remove' commands also have a `-f' option, but it has a different behavior for those commands. See *Note commit options::, and *Note Removing files::.* `-k KFLAG' Alter the default processing of keywords. See *Note Keyword substitution::, for the meaning of KFLAG. Your KFLAG specification is "sticky" when you use it to create a private copy of a source file; that is, when you use this option with the `checkout' or `update' commands, CVS associates your selected KFLAG with the file, and continues to use it with future update commands on the same file until you specify otherwise. The `-k' option is available with the `add', `checkout', `diff', `rdiff', `import' and `update' commands. `-l' Local; run only in current working directory, rather than recursing through subdirectories. Available with the following commands: `annotate', `checkout', `commit', `diff', `edit', `editors', `export', `log', `rdiff', `remove', `rtag', `status', `tag', `unedit', `update', `watch', and `watchers'. `-m MESSAGE' Use MESSAGE as log information, instead of invoking an editor. Available with the following commands: `add', `commit' and `import'. `-n' Do not run any tag program. (A program can be specified to run in the modules database (*note modules::); this option bypasses it). *This is not the same as the `cvs -n' program option, which you can specify to the left of a cvs command!* Available with the `checkout', `export', and `rtag' commands. `-P' Prune empty directories. See *Note Removing directories::. `-p' Pipe the files retrieved from the repository to standard output, rather than writing them in the current directory. Available with the `checkout' and `update' commands. `-R' Process directories recursively. This is on by default. Available with the following commands: `annotate', `checkout', `commit', `diff', `edit', `editors', `export', `rdiff', `remove', `rtag', `status', `tag', `unedit', `update', `watch', and `watchers'. `-r TAG' Use the revision specified by the TAG argument instead of the default "head" revision. As well as arbitrary tags defined with the `tag' or `rtag' command, two special tags are always available: `HEAD' refers to the most recent version available in the repository, and `BASE' refers to the revision you last checked out into the current working directory. The tag specification is sticky when you use this with `checkout' or `update' to make your own copy of a file: CVS remembers the tag and continues to use it on future update commands, until you specify otherwise (for more information on sticky tags/dates, *note Sticky tags::). The tag can be either a symbolic or numeric tag, as described in *Note Tags::, or the name of a branch, as described in *Note Branching and merging::. When a command expects a specific revision, the name of a branch is interpreted as the most recent revision on that branch. Specifying the `-q' global option along with the `-r' command option is often useful, to suppress the warning messages when the RCS file does not contain the specified tag. *This is not the same as the overall `cvs -r' option, which you can specify to the left of a CVS command!* `-r' is available with the `annotate', `checkout', `commit', `diff', `history', `export', `rdiff', `rtag', and `update' commands. `-W' Specify file names that should be filtered. You can use this option repeatedly. The spec can be a file name pattern of the same type that you can specify in the `.cvswrappers' file. Available with the following commands: `import', and `update'.  File: cvs.info, Node: add, Next: admin, Prev: Common options, Up: CVS commands A.6 add--Add files and directories to the repository ==================================================== * Synopsis: add [-k rcs-kflag] [-m message] files... * Requires: repository, working directory. * Changes: repository, working directory. The `add' command is used to present new files and directories for addition into the CVS repository. When `add' is used on a directory, a new directory is created in the repository immediately. When used on a file, only the working directory is updated. Changes to the repository are not made until the `commit' command is used on the newly added file. The `add' command also resurrects files that have been previously removed. This can be done before or after the `commit' command is used to finalize the removal of files. Resurrected files are restored into the working directory at the time the `add' command is executed. * Menu: * add options:: add options * add examples:: add examples  File: cvs.info, Node: add options, Next: add examples, Up: add A.6.1 add options ----------------- These standard options are supported by `add' (*note Common options::, for a complete description of them): `-k KFLAG' Process keywords according to KFLAG. See *Note Keyword substitution::. This option is sticky; future updates of this file in this working directory will use the same KFLAG. The `status' command can be viewed to see the sticky options. For more information on the `status' command, *Note Invoking CVS::. `-m MESSAGE' Use MESSAGE as the log message, instead of invoking an editor.  File: cvs.info, Node: add examples, Prev: add options, Up: add A.6.2 add examples ------------------ A.6.2.1 Adding a directory .......................... $ mkdir doc $ cvs add doc Directory /path/to/repository/doc added to the repository A.6.2.2 Adding a file ..................... $ >TODO $ cvs add TODO cvs add: scheduling file `TODO' for addition cvs add: use 'cvs commit' to add this file permanently A.6.2.3 Undoing a `remove' command .................................. $ rm -f makefile $ cvs remove makefile cvs remove: scheduling `makefile' for removal cvs remove: use 'cvs commit' to remove this file permanently $ cvs add makefile U makefile cvs add: makefile, version 1.2, resurrected  File: cvs.info, Node: admin, Next: annotate, Prev: add, Up: CVS commands A.7 admin--Administration ========================= * Requires: repository, working directory. * Changes: repository. * Synonym: rcs This is the CVS interface to assorted administrative facilities. Some of them have questionable usefulness for CVS but exist for historical purposes. Some of the questionable options are likely to disappear in the future. This command _does_ work recursively, so extreme care should be used. On unix, if there is a group named `cvsadmin', only members of that group can run `cvs admin' (except for the `cvs admin -k' command, which can be run by anybody). This group should exist on the server, or any system running the non-client/server CVS. To disallow `cvs admin' for all users, create a group with no users in it. On NT, the `cvsadmin' feature does not exist and all users can run `cvs admin'. * Menu: * admin options:: admin options  File: cvs.info, Node: admin options, Up: admin A.7.1 admin options ------------------- Some of these options have questionable usefulness for CVS but exist for historical purposes. Some even make it impossible to use CVS until you undo the effect! `-AOLDFILE' Might not work together with CVS. Append the access list of OLDFILE to the access list of the RCS file. `-aLOGINS' Might not work together with CVS. Append the login names appearing in the comma-separated list LOGINS to the access list of the RCS file. `-b[REV]' Set the default branch to REV. In CVS, you normally do not manipulate default branches; sticky tags (*note Sticky tags::) are a better way to decide which branch you want to work on. There is one reason to run `cvs admin -b': to revert to the vendor's version when using vendor branches (*note Reverting local changes::). There can be no space between `-b' and its argument. `-cSTRING' Sets the comment leader to STRING. The comment leader is not used by current versions of CVS or RCS 5.7. Therefore, you can almost surely not worry about it. See *Note Keyword substitution::. `-e[LOGINS]' Might not work together with CVS. Erase the login names appearing in the comma-separated list LOGINS from the access list of the RCS file. If LOGINS is omitted, erase the entire access list. There can be no space between `-e' and its argument. `-I' Run interactively, even if the standard input is not a terminal. This option does not work with the client/server CVS and is likely to disappear in a future release of CVS. `-i' Useless with CVS. This creates and initializes a new RCS file, without depositing a revision. With CVS, add files with the `cvs add' command (*note Adding files::). `-kSUBST' Set the default keyword substitution to SUBST. See *Note Keyword substitution::. Giving an explicit `-k' option to `cvs update', `cvs export', or `cvs checkout' overrides this default. `-l[REV]' Lock the revision with number REV. If a branch is given, lock the latest revision on that branch. If REV is omitted, lock the latest revision on the default branch. There can be no space between `-l' and its argument. This can be used in conjunction with the `rcslock.pl' script in the `contrib' directory of the CVS source distribution to provide reserved checkouts (where only one user can be editing a given file at a time). See the comments in that file for details (and see the `README' file in that directory for disclaimers about the unsupported nature of contrib). According to comments in that file, locking must set to strict (which is the default). `-L' Set locking to strict. Strict locking means that the owner of an RCS file is not exempt from locking for checkin. For use with CVS, strict locking must be set; see the discussion under the `-l' option above. `-mREV:MSG' Replace the log message of revision REV with MSG. `-NNAME[:[REV]]' Act like `-n', except override any previous assignment of NAME. For use with magic branches, see *Note Magic branch numbers::. `-nNAME[:[REV]]' Associate the symbolic name NAME with the branch or revision REV. It is normally better to use `cvs tag' or `cvs rtag' instead. Delete the symbolic name if both `:' and REV are omitted; otherwise, print an error message if NAME is already associated with another number. If REV is symbolic, it is expanded before association. A REV consisting of a branch number followed by a `.' stands for the current latest revision in the branch. A `:' with an empty REV stands for the current latest revision on the default branch, normally the trunk. For example, `cvs admin -nNAME:' associates NAME with the current latest revision of all the RCS files; this contrasts with `cvs admin -nNAME:$' which associates NAME with the revision numbers extracted from keyword strings in the corresponding working files. `-oRANGE' Deletes ("outdates") the revisions given by RANGE. Note that this command can be quite dangerous unless you know _exactly_ what you are doing (for example see the warnings below about how the REV1:REV2 syntax is confusing). If you are short on disc this option might help you. But think twice before using it--there is no way short of restoring the latest backup to undo this command! If you delete different revisions than you planned, either due to carelessness or (heaven forbid) a CVS bug, there is no opportunity to correct the error before the revisions are deleted. It probably would be a good idea to experiment on a copy of the repository first. Specify RANGE in one of the following ways: `REV1::REV2' Collapse all revisions between rev1 and rev2, so that CVS only stores the differences associated with going from rev1 to rev2, not intermediate steps. For example, after `-o 1.3::1.5' one can retrieve revision 1.3, revision 1.5, or the differences to get from 1.3 to 1.5, but not the revision 1.4, or the differences between 1.3 and 1.4. Other examples: `-o 1.3::1.4' and `-o 1.3::1.3' have no effect, because there are no intermediate revisions to remove. `::REV' Collapse revisions between the beginning of the branch containing REV and REV itself. The branchpoint and REV are left intact. For example, `-o ::1.3.2.6' deletes revision 1.3.2.1, revision 1.3.2.5, and everything in between, but leaves 1.3 and 1.3.2.6 intact. `REV::' Collapse revisions between REV and the end of the branch containing REV. Revision REV is left intact but the head revision is deleted. `REV' Delete the revision REV. For example, `-o 1.3' is equivalent to `-o 1.2::1.4'. `REV1:REV2' Delete the revisions from REV1 to REV2, inclusive, on the same branch. One will not be able to retrieve REV1 or REV2 or any of the revisions in between. For example, the command `cvs admin -oR_1_01:R_1_02 .' is rarely useful. It means to delete revisions up to, and including, the tag R_1_02. But beware! If there are files that have not changed between R_1_02 and R_1_03 the file will have _the same_ numerical revision number assigned to the tags R_1_02 and R_1_03. So not only will it be impossible to retrieve R_1_02; R_1_03 will also have to be restored from the tapes! In most cases you want to specify REV1::REV2 instead. `:REV' Delete revisions from the beginning of the branch containing REV up to and including REV. `REV:' Delete revisions from revision REV, including REV itself, to the end of the branch containing REV. None of the revisions to be deleted may have branches or locks. If any of the revisions to be deleted have symbolic names, and one specifies one of the `::' syntaxes, then CVS will give an error and not delete any revisions. If you really want to delete both the symbolic names and the revisions, first delete the symbolic names with `cvs tag -d', then run `cvs admin -o'. If one specifies the non-`::' syntaxes, then CVS will delete the revisions but leave the symbolic names pointing to nonexistent revisions. This behavior is preserved for compatibility with previous versions of CVS, but because it isn't very useful, in the future it may change to be like the `::' case. Due to the way CVS handles branches REV cannot be specified symbolically if it is a branch. See *Note Magic branch numbers:: for an explanation. Make sure that no-one has checked out a copy of the revision you outdate. Strange things will happen if he starts to edit it and tries to check it back in. For this reason, this option is not a good way to take back a bogus commit; commit a new revision undoing the bogus change instead (*note Merging two revisions::). `-q' Run quietly; do not print diagnostics. `-sSTATE[:REV]' Useful with CVS. Set the state attribute of the revision REV to STATE. If REV is a branch number, assume the latest revision on that branch. If REV is omitted, assume the latest revision on the default branch. Any identifier is acceptable for STATE. A useful set of states is `Exp' (for experimental), `Stab' (for stable), and `Rel' (for released). By default, the state of a new revision is set to `Exp' when it is created. The state is visible in the output from CVS LOG (*note log::), and in the `$Log$' and `$State$' keywords (*note Keyword substitution::). Note that CVS uses the `dead' state for its own purposes (*note Attic::); to take a file to or from the `dead' state use commands like `cvs remove' and `cvs add' (*note Adding and removing::), not `cvs admin -s'. `-t[FILE]' Useful with CVS. Write descriptive text from the contents of the named FILE into the RCS file, deleting the existing text. The FILE pathname may not begin with `-'. The descriptive text can be seen in the output from `cvs log' (*note log::). There can be no space between `-t' and its argument. If FILE is omitted, obtain the text from standard input, terminated by end-of-file or by a line containing `.' by itself. Prompt for the text if interaction is possible; see `-I'. `-t-STRING' Similar to `-tFILE'. Write descriptive text from the STRING into the RCS file, deleting the existing text. There can be no space between `-t' and its argument. `-U' Set locking to non-strict. Non-strict locking means that the owner of a file need not lock a revision for checkin. For use with CVS, strict locking must be set; see the discussion under the `-l' option above. `-u[REV]' See the option `-l' above, for a discussion of using this option with CVS. Unlock the revision with number REV. If a branch is given, unlock the latest revision on that branch. If REV is omitted, remove the latest lock held by the caller. Normally, only the locker of a revision may unlock it; somebody else unlocking a revision breaks the lock. This causes the original locker to be sent a `commit' notification (*note Getting Notified::). There can be no space between `-u' and its argument. `-VN' In previous versions of CVS, this option meant to write an RCS file which would be acceptable to RCS version N, but it is now obsolete and specifying it will produce an error. `-xSUFFIXES' In previous versions of CVS, this was documented as a way of specifying the names of the RCS files. However, CVS has always required that the RCS files used by CVS end in `,v', so this option has never done anything useful.  File: cvs.info, Node: annotate, Next: checkout, Prev: admin, Up: CVS commands A.8 annotate--What revision modified each line of a file? ========================================================= * Synopsis: annotate [options] files... * Requires: repository. * Synonym: blame * Changes: nothing. For each file in FILES, print the head revision of the trunk, together with information on the last modification for each line. * Menu: * annotate options:: annotate options * annotate example:: annotate example  File: cvs.info, Node: annotate options, Next: annotate example, Up: annotate A.8.1 annotate options ---------------------- These standard options are supported by `annotate' (*note Common options:: for a complete description of them): `-l' Local directory only, no recursion. `-R' Process directories recursively. `-f' Use head revision if tag/date not found. `-F' Annotate binary files. `-r REVISION' Annotate file as of specified revision/tag. `-D DATE' Annotate file as of specified date.  File: cvs.info, Node: annotate example, Prev: annotate options, Up: annotate A.8.2 annotate example ---------------------- For example: $ cvs annotate ssfile Annotations for ssfile *************** 1.1 (mary 27-Mar-96): ssfile line 1 1.2 (joe 28-Mar-96): ssfile line 2 The file `ssfile' currently contains two lines. The `ssfile line 1' line was checked in by `mary' on March 27. Then, on March 28, `joe' added a line `ssfile line 2', without modifying the `ssfile line 1' line. This report doesn't tell you anything about lines which have been deleted or replaced; you need to use `cvs diff' for that (*note diff::). The options to `cvs annotate' are listed in *Note Invoking CVS::, and can be used to select the files and revisions to annotate. The options are described in more detail there and in *Note Common options::.  File: cvs.info, Node: checkout, Next: commit, Prev: annotate, Up: CVS commands A.9 checkout--Check out sources for editing =========================================== * Synopsis: checkout [options] modules... * Requires: repository. * Changes: working directory. * Synonyms: co, get Create or update a working directory containing copies of the source files specified by MODULES. You must execute `checkout' before using most of the other CVS commands, since most of them operate on your working directory. The MODULES are either symbolic names for some collection of source directories and files, or paths to directories or files in the repository. The symbolic names are defined in the `modules' file. See *Note modules::. Depending on the modules you specify, `checkout' may recursively create directories and populate them with the appropriate source files. You can then edit these source files at any time (regardless of whether other software developers are editing their own copies of the sources); update them to include new changes applied by others to the source repository; or commit your work as a permanent change to the source repository. Note that `checkout' is used to create directories. The top-level directory created is always added to the directory where `checkout' is invoked, and usually has the same name as the specified module. In the case of a module alias, the created sub-directory may have a different name, but you can be sure that it will be a sub-directory, and that `checkout' will show the relative path leading to each file as it is extracted into your private work area (unless you specify the `-Q' global option). The files created by `checkout' are created read-write, unless the `-r' option to CVS (*note Global options::) is specified, the `CVSREAD' environment variable is specified (*note Environment variables::), or a watch is in effect for that file (*note Watches::). Note that running `checkout' on a directory that was already built by a prior `checkout' is also permitted. This is similar to specifying the `-d' option to the `update' command in the sense that new directories that have been created in the repository will appear in your work area. However, `checkout' takes a module name whereas `update' takes a directory name. Also to use `checkout' this way it must be run from the top level directory (where you originally ran `checkout' from), so before you run `checkout' to update an existing directory, don't forget to change your directory to the top level directory. For the output produced by the `checkout' command, *Note update output::. * Menu: * checkout options:: checkout options * checkout examples:: checkout examples  File: cvs.info, Node: checkout options, Next: checkout examples, Up: checkout A.9.1 checkout options ---------------------- These standard options are supported by `checkout' (*note Common options:: for a complete description of them): `-D DATE' Use the most recent revision no later than DATE. This option is sticky, and implies `-P'. See *Note Sticky tags:: for more information on sticky tags/dates. `-f' Only useful with the `-D DATE' or `-r TAG' flags. If no matching revision is found, retrieve the most recent revision (instead of ignoring the file). `-k KFLAG' Process keywords according to KFLAG. See *Note Keyword substitution::. This option is sticky; future updates of this file in this working directory will use the same KFLAG. The `status' command can be viewed to see the sticky options. See *Note Invoking CVS:: for more information on the `status' command. `-l' Local; run only in current working directory. `-n' Do not run any checkout program (as specified with the `-o' option in the modules file; *note modules::). `-P' Prune empty directories. See *Note Moving directories::. `-p' Pipe files to the standard output. `-R' Checkout directories recursively. This option is on by default. `-r TAG' Use revision TAG. This option is sticky, and implies `-P'. See *Note Sticky tags::, for more information on sticky tags/dates. In addition to those, you can use these special command options with `checkout': `-A' Reset any sticky tags, dates, or `-k' options. Does not reset sticky `-k' options on modified files. See *Note Sticky tags:: for more information on sticky tags/dates. `-c' Copy the module file, sorted, to the standard output, instead of creating or modifying any files or directories in your working directory. `-d DIR' Create a directory called DIR for the working files, instead of using the module name. In general, using this flag is equivalent to using `mkdir DIR; cd DIR' followed by the checkout command without the `-d' flag. There is an important exception, however. It is very convenient when checking out a single item to have the output appear in a directory that doesn't contain empty intermediate directories. In this case _only_, CVS tries to "shorten" pathnames to avoid those empty directories. For example, given a module `foo' that contains the file `bar.c', the command `cvs co -d dir foo' will create directory `dir' and place `bar.c' inside. Similarly, given a module `bar' which has subdirectory `baz' wherein there is a file `quux.c', the command `cvs co -d dir bar/baz' will create directory `dir' and place `quux.c' inside. Using the `-N' flag will defeat this behavior. Given the same module definitions above, `cvs co -N -d dir foo' will create directories `dir/foo' and place `bar.c' inside, while `cvs co -N -d dir bar/baz' will create directories `dir/bar/baz' and place `quux.c' inside. `-j TAG' With two `-j' options, merge changes from the revision specified with the first `-j' option to the revision specified with the second `j' option, into the working directory. With one `-j' option, merge changes from the ancestor revision to the revision specified with the `-j' option, into the working directory. The ancestor revision is the common ancestor of the revision which the working directory is based on, and the revision specified in the `-j' option. In addition, each -j option can contain an optional date specification which, when used with branches, can limit the chosen revision to one within a specific date. An optional date is specified by adding a colon (:) to the tag: `-jSYMBOLIC_TAG:DATE_SPECIFIER'. See *Note Branching and merging::. `-N' Only useful together with `-d DIR'. With this option, CVS will not "shorten" module paths in your working directory when you check out a single module. See the `-d' flag for examples and a discussion. `-s' Like `-c', but include the status of all modules, and sort it by the status string. See *Note modules::, for info about the `-s' option that is used inside the modules file to set the module status.  File: cvs.info, Node: checkout examples, Prev: checkout options, Up: checkout A.9.2 checkout examples ----------------------- Get a copy of the module `tc': $ cvs checkout tc Get a copy of the module `tc' as it looked one day ago: $ cvs checkout -D yesterday tc  File: cvs.info, Node: commit, Next: diff, Prev: checkout, Up: CVS commands A.10 commit--Check files into the repository ============================================ * Synopsis: commit [-lRf] [-m 'log_message' | -F file] [-r revision] [files...] * Requires: working directory, repository. * Changes: repository. * Synonym: ci Use `commit' when you want to incorporate changes from your working source files into the source repository. If you don't specify particular files to commit, all of the files in your working current directory are examined. `commit' is careful to change in the repository only those files that you have really changed. By default (or if you explicitly specify the `-R' option), files in subdirectories are also examined and committed if they have changed; you can use the `-l' option to limit `commit' to the current directory only. `commit' verifies that the selected files are up to date with the current revisions in the source repository; it will notify you, and exit without committing, if any of the specified files must be made current first with `update' (*note update::). `commit' does not call the `update' command for you, but rather leaves that for you to do when the time is right. When all is well, an editor is invoked to allow you to enter a log message that will be written to one or more logging programs (*note modules::, and *note loginfo::) and placed in the RCS file inside the repository. This log message can be retrieved with the `log' command; *Note log::. You can specify the log message on the command line with the `-m MESSAGE' option, and thus avoid the editor invocation, or use the `-F FILE' option to specify that the argument file contains the log message. * Menu: * commit options:: commit options * commit examples:: commit examples  File: cvs.info, Node: commit options, Next: commit examples, Up: commit A.10.1 commit options --------------------- These standard options are supported by `commit' (*note Common options:: for a complete description of them): `-l' Local; run only in current working directory. `-R' Commit directories recursively. This is on by default. `-r REVISION' Commit to REVISION. REVISION must be either a branch, or a revision on the main trunk that is higher than any existing revision number (*note Assigning revisions::). You cannot commit to a specific revision on a branch. `commit' also supports these options: `-F FILE' Read the log message from FILE, instead of invoking an editor. `-f' Note that this is not the standard behavior of the `-f' option as defined in *Note Common options::. Force CVS to commit a new revision even if you haven't made any changes to the file. If the current revision of FILE is 1.7, then the following two commands are equivalent: $ cvs commit -f FILE $ cvs commit -r 1.8 FILE The `-f' option disables recursion (i.e., it implies `-l'). To force CVS to commit a new revision for all files in all subdirectories, you must use `-f -R'. `-m MESSAGE' Use MESSAGE as the log message, instead of invoking an editor.  File: cvs.info, Node: commit examples, Prev: commit options, Up: commit A.10.2 commit examples ---------------------- A.10.2.1 Committing to a branch ............................... You can commit to a branch revision (one that has an even number of dots) with the `-r' option. To create a branch revision, use the `-b' option of the `rtag' or `tag' commands (*note Branching and merging::). Then, either `checkout' or `update' can be used to base your sources on the newly created branch. From that point on, all `commit' changes made within these working sources will be automatically added to a branch revision, thereby not disturbing main-line development in any way. For example, if you had to create a patch to the 1.2 version of the product, even though the 2.0 version is already under development, you might do: $ cvs rtag -b -r FCS1_2 FCS1_2_Patch product_module $ cvs checkout -r FCS1_2_Patch product_module $ cd product_module [[ hack away ]] $ cvs commit This works automatically since the `-r' option is sticky. A.10.2.2 Creating the branch after editing .......................................... Say you have been working on some extremely experimental software, based on whatever revision you happened to checkout last week. If others in your group would like to work on this software with you, but without disturbing main-line development, you could commit your change to a new branch. Others can then checkout your experimental stuff and utilize the full benefit of CVS conflict resolution. The scenario might look like: [[ hacked sources are present ]] $ cvs tag -b EXPR1 $ cvs update -r EXPR1 $ cvs commit The `update' command will make the `-r EXPR1' option sticky on all files. Note that your changes to the files will never be removed by the `update' command. The `commit' will automatically commit to the correct branch, because the `-r' is sticky. You could also do like this: [[ hacked sources are present ]] $ cvs tag -b EXPR1 $ cvs commit -r EXPR1 but then, only those files that were changed by you will have the `-r EXPR1' sticky flag. If you hack away, and commit without specifying the `-r EXPR1' flag, some files may accidentally end up on the main trunk. To work with you on the experimental change, others would simply do $ cvs checkout -r EXPR1 whatever_module  File: cvs.info, Node: diff, Next: export, Prev: commit, Up: CVS commands A.11 diff--Show differences between revisions ============================================= * Synopsis: diff [-lR] [-k kflag] [format_options] [[-r rev1 | -D date1] [-r rev2 | -D date2]] [files...] * Requires: working directory, repository. * Changes: nothing. The `diff' command is used to compare different revisions of files. The default action is to compare your working files with the revisions they were based on, and report any differences that are found. If any file names are given, only those files are compared. If any directories are given, all files under them will be compared. The exit status for diff is different than for other CVS commands; for details *Note Exit status::. * Menu: * diff options:: diff options * diff examples:: diff examples  File: cvs.info, Node: diff options, Next: diff examples, Up: diff A.11.1 diff options ------------------- These standard options are supported by `diff' (*note Common options:: for a complete description of them): `-D DATE' Use the most recent revision no later than DATE. See `-r' for how this affects the comparison. `-k KFLAG' Process keywords according to KFLAG. See *Note Keyword substitution::. `-l' Local; run only in current working directory. `-R' Examine directories recursively. This option is on by default. `-r TAG' Compare with revision TAG. Zero, one or two `-r' options can be present. With no `-r' option, the working file will be compared with the revision it was based on. With one `-r', that revision will be compared to your current working file. With two `-r' options those two revisions will be compared (and your working file will not affect the outcome in any way). One or both `-r' options can be replaced by a `-D DATE' option, described above. The following options specify the format of the output. They have the same meaning as in GNU diff. Most options have two equivalent names, one of which is a single letter preceded by `-', and the other of which is a long name preceded by `--'. `-LINES' Show LINES (an integer) lines of context. This option does not specify an output format by itself; it has no effect unless it is combined with `-c' or `-u'. This option is obsolete. For proper operation, `patch' typically needs at least two lines of context. `-a' Treat all files as text and compare them line-by-line, even if they do not seem to be text. `-b' Ignore trailing white space and consider all other sequences of one or more white space characters to be equivalent. `-B' Ignore changes that just insert or delete blank lines. `--binary' Read and write data in binary mode. `--brief' Report only whether the files differ, not the details of the differences. `-c' Use the context output format. `-C LINES' `--context[=LINES]' Use the context output format, showing LINES (an integer) lines of context, or three if LINES is not given. For proper operation, `patch' typically needs at least two lines of context. `--changed-group-format=FORMAT' Use FORMAT to output a line group containing differing lines from both files in if-then-else format. See *Note Line group formats::. `-d' Change the algorithm to perhaps find a smaller set of changes. This makes `diff' slower (sometimes much slower). `-e' `--ed' Make output that is a valid `ed' script. `--expand-tabs' Expand tabs to spaces in the output, to preserve the alignment of tabs in the input files. `-f' Make output that looks vaguely like an `ed' script but has changes in the order they appear in the file. `-F REGEXP' In context and unified format, for each hunk of differences, show some of the last preceding line that matches REGEXP. `--forward-ed' Make output that looks vaguely like an `ed' script but has changes in the order they appear in the file. `-H' Use heuristics to speed handling of large files that have numerous scattered small changes. `--horizon-lines=LINES' Do not discard the last LINES lines of the common prefix and the first LINES lines of the common suffix. `-i' Ignore changes in case; consider upper- and lower-case letters equivalent. `-I REGEXP' Ignore changes that just insert or delete lines that match REGEXP. `--ifdef=NAME' Make merged if-then-else output using NAME. `--ignore-all-space' Ignore white space when comparing lines. `--ignore-blank-lines' Ignore changes that just insert or delete blank lines. `--ignore-case' Ignore changes in case; consider upper- and lower-case to be the same. `--ignore-matching-lines=REGEXP' Ignore changes that just insert or delete lines that match REGEXP. `--ignore-space-change' Ignore trailing white space and consider all other sequences of one or more white space characters to be equivalent. `--initial-tab' Output a tab rather than a space before the text of a line in normal or context format. This causes the alignment of tabs in the line to look normal. `-L LABEL' Use LABEL instead of the file name in the context format and unified format headers. `--label=LABEL' Use LABEL instead of the file name in the context format and unified format headers. `--left-column' Print only the left column of two common lines in side by side format. `--line-format=FORMAT' Use FORMAT to output all input lines in if-then-else format. See *Note Line formats::. `--minimal' Change the algorithm to perhaps find a smaller set of changes. This makes `diff' slower (sometimes much slower). `-n' Output RCS-format diffs; like `-f' except that each command specifies the number of lines affected. `-N' `--new-file' In directory comparison, if a file is found in only one directory, treat it as present but empty in the other directory. `--new-group-format=FORMAT' Use FORMAT to output a group of lines taken from just the second file in if-then-else format. See *Note Line group formats::. `--new-line-format=FORMAT' Use FORMAT to output a line taken from just the second file in if-then-else format. See *Note Line formats::. `--old-group-format=FORMAT' Use FORMAT to output a group of lines taken from just the first file in if-then-else format. See *Note Line group formats::. `--old-line-format=FORMAT' Use FORMAT to output a line taken from just the first file in if-then-else format. See *Note Line formats::. `-p' Show which C function each change is in. `--rcs' Output RCS-format diffs; like `-f' except that each command specifies the number of lines affected. `--report-identical-files' `-s' Report when two files are the same. `--show-c-function' Show which C function each change is in. `--show-function-line=REGEXP' In context and unified format, for each hunk of differences, show some of the last preceding line that matches REGEXP. `--side-by-side' Use the side by side output format. `--speed-large-files' Use heuristics to speed handling of large files that have numerous scattered small changes. `--suppress-common-lines' Do not print common lines in side by side format. `-t' Expand tabs to spaces in the output, to preserve the alignment of tabs in the input files. `-T' Output a tab rather than a space before the text of a line in normal or context format. This causes the alignment of tabs in the line to look normal. `--text' Treat all files as text and compare them line-by-line, even if they do not appear to be text. `-u' Use the unified output format. `--unchanged-group-format=FORMAT' Use FORMAT to output a group of common lines taken from both files in if-then-else format. *Note Line group formats::. `--unchanged-line-format=FORMAT' Use FORMAT to output a line common to both files in if-then-else format. *Note Line formats::. `-U LINES' `--unified[=LINES]' Use the unified output format, showing LINES (an integer) lines of context, or three if LINES is not given. For proper operation, `patch' typically needs at least two lines of context. `-w' Ignore white space when comparing lines. `-W COLUMNS' `--width=COLUMNS' Use an output width of COLUMNS in side by side format. `-y' Use the side by side output format. * Menu: * Line group formats:: Line group formats * Line formats:: Line formats  File: cvs.info, Node: Line group formats, Next: Line formats, Up: diff options A.11.1.1 Line group formats ........................... Line group formats let you specify formats suitable for many applications that allow if-then-else input, including programming languages and text formatting languages. A line group format specifies the output format for a contiguous group of similar lines. For example, the following command compares the TeX file `myfile' with the original version from the repository, and outputs a merged file in which old regions are surrounded by `\begin{em}'-`\end{em}' lines, and new regions are surrounded by `\begin{bf}'-`\end{bf}' lines. cvs diff \ --old-group-format='\begin{em} %<\end{em} ' \ --new-group-format='\begin{bf} %>\end{bf} ' \ myfile The following command is equivalent to the above example, but it is a little more verbose, because it spells out the default line group formats. cvs diff \ --old-group-format='\begin{em} %<\end{em} ' \ --new-group-format='\begin{bf} %>\end{bf} ' \ --unchanged-group-format='%=' \ --changed-group-format='\begin{em} %<\end{em} \begin{bf} %>\end{bf} ' \ myfile Here is a more advanced example, which outputs a diff listing with headers containing line numbers in a "plain English" style. cvs diff \ --unchanged-group-format='' \ --old-group-format='-------- %dn line%(n=1?:s) deleted at %df: %<' \ --new-group-format='-------- %dN line%(N=1?:s) added after %de: %>' \ --changed-group-format='-------- %dn line%(n=1?:s) changed at %df: %<-------- to: %>' \ myfile To specify a line group format, use one of the options listed below. You can specify up to four line group formats, one for each kind of line group. You should quote FORMAT, because it typically contains shell metacharacters. `--old-group-format=FORMAT' These line groups are hunks containing only lines from the first file. The default old group format is the same as the changed group format if it is specified; otherwise it is a format that outputs the line group as-is. `--new-group-format=FORMAT' These line groups are hunks containing only lines from the second file. The default new group format is same as the changed group format if it is specified; otherwise it is a format that outputs the line group as-is. `--changed-group-format=FORMAT' These line groups are hunks containing lines from both files. The default changed group format is the concatenation of the old and new group formats. `--unchanged-group-format=FORMAT' These line groups contain lines common to both files. The default unchanged group format is a format that outputs the line group as-is. In a line group format, ordinary characters represent themselves; conversion specifications start with `%' and have one of the following forms. `%<' stands for the lines from the first file, including the trailing newline. Each line is formatted according to the old line format (*note Line formats::). `%>' stands for the lines from the second file, including the trailing newline. Each line is formatted according to the new line format. `%=' stands for the lines common to both files, including the trailing newline. Each line is formatted according to the unchanged line format. `%%' stands for `%'. `%c'C'' where C is a single character, stands for C. C may not be a backslash or an apostrophe. For example, `%c':'' stands for a colon, even inside the then-part of an if-then-else format, which a colon would normally terminate. `%c'\O'' where O is a string of 1, 2, or 3 octal digits, stands for the character with octal code O. For example, `%c'\0'' stands for a null character. `FN' where F is a `printf' conversion specification and N is one of the following letters, stands for N's value formatted with F. `e' The line number of the line just before the group in the old file. `f' The line number of the first line in the group in the old file; equals E + 1. `l' The line number of the last line in the group in the old file. `m' The line number of the line just after the group in the old file; equals L + 1. `n' The number of lines in the group in the old file; equals L - F + 1. `E, F, L, M, N' Likewise, for lines in the new file. The `printf' conversion specification can be `%d', `%o', `%x', or `%X', specifying decimal, octal, lower case hexadecimal, or upper case hexadecimal output respectively. After the `%' the following options can appear in sequence: a `-' specifying left-justification; an integer specifying the minimum field width; and a period followed by an optional integer specifying the minimum number of digits. For example, `%5dN' prints the number of new lines in the group in a field of width 5 characters, using the `printf' format `"%5d"'. `(A=B?T:E)' If A equals B then T else E. A and B are each either a decimal constant or a single letter interpreted as above. This format spec is equivalent to T if A's value equals B's; otherwise it is equivalent to E. For example, `%(N=0?no:%dN) line%(N=1?:s)' is equivalent to `no lines' if N (the number of lines in the group in the new file) is 0, to `1 line' if N is 1, and to `%dN lines' otherwise.  File: cvs.info, Node: Line formats, Prev: Line group formats, Up: diff options A.11.1.2 Line formats ..................... Line formats control how each line taken from an input file is output as part of a line group in if-then-else format. For example, the following command outputs text with a one-column change indicator to the left of the text. The first column of output is `-' for deleted lines, `|' for added lines, and a space for unchanged lines. The formats contain newline characters where newlines are desired on output. cvs diff \ --old-line-format='-%l ' \ --new-line-format='|%l ' \ --unchanged-line-format=' %l ' \ myfile To specify a line format, use one of the following options. You should quote FORMAT, since it often contains shell metacharacters. `--old-line-format=FORMAT' formats lines just from the first file. `--new-line-format=FORMAT' formats lines just from the second file. `--unchanged-line-format=FORMAT' formats lines common to both files. `--line-format=FORMAT' formats all lines; in effect, it sets all three above options simultaneously. In a line format, ordinary characters represent themselves; conversion specifications start with `%' and have one of the following forms. `%l' stands for the contents of the line, not counting its trailing newline (if any). This format ignores whether the line is incomplete. `%L' stands for the contents of the line, including its trailing newline (if any). If a line is incomplete, this format preserves its incompleteness. `%%' stands for `%'. `%c'C'' where C is a single character, stands for C. C may not be a backslash or an apostrophe. For example, `%c':'' stands for a colon. `%c'\O'' where O is a string of 1, 2, or 3 octal digits, stands for the character with octal code O. For example, `%c'\0'' stands for a null character. `Fn' where F is a `printf' conversion specification, stands for the line number formatted with F. For example, `%.5dn' prints the line number using the `printf' format `"%.5d"'. *Note Line group formats::, for more about printf conversion specifications. The default line format is `%l' followed by a newline character. If the input contains tab characters and it is important that they line up on output, you should ensure that `%l' or `%L' in a line format is just after a tab stop (e.g. by preceding `%l' or `%L' with a tab character), or you should use the `-t' or `--expand-tabs' option. Taken together, the line and line group formats let you specify many different formats. For example, the following command uses a format similar to `diff''s normal format. You can tailor this command to get fine control over `diff''s output. cvs diff \ --old-line-format='< %l ' \ --new-line-format='> %l ' \ --old-group-format='%df%(f=l?:,%dl)d%dE %<' \ --new-group-format='%dea%dF%(F=L?:,%dL) %>' \ --changed-group-format='%df%(f=l?:,%dl)c%dF%(F=L?:,%dL) %<--- %>' \ --unchanged-group-format='' \ myfile  File: cvs.info, Node: diff examples, Prev: diff options, Up: diff A.11.2 diff examples -------------------- The following line produces a Unidiff (`-u' flag) between revision 1.14 and 1.19 of `backend.c'. Due to the `-kk' flag no keywords are substituted, so differences that only depend on keyword substitution are ignored. $ cvs diff -kk -u -r 1.14 -r 1.19 backend.c Suppose the experimental branch EXPR1 was based on a set of files tagged RELEASE_1_0. To see what has happened on that branch, the following can be used: $ cvs diff -r RELEASE_1_0 -r EXPR1 A command like this can be used to produce a context diff between two releases: $ cvs diff -c -r RELEASE_1_0 -r RELEASE_1_1 > diffs If you are maintaining ChangeLogs, a command like the following just before you commit your changes may help you write the ChangeLog entry. All local modifications that have not yet been committed will be printed. $ cvs diff -u | less  File: cvs.info, Node: export, Next: history, Prev: diff, Up: CVS commands A.12 export--Export sources from CVS, similar to checkout ========================================================= * Synopsis: export [-flNnR] [-r rev|-D date] [-k subst] [-d dir] module... * Requires: repository. * Changes: current directory. This command is a variant of `checkout'; use it when you want a copy of the source for module without the CVS administrative directories. For example, you might use `export' to prepare source for shipment off-site. This command requires that you specify a date or tag (with `-D' or `-r'), so that you can count on reproducing the source you ship to others (and thus it always prunes empty directories). One often would like to use `-kv' with `cvs export'. This causes any keywords to be expanded such that an import done at some other site will not lose the keyword revision information. But be aware that doesn't handle an export containing binary files correctly. Also be aware that after having used `-kv', one can no longer use the `ident' command (which is part of the RCS suite--see ident(1)) which looks for keyword strings. If you want to be able to use `ident' you must not use `-kv'. * Menu: * export options:: export options  File: cvs.info, Node: export options, Up: export A.12.1 export options --------------------- These standard options are supported by `export' (*note Common options::, for a complete description of them): `-D DATE' Use the most recent revision no later than DATE. `-f' If no matching revision is found, retrieve the most recent revision (instead of ignoring the file). `-l' Local; run only in current working directory. `-n' Do not run any checkout program. `-R' Export directories recursively. This is on by default. `-r TAG' Use revision TAG. In addition, these options (that are common to `checkout' and `export') are also supported: `-d DIR' Create a directory called DIR for the working files, instead of using the module name. See *Note checkout options:: for complete details on how CVS handles this flag. `-k SUBST' Set keyword expansion mode (*note Substitution modes::). `-N' Only useful together with `-d DIR'. See *Note checkout options:: for complete details on how CVS handles this flag.  File: cvs.info, Node: history, Next: import, Prev: export, Up: CVS commands A.13 history--Show status of files and users ============================================ * Synopsis: history [-report] [-flags] [-options args] [files...] * Requires: the file `$CVSROOT/CVSROOT/history' * Changes: nothing. CVS can keep a history file that tracks each use of the `checkout', `commit', `rtag', `update', and `release' commands. You can use `history' to display this information in various formats. Logging must be enabled by creating the file `$CVSROOT/CVSROOT/history'. *`history' uses `-f', `-l', `-n', and `-p' in ways that conflict with the normal use inside CVS (*note Common options::).* * Menu: * history options:: history options  File: cvs.info, Node: history options, Up: history A.13.1 history options ---------------------- Several options (shown above as `-report') control what kind of report is generated: `-c' Report on each time commit was used (i.e., each time the repository was modified). `-e' Everything (all record types). Equivalent to specifying `-x' with all record types. Of course, `-e' will also include record types which are added in a future version of CVS; if you are writing a script which can only handle certain record types, you'll want to specify `-x'. `-m MODULE' Report on a particular module. (You can meaningfully use `-m' more than once on the command line.) `-o' Report on checked-out modules. This is the default report type. `-T' Report on all tags. `-x TYPE' Extract a particular set of record types TYPE from the CVS history. The types are indicated by single letters, which you may specify in combination. Certain commands have a single record type: `F' release `O' checkout `E' export `T' rtag One of five record types may result from an update: `C' A merge was necessary but collisions were detected (requiring manual merging). `G' A merge was necessary and it succeeded. `U' A working file was copied from the repository. `P' A working file was patched to match the repository. `W' The working copy of a file was deleted during update (because it was gone from the repository). One of three record types results from commit: `A' A file was added for the first time. `M' A file was modified. `R' A file was removed. The options shown as `-flags' constrain or expand the report without requiring option arguments: `-a' Show data for all users (the default is to show data only for the user executing `history'). `-l' Show last modification only. `-w' Show only the records for modifications done from the same working directory where `history' is executing. The options shown as `-options ARGS' constrain the report based on an argument: `-b STR' Show data back to a record containing the string STR in either the module name, the file name, or the repository path. `-D DATE' Show data since DATE. This is slightly different from the normal use of `-D DATE', which selects the newest revision older than DATE. `-f FILE' Show data for a particular file (you can specify several `-f' options on the same command line). This is equivalent to specifying the file on the command line. `-n MODULE' Show data for a particular module (you can specify several `-n' options on the same command line). `-p REPOSITORY' Show data for a particular source repository (you can specify several `-p' options on the same command line). `-r REV' Show records referring to revisions since the revision or tag named REV appears in individual RCS files. Each RCS file is searched for the revision or tag. `-t TAG' Show records since tag TAG was last added to the history file. This differs from the `-r' flag above in that it reads only the history file, not the RCS files, and is much faster. `-u NAME' Show records for user NAME. `-z TIMEZONE' Show times in the selected records using the specified time zone instead of UTC.  File: cvs.info, Node: import, Next: log, Prev: history, Up: CVS commands A.14 import--Import sources into CVS, using vendor branches =========================================================== * Synopsis: import [-options] repository vendortag releasetag... * Requires: Repository, source distribution directory. * Changes: repository. Use `import' to incorporate an entire source distribution from an outside source (e.g., a source vendor) into your source repository directory. You can use this command both for initial creation of a repository, and for wholesale updates to the module from the outside source. See *Note Tracking sources:: for a discussion on this subject. The REPOSITORY argument gives a directory name (or a path to a directory) under the CVS root directory for repositories; if the directory did not exist, import creates it. When you use import for updates to source that has been modified in your source repository (since a prior import), it will notify you of any files that conflict in the two branches of development; use `checkout -j' to reconcile the differences, as import instructs you to do. If CVS decides a file should be ignored (*note cvsignore::), it does not import it and prints `I ' followed by the filename (*note import output:: for a complete description of the output). If the file `$CVSROOT/CVSROOT/cvswrappers' exists, any file whose names match the specifications in that file will be treated as packages and the appropriate filtering will be performed on the file/directory before being imported. See *Note Wrappers::. The outside source is saved in a first-level branch, by default 1.1.1. Updates are leaves of this branch; for example, files from the first imported collection of source will be revision 1.1.1.1, then files from the first imported update will be revision 1.1.1.2, and so on. At least three arguments are required. REPOSITORY is needed to identify the collection of source. VENDORTAG is a tag for the entire branch (e.g., for 1.1.1). You must also specify at least one RELEASETAG to uniquely identify the files at the leaves created each time you execute `import'. The RELEASETAG should be new, not previously existing in the repository file, and uniquely identify the imported release, Note that `import' does _not_ change the directory in which you invoke it. In particular, it does not set up that directory as a CVS working directory; if you want to work with the sources import them first and then check them out into a different directory (*note Getting the source::). * Menu: * import options:: import options * import output:: import output * import examples:: import examples  File: cvs.info, Node: import options, Next: import output, Up: import A.14.1 import options --------------------- This standard option is supported by `import' (*note Common options:: for a complete description): `-m MESSAGE' Use MESSAGE as log information, instead of invoking an editor. There are the following additional special options. `-b BRANCH' See *Note Multiple vendor branches::. `-d' Use each file's modification time as the time of import rather than the current time. `-k SUBST' Indicate the keyword expansion mode desired. This setting will apply to all files created during the import, but not to any files that previously existed in the repository. See *Note Substitution modes:: for a list of valid `-k' settings. `-I NAME' Specify file names that should be ignored during import. You can use this option repeatedly. To avoid ignoring any files at all (even those ignored by default), specify `-I !'. NAME can be a file name pattern of the same type that you can specify in the `.cvsignore' file. See *Note cvsignore::. `-W SPEC' Specify file names that should be filtered during import. You can use this option repeatedly. SPEC can be a file name pattern of the same type that you can specify in the `.cvswrappers' file. *Note Wrappers::.  File: cvs.info, Node: import output, Next: import examples, Prev: import options, Up: import A.14.2 import output -------------------- `import' keeps you informed of its progress by printing a line for each file, preceded by one character indicating the status of the file: `U FILE' The file already exists in the repository and has not been locally modified; a new revision has been created (if necessary). `N FILE' The file is a new file which has been added to the repository. `C FILE' The file already exists in the repository but has been locally modified; you will have to merge the changes. `I FILE' The file is being ignored (*note cvsignore::). `L FILE' The file is a symbolic link; `cvs import' ignores symbolic links. People periodically suggest that this behavior should be changed, but if there is a consensus on what it should be changed to, it doesn't seem to be apparent. (Various options in the `modules' file can be used to recreate symbolic links on checkout, update, etc.; *note modules::.)  File: cvs.info, Node: import examples, Prev: import output, Up: import A.14.3 import examples ---------------------- See *Note Tracking sources::, and *Note From files::.  File: cvs.info, Node: log, Next: rdiff, Prev: import, Up: CVS commands A.15 log--Print out log information for files ============================================= * Synopsis: log [options] [files...] * Requires: repository, working directory. * Changes: nothing. Display log information for files. `log' used to call the RCS utility `rlog'. Although this is no longer true in the current sources, this history determines the format of the output and the options, which are not quite in the style of the other CVS commands. The output includes the location of the RCS file, the "head" revision (the latest revision on the trunk), all symbolic names (tags) and some other things. For each revision, the revision number, the author, the number of lines added/deleted and the log message are printed. All times are displayed in Coordinated Universal Time (UTC). (Other parts of CVS print times in the local timezone). *`log' uses `-R' in a way that conflicts with the normal use inside CVS (*note Common options::).* * Menu: * log options:: log options * log examples:: log examples  File: cvs.info, Node: log options, Next: log examples, Up: log A.15.1 log options ------------------ By default, `log' prints all information that is available. All other options restrict the output. Note that the revision selection options (`-b', `-d', `-r', `-s', and `-w') have no effect, other than possibly causing a search for files in Attic directories, when used in conjunction with the options that restrict the output to only `log' header fields (`-h', `-R', and `-t') unless the `-S' option is also specified. `-b' Print information about the revisions on the default branch, normally the highest branch on the trunk. `-d DATES' Print information about revisions with a checkin date/time in the range given by the semicolon-separated list of dates. The date formats accepted are those accepted by the `-D' option to many other CVS commands (*note Common options::). Dates can be combined into ranges as follows: `D1D1' Select the revisions that were deposited between D1 and D2. `' Select all revisions dated D or earlier. `D<' `>D' Select all revisions dated D or later. `D' Select the single, latest revision dated D or earlier. The `>' or `<' characters may be followed by `=' to indicate an inclusive range rather than an exclusive one. Note that the separator is a semicolon (;). `-h' Print only the name of the RCS file, name of the file in the working directory, head, default branch, access list, locks, symbolic names, and suffix. `-l' Local; run only in current working directory. (Default is to run recursively). `-N' Do not print the list of tags for this file. This option can be very useful when your site uses a lot of tags, so rather than "more"'ing over 3 pages of tag information, the log information is presented without tags at all. `-n' Print the list of tags for this file. This option can be very useful when your `.cvsrc' file has a `log -N' entry as a way to get a full list of all of the tags. `-R' Print only the name of the RCS file. `-rREVISIONS' Print information about revisions given in the comma-separated list REVISIONS of revisions and ranges. The following table explains the available range formats: `REV1:REV2' Revisions REV1 to REV2 (which must be on the same branch). `REV1::REV2' The same, but excluding REV1. `:REV' `::REV' Revisions from the beginning of the branch up to and including REV. `REV:' Revisions starting with REV to the end of the branch containing REV. `REV::' Revisions starting just after REV to the end of the branch containing REV. `BRANCH' An argument that is a branch means all revisions on that branch. `BRANCH1:BRANCH2' `BRANCH1::BRANCH2' A range of branches means all revisions on the branches in that range. `BRANCH.' The latest revision in BRANCH. A bare `-r' with no revisions means the latest revision on the default branch, normally the trunk. There can be no space between the `-r' option and its argument. `-S' Suppress the header if no revisions are selected. `-s STATES' Print information about revisions whose state attributes match one of the states given in the comma-separated list STATES. Individual states may be any text string, though CVS commonly only uses two states, `Exp' and `dead'. See *Note admin options:: for more information. `-t' Print the same as `-h', plus the descriptive text. `-wLOGINS' Print information about revisions checked in by users with login names appearing in the comma-separated list LOGINS. If LOGINS is omitted, the user's login is assumed. There can be no space between the `-w' option and its argument. `log' prints the intersection of the revisions selected with the options `-d', `-s', and `-w', intersected with the union of the revisions selected by `-b' and `-r'.  File: cvs.info, Node: log examples, Prev: log options, Up: log A.15.2 log examples ------------------- Contributed examples are gratefully accepted.  File: cvs.info, Node: rdiff, Next: release, Prev: log, Up: CVS commands A.16 rdiff--'patch' format diffs between releases ================================================= * rdiff [-flags] [-V vn] [-r t|-D d [-r t2|-D d2]] modules... * Requires: repository. * Changes: nothing. * Synonym: patch Builds a Larry Wall format patch(1) file between two releases, that can be fed directly into the `patch' program to bring an old release up-to-date with the new release. (This is one of the few CVS commands that operates directly from the repository, and doesn't require a prior checkout.) The diff output is sent to the standard output device. You can specify (using the standard `-r' and `-D' options) any combination of one or two revisions or dates. If only one revision or date is specified, the patch file reflects differences between that revision or date and the current head revisions in the RCS file. Note that if the software release affected is contained in more than one directory, then it may be necessary to specify the `-p' option to the `patch' command when patching the old sources, so that `patch' is able to find the files that are located in other directories. * Menu: * rdiff options:: rdiff options * rdiff examples:: rdiff examples 07070100106b9e000081a40000000000000000000000014d58a1f80000142f000000b600010002ffffffffffffffff0000001e00000000root/usr/local/share/info/dirThis is the file .../info/dir, which contains the topmost node of the Info hierarchy, called (dir)Top. The first time you invoke Info you start off looking at this node.  File: dir, Node: Top This is the top of the INFO tree This (the Directory node) gives a menu of major topics. Typing "q" exits, "?" lists all Info commands, "d" returns here, "h" gives a primer for first-timers, "mEmacs" visits the Emacs manual, etc. In Emacs, you can click mouse button 2 on a menu item or cross reference to select it. * Menu: GNU Packages * CVS: (cvs). Concurrent Versions System GNU Plotting Utilities * Appendices: (plotutils)Appendices. More info on the plotting utilities. * graph: (plotutils)graph Invocation. Plot datasets, possibly in real time. * libplot: (plotutils)libplot. A library for 2-D vector graphics. * ode: (plotutils)ode Invocation. Integrate differential equations. * pic2plot: (plotutils)pic2plot Invocation. Convert files in the pic language * plotfont: (plotutils)plotfont Invocation. Plot character maps of fonts. * plot: (plotutils)plot Invocation. Convert and display plot files. * Plotting utilities: (plotutils). GNU plotting utilities. * spline: (plotutils)spline Invocation. Interpolate between points in datasets. * tek2plot: (plotutils)tek2plot Invocation. Translate legacy Tektronix data. Individual utilities * cvs: (cvs)CVS commands. Concurrent Versions System Programming * cvsclient: (cvsclient). The CVS client/server protocol. Software libraries * GnuTLS: (gnutls). GNU Transport Layer Security Library. * libtasn1: (libtasn1). Library for Abstract Syntax Notation One (ASN.1). System Administration * certtool: (gnutls)Invoking certtool. Manipulate certificates and keys. * gnutls-cli: (gnutls)Invoking gnutls-cli. GnuTLS test client. * gnutls-cli-debug: (gnutls)Invoking gnutls-cli-debug. GnuTLS debug client. * gnutls-serv: (gnutls)Invoking gnutls-serv. GnuTLS test server. * psktool: (gnutls)Invoking psktool. Simple TLS-Pre-Shared-Keys manager. * srptool: (gnutls)Invoking srptool. Simple SRP password tool. Text creation and manipulation * M4: (m4). A powerful macro processor. C++ libraries * autosprintf: (autosprintf). Support for printf format strings in C++. GNU Gettext Utilities * ISO3166: (gettext)Country Codes. ISO 3166 country codes. * ISO639: (gettext)Language Codes. ISO 639 language codes. * autopoint: (gettext)autopoint Invocation. Copy gettext infrastructure. * envsubst: (gettext)envsubst Invocation. Expand environment variables. * gettext: (gettext). GNU gettext utilities. * gettextize: (gettext)gettextize Invocation. Prepare a package for gettext. * msgattrib: (gettext)msgattrib Invocation. Select part of a PO file. * msgcat: (gettext)msgcat Invocation. Combine several PO files. * msgcmp: (gettext)msgcmp Invocation. Compare a PO file and template. * msgcomm: (gettext)msgcomm Invocation. Match two PO files. * msgconv: (gettext)msgconv Invocation. Convert PO file to encoding. * msgen: (gettext)msgen Invocation. Create an English PO file. * msgexec: (gettext)msgexec Invocation. Process a PO file. * msgfilter: (gettext)msgfilter Invocation. Pipe a PO file through a filter. * msgfmt: (gettext)msgfmt Invocation. Make MO files out of PO files. * msggrep: (gettext)msggrep Invocation. Select part of a PO file. * msginit: (gettext)msginit Invocation. Create a fresh PO file. * msgmerge: (gettext)msgmerge Invocation. Update a PO file from template. * msgunfmt: (gettext)msgunfmt Invocation. Uncompile MO file into PO file. * msguniq: (gettext)msguniq Invocation. Unify duplicates for PO file. * ngettext: (gettext)ngettext Invocation. Translate a message with plural. * xgettext: (gettext)xgettext Invocation. Extract strings into a PO file. Software development * Make: (make). Remake files automatically. * bison: (bison). GNU parser generator (Yacc replacement). 07070100106b9a000081a40000000000000000000000014d58a1f80000178e000000b600010002ffffffffffffffff0000002300000000root/usr/local/share/info/cvs.infoThis is cvs.info, produced by makeinfo version 4.8 from cvs.texinfo. INFO-DIR-SECTION GNU Packages START-INFO-DIR-ENTRY * CVS: (cvs). Concurrent Versions System END-INFO-DIR-ENTRY INFO-DIR-SECTION Individual utilities START-INFO-DIR-ENTRY * cvs: (cvs)CVS commands. Concurrent Versions System END-INFO-DIR-ENTRY  Indirect: cvs.info-1: 337 cvs.info-2: 298992  Tag Table: (Indirect) Node: Top337 Node: Overview3351 Node: What is CVS?3916 Node: What is CVS not?6837 Node: A sample session12402 Node: Getting the source13229 Node: Committing your changes14115 Node: Cleaning up16282 Node: Viewing differences17995 Node: Repository18900 Node: Specifying a repository21613 Node: Repository storage22953 Node: Repository files24174 Node: File permissions27022 Node: Windows permissions30887 Node: Attic31840 Node: CVS in repository32894 Node: Locks35994 Node: CVSROOT storage39147 Node: Working directory storage40954 Node: Intro administrative files50590 Node: Multiple repositories52843 Node: Creating a repository54337 Node: Backing up56701 Node: Moving a repository58629 Node: Remote repositories59709 Node: Server requirements61350 Node: Connecting via rsh63782 Node: Password authenticated67197 Node: Password authentication server67959 Node: Password authentication client75656 Node: Password authentication security78859 Node: GSSAPI authenticated80719 Node: Kerberos authenticated82579 Node: Connecting via fork84407 Node: Read-only access85519 Node: Server temporary directory88526 Node: Starting a new project89820 Node: Setting up the files90565 Node: From files91194 Node: From other version control systems93181 Node: From scratch95758 Node: Defining the module96643 Node: Revisions97629 Node: Revision numbers98837 Node: Versions revisions releases99878 Node: Assigning revisions100465 Node: Tags102113 Node: Tagging the working directory107445 Node: Tagging by date/tag108838 Node: Modifying tags110208 Node: Tagging add/remove113406 Node: Sticky tags115045 Node: Branching and merging118195 Node: Branches motivation119493 Node: Creating a branch120509 Node: Accessing branches122074 Node: Branches and revisions125305 Node: Magic branch numbers128024 Node: Merging a branch129522 Node: Merging more than once131826 Node: Merging two revisions134307 Node: Merging adds and removals135637 Node: Merging and keywords136917 Node: Recursive behavior140089 Node: Adding and removing141917 Node: Adding files142812 Node: Removing files145718 Node: Removing directories149144 Node: Moving files150313 Node: Outside150965 Node: Inside151889 Node: Rename by copying152746 Node: Moving directories153758 Node: History browsing155265 Node: log messages155742 Node: history database156068 Node: user-defined logging156552 Node: Binary files157552 Node: Binary why158190 Node: Binary howto160429 Node: Multiple developers163477 Node: File status165637 Node: Updating a file168733 Node: Conflicts example170171 Node: Informing others174216 Node: Concurrency174702 Node: Watches176454 Node: Setting a watch177851 Node: Getting Notified179161 Node: Editing files182870 Node: Watch information185398 Node: Watches Compatibility186254 Node: Choosing a model187135 Node: Revision management189817 Node: When to commit190423 Node: Keyword substitution191537 Node: Keyword list192523 Node: Using keywords194858 Node: Avoiding substitution196600 Node: Substitution modes197502 Node: Log keyword200111 Node: Tracking sources201258 Node: First import202780 Node: Update imports204124 Node: Reverting local changes206053 Node: Binary files in imports206757 Node: Keywords in imports207073 Node: Multiple vendor branches208218 Node: Builds209919 Node: Special Files212599 Node: CVS commands213248 Node: Structure214931 Node: Exit status216212 Node: ~/.cvsrc217209 Node: Global options219252 Node: Common options223945 Node: add231514 Node: add options232586 Node: add examples233227 Node: admin234007 Node: admin options235001 Node: annotate246239 Node: annotate options246798 Node: annotate example247334 Node: checkout248231 Node: checkout options251002 Node: checkout examples255420 Node: commit255706 Node: commit options257575 Node: commit examples258941 Node: diff261339 Node: diff options262244 Node: Line group formats270113 Node: Line formats275835 Node: diff examples279054 Node: export280025 Node: export options281333 Node: history282422 Node: history options283203 Node: import286783 Node: import options289536 Node: import output290905 Node: import examples291991 Node: log292170 Node: log options293318 Node: log examples297517 Node: rdiff297674 Node: rdiff options298992 Node: rdiff examples300753 Node: release301730 Node: release options303036 Node: release output303706 Node: release examples304994 Node: remove305476 Node: remove options306473 Node: remove examples307263 Node: update308287 Node: update options309156 Node: update output313368 Node: Invoking CVS316244 Node: Administrative files338161 Node: modules339581 Node: Alias modules340936 Node: Regular modules341999 Node: Ampersand modules343401 Node: Excluding directories344646 Node: Module options345198 Node: Module program options346776 Node: Wrappers347562 Node: Trigger Scripts349269 Node: syntax350157 Node: Trigger Script Security351081 Node: commit files352418 Node: commitinfo354191 Node: verifymsg356343 Node: editinfo360969 Node: editinfo example363262 Node: loginfo364569 Node: loginfo example367269 Node: Keeping a checked out copy368117 Node: rcsinfo369147 Node: taginfo370459 Node: cvsignore371433 Node: checkoutlist374704 Node: history file376237 Node: Variables376895 Node: config380447 Node: Environment variables385128 Node: Compatibility390311 Node: Troubleshooting391334 Node: Error messages391976 Node: Connection409951 Node: Other problems414896 Node: Credits415834 Node: BUGS417242 Node: Index420916  End Tag Table 07070100106b85000041ed0000000000000000000000034d58a1ff00000000000000b600010002ffffffffffffffff0000001900000000root/usr/local/share/cvs07070100106b86000041ed0000000000000000000000024d58a1ff00000000000000b600010002ffffffffffffffff0000002100000000root/usr/local/share/cvs/contrib07070100106b97000081ed0000000000000000000000014d58a1f800001fbf000000b600010002ffffffffffffffff0000002900000000root/usr/local/share/cvs/contrib/rcslock#! /bin/perl -T # -*-Perl-*- # Copyright (C) 1994-2005 The Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. ############################################################################### ############################################################################### ############################################################################### # # THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE # WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE # -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS # SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND # NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE # MAILING LIST. # # For more on general Perl security and taint-checking, please try running the # `perldoc perlsec' command. # ############################################################################### ############################################################################### ############################################################################### # Author: John Rouillard (rouilj@cs.umb.edu) # Supported: Yeah right. (Well what do you expect for 2 hours work?) # Blame-to: rouilj@cs.umb.edu # Complaints to: Anybody except Brian Berliner, he's blameless for # this script. # Acknowlegements: The base code for this script has been acquired # from the log.pl script. # rcslock.pl - A program to prevent commits when a file to be ckecked # in is locked in the repository. # There are times when you need exclusive access to a file. This # often occurs when binaries are checked into the repository, since # cvs's (actually rcs's) text based merging mechanism won't work. This # script allows you to use the rcs lock mechanism (rcs -l) to make # sure that no changes to a repository are able to be committed if # those changes would result in a locked file being changed. # WARNING: # This script will work only if locking is set to strict. # # Setup: # Add the following line to the commitinfo file: # ALL /local/location/for/script/lockcheck [options] # Where ALL is replaced by any suitable regular expression. # Options are -v for verbose info, or -d for debugging info. # The %s will provide the repository directory name and the names of # all changed files. # Use: # When a developer needs exclusive access to a version of a file, s/he # should use "rcs -l" in the repository tree to lock the version they # are working on. CVS will automagically release the lock when the # commit is performed. # Method: # An "rlog -h" is exec'ed to give info on all about to be # committed files. This (header) information is parsed to determine # if any locks are outstanding and what versions of the file are # locked. This filename, version number info is used to index an # associative array. All of the files to be committed are checked to # see if any locks are outstanding. If locks are outstanding, the # version number of the current file (taken from the CVS/Entries # subdirectory) is used in the key to determine if that version is # locked. If the file being checked in is locked by the person doing # the checkin, the commit is allowed, but if the lock is held on that # version of a file by another person, the commit is not allowed. $ext = ",v"; # The extension on your rcs files. $\="\n"; # I hate having to put \n's at the end of my print statements $,=' '; # Spaces should occur between arguments to print when printed # turn off setgid # $) = $(; # # parse command line arguments # require 'getopts.pl'; &Getopts("vd"); # verbose or debugging # Verbose is useful when debugging $opt_v = $opt_d if defined $opt_d; # $files[0] is really the name of the subdirectory. # @files = split(/ /,$ARGV[0]); @files = @ARGV[0..$#ARGV]; $cvsroot = $ENV{'CVSROOT'}; # # get login name # $login = getlogin || (getpwuid($<))[0] || "nobody"; # # save the current directory since we have to return here to parse the # CVS/Entries file if a lock is found. # $pwd = `/bin/pwd`; chop $pwd; print "Starting directory is $pwd" if defined $opt_d ; # # cd to the repository directory and check on the files. # print "Checking directory ", $files[0] if defined $opt_v ; if ( $files[0] =~ /^\// ) { print "Directory path is $files[0]" if defined $opt_d ; chdir $files[0] || die "Can't change to repository directory $files[0]" ; } else { print "Directory path is $cvsroot/$files[0]" if defined $opt_d ; chdir ($cvsroot . "/" . $files[0]) || die "Can't change to repository directory $files[0] in $cvsroot" ; } # Open the rlog process and apss all of the file names to that one # process to cut down on exec overhead. This may backfire if there # are too many files for the system buffer to handle, but if there are # that many files, chances are that the cvs repository is not set up # cleanly. print "opening rlog -h @files[1..$#files] |" if defined $opt_d; open( RLOG, "rlog -h @files[1..$#files] |") || die "Can't run rlog command" ; # Create the locks associative array. The elements in the array are # of two types: # # The name of the RCS file with a value of the total number of locks found # for that file, # or # # The name of the rcs file concatenated with the version number of the lock. # The value of this element is the name of the locker. # The regular expressions used to split the rcs info may have to be changed. # The current ones work for rcs 5.6. $lock = 0; while () { chop; next if /^$/; # ditch blank lines if ( $_ =~ /^RCS file: (.*)$/ ) { $curfile = $1; next; } if ( $_ =~ /^locks: strict$/ ) { $lock = 1 ; next; } if ( $lock ) { # access list: is the line immediately following the list of locks. if ( /^access list:/ ) { # we are done getting lock info for this file. $lock = 0; } else { # We are accumulating lock info. # increment the lock count $locks{$curfile}++; # save the info on the version that is locked. $2 is the # version number $1 is the name of the locker. $locks{"$curfile" . "$2"} = $1 if /[ ]*([a-zA-Z._]*): ([0-9.]*)$/; print "lock by $1 found on $curfile version $2" if defined $opt_d; } } } # Lets go back to the starting directory and see if any locked files # are ones we are interested in. chdir $pwd; # fo all of the file names (remember $files[0] is the directory name foreach $i (@files[1..$#files]) { if ( defined $locks{$i . $ext} ) { # well the file has at least one lock outstanding # find the base version number of our file &parse_cvs_entry($i,*entry); # is our version of this file locked? if ( defined $locks{$i . $ext . $entry{"version"}} ) { # if so, it is by us? if ( $login ne ($by = $locks{$i . $ext . $entry{"version"}}) ) {# crud somebody else has it locked. $outstanding_lock++ ; print "$by has file $i locked for version " , $entry{"version"}; } else { # yeah I have it locked. print "You have a lock on file $i for version " , $entry{"version"} if defined $opt_v; } } } } exit $outstanding_lock; ### End of main program sub parse_cvs_entry { # a very simple minded hack at parsing an entries file. local ( $file, *entry ) = @_; local ( @pp ); open(ENTRIES, "< CVS/Entries") || die "Can't open entries file"; while () { if ( $_ =~ /^\/$file\// ) { @pp = split('/'); $entry{"name"} = $pp[1]; $entry{"version"} = $pp[2]; $entry{"dates"} = $pp[3]; $entry{"name"} = $pp[4]; $entry{"name"} = $pp[5]; $entry{"sticky"} = $pp[6]; return; } } } 07070100106b93000081ed0000000000000000000000014d58a1f800000d64000000b600010002ffffffffffffffff0000002800000000root/usr/local/share/cvs/contrib/mfpipe#! /bin/perl -T # -*-Perl-*- # Copyright (C) 1994-2005 The Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. ############################################################################### ############################################################################### ############################################################################### # # THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE # WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE # -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS # SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND # NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE # MAILING LIST. # # For more on general Perl security and taint-checking, please try running the # `perldoc perlsec' command. # ############################################################################### ############################################################################### ############################################################################### # From: clyne@niwot.scd.ucar.EDU (John Clyne) # Date: Fri, 28 Feb 92 09:54:21 MST # # BTW, i wrote a perl script that is similar to 'nfpipe' except that in # addition to logging to a file it provides a command line option for mailing # change notices to a group of users. Obviously you probably wouldn't want # to mail every change. But there may be certain directories that are commonly # accessed by a group of users who would benefit from an email notice. # Especially if they regularly beat on the same directory. Anyway if you # think anyone would be interested here it is. # # File: mfpipe # # Author: John Clyne # National Center for Atmospheric Research # PO 3000, Boulder, Colorado # # Date: Wed Feb 26 18:34:53 MST 1992 # # Description: Tee standard input to mail a list of users and to # a file. Used by CVS logging. # # Usage: mfpipe [-f file] [user@host...] # # Environment: CVSROOT # Path to CVS root. # # Files: # # # Options: -f file # Capture output to 'file' # $header = "Log Message:\n"; $mailcmd = "| mail -s 'CVS update notice'"; $whoami = `whoami`; chop $whoami; $date = `date`; chop $date; $cvsroot = $ENV{'CVSROOT'}; while (@ARGV) { $arg = shift @ARGV; if ($arg eq '-f') { $file = shift @ARGV; } else { $users = "$users $arg"; } } if ($users) { $mailcmd = "$mailcmd $users"; open(MAIL, $mailcmd) || die "Execing $mail: $!\n"; } if ($file) { $logfile = "$cvsroot/LOG/$file"; open(FILE, ">> $logfile") || die "Opening $logfile: $!\n"; } print FILE "$whoami $date--------BEGIN LOG ENTRY-------------\n" if ($logfile); while (<>) { print FILE $log if ($log && $logfile); print FILE $_ if ($logfile); print MAIL $_ if ($users); $log = "log: " if ($_ eq $header); } close FILE; die "Write failed" if $?; close MAIL; die "Mail failed" if $?; exit 0; 07070100106b8f000081ed0000000000000000000000014d58a1f8000012fa000000b600010002ffffffffffffffff0000003100000000root/usr/local/share/cvs/contrib/debug_check_log#!/bin/sh # Copyright (C) 2000-2005 The Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # This program is intended to take a check.log file generated by a failed run of # sanity.sh as input and run expr line by line on it. It seems a much easier # way of spotting a single failed line in a 100 line test result. # # # Contributed by Derek R. Price # usage () { echo "\ usage: $0 [-afh] [file...] -a process alternate pattern -f process first pattern (default) -h print this text file files to process (default = check.log)" } # Do a line by line match with expr # # INPUTS # $1 = text file name # $2 = pattern file name expr_line_by_line () { dcl_line=0 dcl_wrong= # We are assuming a newline at the end of the file. The way sanity.sh # uses echo to create the log message guarantees this newline and since # expr ignores the last newline when the anchor is present anyhow, no # information is being lost in the transition while test $dcl_line -lt `wc -l <$1` -a $dcl_line -lt `wc -l <$2`; do dcl_line=`expr $dcl_line + 1` if test `sed -ne${dcl_line}p <$1 |wc -c` -eq 1 \ -a `sed -ne${dcl_line}p <$2 |wc -c` -eq 1; then # This is a workaround for what I am calling a bug in GNU # expr - it won't match the empty string to the empty # string. In this case the assumption is that a single # character is always a newline. Since we already checked # for the end of the file, we know sed will echo the # newline. : elif expr "`sed -ne${dcl_line}p <$1`" : \ "`sed -ne${dcl_line}p <$2`\$" >/dev/null; then : else echo "$dcl_line: `sed -ne${dcl_line}p <$1`" echo "$dcl_line: `sed -ne${dcl_line}p <$2`\$" dcl_wrong="$dcl_wrong $dcl_line" fi done if test `wc -l <$1` -ne `wc -l <$2`; then echo "output & pattern contain differing number of lines" elif test -z "$dcl_wrong"; then echo "no mismatched lines" else echo "mismatched lines: $dcl_wrong" fi } # Process a single check.log file # # INPUTS # $1 = filename process_check_log () { # abort if we can't find any expressions if grep '^\*\* got: $' <$1 >/dev/null; then : else echo "WARNING: No expressions in file: $1" >&2 echo " Either not a check.log or sanity.sh exited for some other reason," >&2 echo " like bad exit status. Try tail." >&2 return fi dcl_exprfiles="" if grep '^\*\* or: $' <$1 >/dev/null; then # file contains a second regex if test $dcl_dofirst -eq 1; then # get the first pattern sed -ne '/^\*\* expected: $/,/^\*\* or: $/p' <$1 >/tmp/dcle$$ dcl_exprfiles="$dcl_exprfiles /tmp/dcle$$" fi if test $dcl_doalternate -eq 1; then # get the alternate pattern sed -ne '/^\*\* or: $/,/^\*\* got: $/p' <$1 >/tmp/dclo$$ dcl_exprfiles="$dcl_exprfiles /tmp/dclo$$" else echo "WARNING: Ignoring alternate pattern in file: $1" >&2 fi else # file doesn't contain a second regex if test $dcl_dofirst = 1; then # get the only pattern sed -ne '/^\*\* expected: $/,/^\*\* got: $/p' <$1 >/tmp/dcle$$ dcl_exprfiles="$dcl_exprfiles /tmp/dcle$$" fi if test $dcl_doalternate -eq 1; then echo "WARNING: No alternate pattern in file: $1" >&2 fi fi # and get the actual output sed -ne '/^\*\* got: $/,$p' <$1 >/tmp/dclg$$ sed -ne '1D $D p' /tmp/dclh$$ mv /tmp/dclh$$ /tmp/dclg$$ # compare the output against each pattern requested for dcl_f in $dcl_exprfiles; do sed -ne '1D $D p' <$dcl_f >/tmp/dclp$$ mv /tmp/dclp$$ $dcl_f case $dcl_f in /tmp/dcle*) echo "********** $1 : Primary **********" ;; /tmp/dclo*) echo "********** $1 : Alternate **********" ;; esac expr_line_by_line /tmp/dclg$$ $dcl_f rm $dcl_f done rm /tmp/dclg$$ } ### ### MAIN ### # set up defaults dcl_doalternate=0 dcl_dofirst=0 # process options while getopts afh arg; do case $arg in a) dcl_doalternate=1 ;; f) dcl_dofirst=1 ;; \?|h) usage exit 1 ;; esac done # dispose of processed args shift `expr $OPTIND - 1` OPTIND=1 # set the default mode if test $dcl_doalternate -eq 0; then dcl_dofirst=1 fi # set default arg if test $# -eq 0; then if test -f src/check.log && test -r src/check.log; then set src/check.log else set check.log fi fi for file in "$@"; do process_check_log $file; done exit 0 07070100106b87000081a40000000000000000000000014d58a1f800001510000000b600010002ffffffffffffffff0000002800000000root/usr/local/share/cvs/contrib/READMEThis "contrib" directory is a place holder for code/scripts sent to me by contributors around the world. This README file will be kept up-to-date from release to release. BUT, we must point out that these contributions are really, REALLY UNSUPPORTED. In fact, we probably don't even know what some of them really do. We certainly do not guarantee to have tried them, or ported them to work with this CVS distribution. If you have questions, your best bet is to contact the original author, but you should not necessarily expect a reply, since the author may not be available at the address given. USE AT YOUR OWN RISK -- and all that stuff. "Unsupported" also means that no one has volunteered to accept and check in changes to this directory. So submissions for new scripts to add here are unlikely to be accepted. Suggested changes to the existing scripts here conceivably might, but that isn't clear either, unless of course they come from the original author of the script. If you have some software that works with CVS that you wish to offer it is suggested that you make it available by FTP or HTTP and then announce it on the info-cvs mailing list. There is a web page of software related to CVS at the following URL which would presumably be willing to list your software. http://www.loria.fr/~molli/cvs-index.html An attempt at a table of Contents for this directory: README This file. check_cvs A perl script to check an entire repository for corruption. Contributed by Donald Sharp . clmerge A perl script to handle merge conflicts in GNU style ChangeLog files . Contributed by Tom Tromey . cln_hist A perl script to compress your $CVSROOT/CVSROOT/history file, as it can grow quite large after extended use. Contributed by David G. Grubbs commit_prep A perl script, to be combined with log_accum.pl, to log_accum provide for a way to combine the individual log messages of a multi-directory "commit" into a single log message, and mail the result somewhere. Can also do other checks for $Id and that you are committing the correct revision of the file. Read the comments carefully. Contributed by David Hampton . cvs2vendor A shell script to move changes from a repository that was started without a vendor branch to one that has a vendor branch. Contributed by Greg A. Woods . cvs_acls A perl script that implements Access Control Lists by using the "commitinfo" hook provided with the "cvs commit" command. Contributed by David G. Grubbs . cvscheck Identifies files added, changed, or removed in a cvscheck.man checked out CVS tree; also notices unknown files. Contributed by Lowell Skoog cvshelp.man An introductory manual page written by Lowell Skoog . It is most likely out-of-date relative to CVS 1.3, but still may be useful. debug_check_log A shell script to help analyze sanity check failures. Contributed by Derek R. Price . descend A shell script that can be used to recursively descend.man descend through a directory. In CVS 1.2, this was very useful, since many of the commands were not recursive. In CVS 1.3 (and later), however, most of the commands are recursive. However, this may still come in handy. Contributed by Lowell Skoog dirfns A shar file which contains some code that might help your system support opendir/readdir/closedir, if it does not already. Copied from the C-News distribution. intro.doc A user's view of what you need to know to get started with CVS. Contributed by . log A perl script suitable for including in your $CVSROOT/CVSROOT/loginfo file for logging commit changes. Includes the RCS revision of the change as part of the log. Contributed by Kevin Samborn . log_accum See commit_prep. mfpipe Another perl script for logging. Allows you to pipe the log message to a file and/or send mail to some alias. Contributed by John Clyne . pvcs2rcs A perl script to convert a PVCS tree to an RCS tree. rcs-to-cvs Script to import sources that may have been under RCS control already. Contributed by Per Cederqvist . rcs2log A shell script to create a ChangeLog-format file given only a set of RCS files. Contributed by Paul Eggert . rcs2sccs A shell script to convert simple RCS files into SCCS files, originally gleaned off the network somewhere (originally by "kenc") and modified by Jerry Jelinek and Brian Berliner to increase robustness and add support for one-level of branches. rcslock A perl script that can be added to your commitinfo file that tries to determine if your RCS file is currently locked by someone else, as might be the case for a binary file. Contributed by John Rouillard . sccs2rcs A C-shell script that can convert (some) SCCS files into RCS files, retaining the info contained in the SCCS file (like dates, author, and log message). Contributed by Ken Cox . 07070100106b92000081ed0000000000000000000000014d58a1f8000055a9000000b600010002ffffffffffffffff0000002b00000000root/usr/local/share/cvs/contrib/log_accum#! /bin/perl -T # -*-Perl-*- # Copyright (C) 1994-2005 The Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. ############################################################################### ############################################################################### ############################################################################### # # THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE # WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE # -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS # SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND # NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE # MAILING LIST. # # For more on general Perl security and taint-checking, please try running the # `perldoc perlsec' command. # ############################################################################### ############################################################################### ############################################################################### # Perl filter to handle the log messages from the checkin of files in # a directory. This script will group the lists of files by log # message, and mail a single consolidated log message at the end of # the commit. # # This file assumes a pre-commit checking program that leaves the # names of the first and last commit directories in a temporary file. # # IMPORTANT: what the above means is, this script interacts with # commit_prep, in that they have to agree on the tmpfile name to use. # See $LAST_FILE below. # # How this works: CVS triggers this script once for each directory # involved in the commit -- in other words, a single commit can invoke # this script N times. It knows when it's on the last invocation by # examining the contents of $LAST_FILE. Between invocations, it # caches information for its future incarnations in various temporary # files in /tmp, which are named according to the process group and # the committer (by themselves, neither of these are unique, but # together they almost always are, unless the same user is doing two # commits simultaneously). The final invocation is the one that # actually sends the mail -- it gathers up the cached information, # combines that with what it found out on this pass, and sends a # commit message to the appropriate mailing list. # # (Ask Karl Fogel if questions.) # # Contributed by David Hampton # Roy Fielding removed useless code and added log/mail of new files # Ken Coar added special processing (i.e., no diffs) for binary files # ############################################################ # # Configurable options # ############################################################ # # Where do you want the RCS ID and delta info? # 0 = none, # 1 = in mail only, # 2 = in both mail and logs. # $rcsidinfo = 2; #if you are using CVS web then set this to some value... if not set it to "" # # When set properly, this will cause links to aspects of the project to # print in the commit emails. #$CVSWEB_SCHEME = "http"; #$CVSWEB_DOMAIN = "nongnu.org"; #$CVSWEB_PORT = "80"; #$CVSWEB_URI = "source/browse/"; #$SEND_URL = "true"; $SEND_DIFF = "true"; # Set this to a domain to have CVS pretend that all users who make # commits have mail accounts within that domain. #$EMULATE_LOCAL_MAIL_USER="nongnu.org"; # Set this to '-c' for context diffs; defaults to '-u' for unidiff format. $difftype = '-uN'; ############################################################ # # Constants # ############################################################ $STATE_NONE = 0; $STATE_CHANGED = 1; $STATE_ADDED = 2; $STATE_REMOVED = 3; $STATE_LOG = 4; $TMPDIR = $ENV{'TMPDIR'} || '/tmp'; $FILE_PREFIX = '#cvs.'; $LAST_FILE = "$TMPDIR/${FILE_PREFIX}lastdir"; # Created by commit_prep! $ADDED_FILE = "$TMPDIR/${FILE_PREFIX}files.added"; $REMOVED_FILE = "$TMPDIR/${FILE_PREFIX}files.removed"; $LOG_FILE = "$TMPDIR/${FILE_PREFIX}files.log"; $BRANCH_FILE = "$TMPDIR/${FILE_PREFIX}files.branch"; $MLIST_FILE = "$TMPDIR/${FILE_PREFIX}files.mlist"; $SUMMARY_FILE = "$TMPDIR/${FILE_PREFIX}files.summary"; $CVSROOT = $ENV{'CVSROOT'}; $MAIL_CMD = "| /usr/lib/sendmail -i -t"; #$MAIL_CMD = "| /var/qmail/bin/qmail-inject"; $MAIL_FROM = 'commitlogger'; #not needed if EMULATE_LOCAL_MAIL_USER $SUBJECT_PRE = 'CVS update:'; ############################################################ # # Subroutines # ############################################################ sub format_names { local($dir, @files) = @_; local(@lines); $lines[0] = sprintf(" %-08s", $dir); foreach $file (@files) { if (length($lines[$#lines]) + length($file) > 60) { $lines[++$#lines] = sprintf(" %8s", " "); } $lines[$#lines] .= " ".$file; } @lines; } sub cleanup_tmpfiles { local(@files); opendir(DIR, $TMPDIR); push(@files, grep(/^${FILE_PREFIX}.*\.${id}\.${cvs_user}$/, readdir(DIR))); closedir(DIR); foreach (@files) { unlink "$TMPDIR/$_"; } } sub write_logfile { local($filename, @lines) = @_; open(FILE, ">$filename") || die ("Cannot open log file $filename: $!\n"); print(FILE join("\n", @lines), "\n"); close(FILE); } sub append_to_file { local($filename, $dir, @files) = @_; if (@files) { local(@lines) = &format_names($dir, @files); open(FILE, ">>$filename") || die ("Cannot open file $filename: $!\n"); print(FILE join("\n", @lines), "\n"); close(FILE); } } sub write_line { local($filename, $line) = @_; open(FILE, ">$filename") || die("Cannot open file $filename: $!\n"); print(FILE $line, "\n"); close(FILE); } sub append_line { local($filename, $line) = @_; open(FILE, ">>$filename") || die("Cannot open file $filename: $!\n"); print(FILE $line, "\n"); close(FILE); } sub read_line { local($filename) = @_; local($line); open(FILE, "<$filename") || die("Cannot open file $filename: $!\n"); $line = ; close(FILE); chomp($line); $line; } sub read_line_nodie { local($filename) = @_; local($line); open(FILE, "<$filename") || return (""); $line = ; close(FILE); chomp($line); $line; } sub read_file_lines { local($filename) = @_; local(@text) = (); open(FILE, "<$filename") || return (); while () { chomp; push(@text, $_); } close(FILE); @text; } sub read_file { local($filename, $leader) = @_; local(@text) = (); open(FILE, "<$filename") || return (); while () { chomp; push(@text, sprintf(" %-10s %s", $leader, $_)); $leader = ""; } close(FILE); @text; } sub read_logfile { local($filename, $leader) = @_; local(@text) = (); open(FILE, "<$filename") || die ("Cannot open log file $filename: $!\n"); while () { chomp; push(@text, $leader.$_); } close(FILE); @text; } # # do an 'cvs -Qn status' on each file in the arguments, and extract info. # sub change_summary { local($out, @filenames) = @_; local(@revline); local($file, $rev, $rcsfile, $line, $vhost, $cvsweb_base); while (@filenames) { $file = shift @filenames; if ("$file" eq "") { next; } open(RCS, "-|") || exec "$cvsbin/cvs", '-Qn', 'status', '--', $file; $rev = ""; $delta = ""; $rcsfile = ""; while () { if (/^[ \t]*Repository revision/) { chomp; @revline = split(' ', $_); $rev = $revline[2]; $rcsfile = $revline[3]; $rcsfile =~ s,^$CVSROOT/,,; $rcsfile =~ s/,v$//; } } close(RCS); if ($rev ne '' && $rcsfile ne '') { open(RCS, "-|") || exec "$cvsbin/cvs", '-Qn', 'log', "-r$rev", '--', $file; while () { if (/^date:/) { chomp; $delta = $_; $delta =~ s/^.*;//; $delta =~ s/^[\s]+lines://; } } close(RCS); } $diff = "\n\n"; $vhost = $path[0]; if ($CVSWEB_PORT eq "80") { $cvsweb_base = "$CVSWEB_SCHEME://$vhost.$CVSWEB_DOMAIN/$CVSWEB_URI"; } else { $cvsweb_base = "$CVSWEB_SCHEME://$vhost.$CVSWEB_DOMAIN:$CVSWEB_PORT/$CVSWEB_URI"; } if ($SEND_URL eq "true") { $diff .= $cvsweb_base . join("/", @path) . "/$file"; } # # If this is a binary file, don't try to report a diff; not only is # it meaningless, but it also screws up some mailers. We rely on # Perl's 'is this binary' algorithm; it's pretty good. But not # perfect. # if (($file =~ /\.(?:pdf|gif|jpg|mpg)$/i) || (-B $file)) { if ($SEND_URL eq "true") { $diff .= "?rev=$rev&content-type=text/x-cvsweb-markup\n\n"; } if ($SEND_DIFF eq "true") { $diff .= "\t<>\n\n"; } } else { # # Get the differences between this and the previous revision, # being aware that new files always have revision '1.1' and # new branches always end in '.n.1'. # if ($rev =~ /^(.*)\.([0-9]+)$/) { $prev = $2 - 1; $prev_rev = $1 . '.' . $prev; $prev_rev =~ s/\.[0-9]+\.0$//;# Truncate if first rev on branch if ($rev eq '1.1') { if ($SEND_URL eq "true") { $diff .= "?rev=$rev&content-type=text/x-cvsweb-markup\n\n"; } if ($SEND_DIFF eq "true") { open(DIFF, "-|") || exec "$cvsbin/cvs", '-Qn', 'update', '-p', '-r1.1', '--', $file; $diff .= "Index: $file\n==================================" . "=================================\n"; } } else { if ($SEND_URL eq "true") { $diff .= ".diff?r1=$prev_rev&r2=$rev\n\n"; } if ($SEND_DIFF eq "true") { $diff .= "(In the diff below, changes in quantity " . "of whitespace are not shown.)\n\n"; open(DIFF, "-|") || exec "$cvsbin/cvs", '-Qn', 'diff', "$difftype", '-b', "-r$prev_rev", "-r$rev", '--', $file; } } if ($SEND_DIFF eq "true") { while () { $diff .= $_; } close(DIFF); } $diff .= "\n\n"; } } &append_line($out, sprintf("%-9s%-12s%s%s", $rev, $delta, $rcsfile, $diff)); } } sub build_header { local($header); delete $ENV{'TZ'}; local($sec,$min,$hour,$mday,$mon,$year) = localtime(time); $header = sprintf(" User: %-8s\n Date: %02d/%02d/%02d %02d:%02d:%02d", $cvs_user, $year%100, $mon+1, $mday, $hour, $min, $sec); # $header = sprintf("%-8s %02d/%02d/%02d %02d:%02d:%02d", # $login, $year%100, $mon+1, $mday, # $hour, $min, $sec); } # !!! Destination Mailing-list and history file mappings here !!! #sub mlist_map #{ # local($path) = @_; # my $domain = "nongnu.org"; # # if ($path =~ /^([^\/]+)/) { # return "cvs\@$1.$domain"; # } else { # return "cvs\@$domain"; # } #} sub derive_subject_from_changes_file () { my $subj = ""; for ($i = 0; ; $i++) { open (CH, "<$CHANGED_FILE.$i.$id.$cvs_user") or last; while (my $change = ) { # A changes file looks like this: # # src foo.c newfile.html # www index.html project_nav.html # # Each line is " Dir File1 File2 ..." # We only care about Dir, since the subject line should # summarize. $change =~ s/^[ \t]*//; $change =~ /^([^ \t]+)[ \t]*/; my $dir = $1; # Fold to rightmost directory component $dir =~ /([^\/]+)$/; $dir = $1; if ($subj eq "") { $subj = $dir; } else { $subj .= ", $dir"; } } close (CH); } if ($subj ne "") { $subj = "MODIFIED: $subj ..."; } else { # NPM: See if there's any file-addition notifications. my $added = &read_line_nodie("$ADDED_FILE.$i.$id.$cvs_user"); if ($added ne "") { $subj .= "ADDED: $added "; } # print "derive_subject_from_changes_file().. added== $added \n"; ## NPM: See if there's any file-removal notications. my $removed = &read_line_nodie("$REMOVED_FILE.$i.$id.$cvs_user"); if ($removed ne "") { $subj .= "REMOVED: $removed "; } # print "derive_subject_from_changes_file().. removed== $removed \n"; ## NPM: See if there's any branch notifications. my $branched = &read_line_nodie("$BRANCH_FILE.$i.$id.$cvs_user"); if ($branched ne "") { $subj .= "BRANCHED: $branched"; } # print "derive_subject_from_changes_file().. branched== $branched \n"; ## NPM: DEFAULT: DIRECTORY CREATION (c.f. "Check for a new directory first" in main mody) if ($subj eq "") { my $subject = join("/", @path); $subj = "NEW: $subject"; } } return $subj; } sub mail_notification { local($addr_list, @text) = @_; local($mail_to); my $subj = &derive_subject_from_changes_file (); if ($EMULATE_LOCAL_MAIL_USER ne "") { $MAIL_FROM = "$cvs_user\@$EMULATE_LOCAL_MAIL_USER"; } $mail_to = join(", ", @{$addr_list}); print "Mailing the commit message to $mail_to (from $MAIL_FROM)\n"; $ENV{'MAILUSER'} = $MAIL_FROM; # Commented out on hocus, so comment it out here. -kff # $ENV{'QMAILINJECT'} = 'f'; open(MAIL, "$MAIL_CMD -f$MAIL_FROM"); print MAIL "From: $MAIL_FROM\n"; print MAIL "To: $mail_to\n"; print MAIL "Subject: $SUBJECT_PRE $subj\n\n"; print(MAIL join("\n", @text)); close(MAIL); # print "Mailing the commit message to $MAIL_TO...\n"; # # #added by jrobbins@collab.net 1999/12/15 # # attempt to get rid of anonymous # $ENV{'MAILUSER'} = 'commitlogger'; # $ENV{'QMAILINJECT'} = 'f'; # # open(MAIL, "| /var/qmail/bin/qmail-inject"); # print(MAIL "To: $MAIL_TO\n"); # print(MAIL "Subject: cvs commit: $ARGV[0]\n"); # print(MAIL join("\n", @text)); # close(MAIL); } ## process the command line arguments sent to this script ## it returns an array of files, %s, sent from the loginfo ## command sub process_argv { local(@argv) = @_; local(@files); local($arg); print "Processing log script arguments...\n"; while (@argv) { $arg = shift @argv; if ($arg eq '-u') { $cvs_user = shift @argv; } else { ($donefiles) && die "Too many arguments!\n"; $donefiles = 1; $ARGV[0] = $arg; @files = split(' ', $arg); } } return @files; } ############################################################# # # Main Body # ############################################################ # # Setup environment # umask (002); # Connect to the database $cvsbin = "/usr/bin"; # # Initialize basic variables # $id = getpgrp(); $state = $STATE_NONE; $cvs_user = $ENV{'USER'} || getlogin || (getpwuid($<))[0] || sprintf("uid#%d",$<); @files = process_argv(@ARGV); @path = split('/', $files[0]); if ($#path == 0) { $dir = "."; } else { $dir = join('/', @path[1..$#path]); } #print("ARGV - ", join(":", @ARGV), "\n"); #print("files - ", join(":", @files), "\n"); #print("path - ", join(":", @path), "\n"); #print("dir - ", $dir, "\n"); #print("id - ", $id, "\n"); # # Map the repository directory to an email address for commitlogs to be sent # to. # #$mlist = &mlist_map($files[0]); ########################## # # Check for a new directory first. This will always appear as a # single item in the argument list, and an empty log message. # if ($ARGV[0] =~ /New directory/) { $header = &build_header; @text = (); push(@text, $header); push(@text, ""); push(@text, " ".$ARGV[0]); &mail_notification([ $mlist ], @text); exit 0; } # # Iterate over the body of the message collecting information. # while () { chomp; # Drop the newline if (/^Revision\/Branch:/) { s,^Revision/Branch:,,; push (@branch_lines, split); next; } # next if (/^[ \t]+Tag:/ && $state != $STATE_LOG); if (/^Modified Files/) { $state = $STATE_CHANGED; next; } if (/^Added Files/) { $state = $STATE_ADDED; next; } if (/^Removed Files/) { $state = $STATE_REMOVED; next; } if (/^Log Message/) { $state = $STATE_LOG; next; } s/[ \t\n]+$//; # delete trailing space push (@changed_files, split) if ($state == $STATE_CHANGED); push (@added_files, split) if ($state == $STATE_ADDED); push (@removed_files, split) if ($state == $STATE_REMOVED); if ($state == $STATE_LOG) { if (/^PR:$/i || /^Reviewed by:$/i || /^Submitted by:$/i || /^Obtained from:$/i) { next; } push (@log_lines, $_); } } # # Strip leading and trailing blank lines from the log message. Also # compress multiple blank lines in the body of the message down to a # single blank line. # (Note, this only does the mail and changes log, not the rcs log). # while ($#log_lines > -1) { last if ($log_lines[0] ne ""); shift(@log_lines); } while ($#log_lines > -1) { last if ($log_lines[$#log_lines] ne ""); pop(@log_lines); } for ($i = $#log_lines; $i > 0; $i--) { if (($log_lines[$i - 1] eq "") && ($log_lines[$i] eq "")) { splice(@log_lines, $i, 1); } } # # Find the log file that matches this log message # for ($i = 0; ; $i++) { last if (! -e "$LOG_FILE.$i.$id.$cvs_user"); @text = &read_logfile("$LOG_FILE.$i.$id.$cvs_user", ""); last if ($#text == -1); last if (join(" ", @log_lines) eq join(" ", @text)); } # # Spit out the information gathered in this pass. # &write_logfile("$LOG_FILE.$i.$id.$cvs_user", @log_lines); &append_to_file("$BRANCH_FILE.$i.$id.$cvs_user", $dir, @branch_lines); &append_to_file("$ADDED_FILE.$i.$id.$cvs_user", $dir, @added_files); &append_to_file("$CHANGED_FILE.$i.$id.$cvs_user", $dir, @changed_files); &append_to_file("$REMOVED_FILE.$i.$id.$cvs_user", $dir, @removed_files); &append_line("$MLIST_FILE.$i.$id.$cvs_user", $mlist); if ($rcsidinfo) { &change_summary("$SUMMARY_FILE.$i.$id.$cvs_user", (@changed_files, @added_files)); } # # Check whether this is the last directory. If not, quit. # if (-e "$LAST_FILE.$id.$cvs_user") { $_ = &read_line("$LAST_FILE.$id.$cvs_user"); $tmpfiles = $files[0]; $tmpfiles =~ s,([^a-zA-Z0-9_/]),\\$1,g; if (! grep(/$tmpfiles$/, $_)) { print "More commits to come...\n"; exit 0 } } # # This is it. The commits are all finished. Lump everything together # into a single message, fire a copy off to the mailing list, and drop # it on the end of the Changes file. # $header = &build_header; # # Produce the final compilation of the log messages # @text = (); @mlist_list = (); push(@text, $header); push(@text, ""); for ($i = 0; ; $i++) { last if (! -e "$LOG_FILE.$i.$id.$cvs_user"); push(@text, &read_file("$BRANCH_FILE.$i.$id.$cvs_user", "Branch:")); push(@text, &read_file("$CHANGED_FILE.$i.$id.$cvs_user", "Modified:")); push(@text, &read_file("$ADDED_FILE.$i.$id.$cvs_user", "Added:")); push(@text, &read_file("$REMOVED_FILE.$i.$id.$cvs_user", "Removed:")); push(@text, " Log:"); push(@text, &read_logfile("$LOG_FILE.$i.$id.$cvs_user", " ")); push(@mlist_list, &read_file_lines("$MLIST_FILE.$i.$id.$cvs_user")); if ($rcsidinfo == 2) { if (-e "$SUMMARY_FILE.$i.$id.$cvs_user") { push(@text, " "); push(@text, " Revision Changes Path"); push(@text, &read_logfile("$SUMMARY_FILE.$i.$id.$cvs_user", " ")); } } push(@text, ""); } # # Now generate the extra info for the mail message.. # if ($rcsidinfo == 1) { $revhdr = 0; for ($i = 0; ; $i++) { last if (! -e "$LOG_FILE.$i.$id.$cvs_user"); if (-e "$SUMMARY_FILE.$i.$id.$cvs_user") { if (!$revhdr++) { push(@text, "Revision Changes Path"); } push(@text, &read_logfile("$SUMMARY_FILE.$i.$id.$cvs_user", "")); } } if ($revhdr) { push(@text, ""); # consistancy... } } %mlist_hash = (); foreach (@mlist_list) { $mlist_hash{ $_ } = 1; } # # Mail out the notification. # &mail_notification([ keys(%mlist_hash) ], @text); &cleanup_tmpfiles; exit 0; 07070100106b94000081ed0000000000000000000000014d58a1f80000938f000000b600010002ffffffffffffffff0000002a00000000root/usr/local/share/cvs/contrib/pvcs2rcs#! /bin/perl # --------------------------------- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. ########################################################################### # FUNCTION: # To recursively walk through a PVCS archive directory tree (archives # located in VCS/ or vcs/ subdirectories) and convert them to RCS archives. # The RCS archive name is the PVCS workfile name with ",v" appended. # # SYNTAX: # pvcs_to_rcs.pl --help # # where -l indicates the operation is to be performed only in the current # directory (no recursion) # # EXAMPLE: # pvcs_to_rcs # Would walk through every VCS or vcs subdir starting at the current directory, # and produce corresponding RCS archives one level above the VCS or vcs subdir. # (VCS/../RCS/) # # NOTES: # * This script performs little error checking and logging # (i.e. USE AT YOUR OWN RISK) # * This script was last tested using ActiveState's port of Perl 5.005_02 # (internalcut #507) under Win95, though it does compile under Perl-5.00404 # for Solaris 2.4 run on a Solaris 2.6 system. The script crashed # occasionally under ActiveState's port of Perl 5.003_07 but this stopped # happening with the update so if you are having problems, try updating Perl. # Upgrading to cut #507 also seemed to coincide with a large speed # improvement, so try and keep up, hey? :) It was executed from MKS's # UNIX tools version 6.1 for Win32's sh. ALWAYS redirect your output to # a log!!! # * PVCS archives are left intact # * RCS archives are created in VCS/../RCS/ (or ./RCS using '-pflat') # * Branch labels in this script will be attached to the CVS magic # revision number. For branch a.b.c of a particular file, this means # the label will be attached to revision a.b.0.c of the converted # file. If you use the TrunkTip (1.*) label, be aware that it will convert # to RCS revision 0.1, which is useless to RCS and CVS. You'll probably # have to delete these. # * All revisions are saved with correct "metadata" (i.e. check-in date, # author, and log message). Any blank log message is replaced with # "no comment". This is because RCS does not allow non-interactive # check in of a new revision without a comment string. # * Revision numbers are incremented by 1 during the conversion (since # RCS does not allow revision 1.0). # * All converted branch numbers are even (the CVS paradigm) # * Version labels are assigned to the appropriate (incremented) revision # numbers. PVCS allows spaces and periods in version labels while RCS # does not. A global search and replace converts " " and "." to "_" # There may be other cases that ought to be added. # * Any working (checked-out) copies of PVCS archives # within the VCS/../ or vcs/../ (or possibly ./ with '-pflat') # will be deleted (or overwritten) depending on your mode of # operation since the current ./ is used in the checkout of each revision. # I suppose if development continues these files could be redirected to # temp space rather than ./ . # * Locks on PVCS archives should be removed (or the workfiles should be # checked-in) prior to conversion, although the script will blaze through # the archive nonetheless (But you would lose any checked out revision(s)) # * The -kb option is added to the RCS archive for workfiles with the following # extensions: .bin .out .btl .rom .a07 .lib .exe .tco .obj .t8u .c8u .o .lku # .a and a few others. The %bin_ext variable holds these values in regexp # form. # * the --force-binary option can be used to convert binary files which don't # have proper extensions, but I'd *probably* edit the %bin_ext variable. # * This script will abort occasionally with the error "invalid revision # number". This is known to happen when a revision comment has # /^\s*Rev/ (Perl regexp notation) in it. Fix the comment and start over. # (The directory locks and existance checking make this a fairly quick # process.) # * This script writes lockfiles in the RCS/ directories. It will also not # convert an archive if it finds the RCS Archive existant in the RCS/ # directory. This enables the conversion to quickly pick up where it left # off after errors or interrupts occur. If you interrupt the script make # sure you delete the last RCS Archive File which was being written. # If you recieve the "Invalid revision number" error, then the RCS archive # file for that particular PVCS file will not have been created yet. # * This script will not create lockfiles when processing single # filenames passed into the script, for hopefully obvious reasons. # (lockfiles lock directories - DRP) # * Log the output to a file. That makes it real easy to grep for errors # later. (grep for "^[ \t]*(rcs|ci):" and be aware I might have missed # a few cases (get? vcs?) !!!) *** Also note that this script will # exibit some harmless RCS errors. Namely, it will attempt to lock # branches which haven't been created yet. *** # * I tried to keep the error and warning info up to date, but it seems # to mean very little. This script almost always exits with a warning # or an error that didn't seem to cause any harm. I didn't trace it # and our imported source checks out and builds... # It is probably happening when trying to convert empty directories # or read files (possibly checked out workfiles ) which are not # pvcs_archives. # * You must use the -pflat option when processing single filenames # passed as arguments to the script. This is probably a bug. # * questions, comments, additions can be sent to info-cvs@nongnu.org ######################################################################### # # USER Configurables # # %bin_ext should be editable from the command line. # # NOTE: Each possible binary extension is listed as a Perl regexp # # The value associated with each regexp key is used to print a log # message when a binary file is found. my %bin_ext = ( '\.(?i)bin$' => "Binary", '\.(?i)out$' => "Default Compiler Output", '\.(?i)btl$' => "", '\.(?i)rom$' => "", '\.(?i)a07$' => "", '\.(?i)lib$' => "DOS/Wintel/Netware Compiler Library", '\.(?i)lif$' => "Netware Binary File", '\.(?i)exe$' => "DOS/Wintel Executable", '\.(?i)tco$' => "", '\.(?i)obj$' => "DOS/Wintel Compiler Object", '\.(?i)res$' => "DOS/Wintel Resource File", '\.(?i)ico$' => "DOS/Wintel Icon File", '\.(?i)nlm$' => "Netware Loadable Module", '\.(?i)t8u$' => "", '\.(?i)c8u$' => "", '\.(?i)lku$' => "", '\.(?i)(bmp|gif|jpg|jpeg|jfif|tif|tiff|xbm)$' => "Image", '\.(?i)dll$' => "DOS/Wintel Dynamically Linked Library", '\.o$' => "UNIX Compiler Object", '\.a$' => "UNIX Compiler Library", '\.so(\.\d+\.\d+)?$' => "UNIX Shared Library" ); # The binaries this script is dependant on: my @bin_dependancies = ("vcs", "vlog", "rcs", "ci"); # Where we should put temporary files my $tmpdir = $ENV{TMPDIR} ? $ENV{TMPDIR} : "/var/tmp"; # We use these... use strict; use Cwd; use File::Path; use IO::File; use Getopt::Long; $Getopt::Long::bundling = 1; # $Getopt::Long::ignorecase = 0; my $usage = "\ usage: $0 -h $0 [-lt] [-i vcsid] [-r flat|leaf] [-p flat|leaf] [-x rcs_extension] [-v none|locks|exists] [options] [path...] "; my $help = "\ $usage ---------------------------- ----------------------------------- -h | --Help Print this text General Settings ---------------------------- ----------------------------------- --Recurse Recurse through directories (default) -l | --NORecurse Process only . --Errorfiles Save a count of conversion errors in the RCS archive directory (default) (unimplemented) --NOErrorfiles Don't save a count of conversion errors (unimplemented) ( -m | --Mode ) Convert Convert PVCS files to RCS files (default) ( -m | --Mode ) Verify Perform verification ONLY (unimplemented) ( -v | --VERIfy ) None Always replace existing RCS files ( -v | --VERIfy ) LOCKS Same as exists unless a #conv.done file exists in the RCS directory. In that case, only the #conv.done file's existance is verified for that directory. (default) ( -v | --VERIfy ) Exists Don't replace existing RCS files ( -v | --VERIfy ) LOCKDates Verify that an existing RCS file's last modification date is older than that of the lockfile (unimplemented) ( -v | --VERIfy ) Revs Verify that the PVCS archive files and RCS archive file contain the same number of corresponding revisions. Add only new revisions to the RCS file. (unimplemented) ( -v | --VERIfy ) Full Perform --verify=Revs and confirm that the text of the revisions is identical. Add only new revisions unless an error is found. Then erase the RCS archive and recreate it. (unimplemented) -t | --Test-binaries Use 'which' to check \$PATH for the binaries required by this script (default) --NOTest-binaries Don't check for binaries --VERBose Enable verbose output --NOVerbose Disable verbose output (default) -w | --Warnings Print warning messages (default) --NOWarnings Don't print warning messages RCS Settings ---------------------------- ----------------------------------- ( -r | --RCS-Dirs ) leaf RCS files stored in ./RCS (default) ( -r | --RCS-Dirs ) flat RCS files stored in . (unimplemented) ( -x | --RCS-Extension ) Set RCS file extension (default = ',v') --Force-binary Pass '-kb' to 'rcs -i' regardless of the file extension --NOForce-binary Only use '-kb' when the file has a binary extension (default) --Cvs-branch-labels Use CVS magic branch revision numbers when attaching branch labels (default) --NOCvs-branch-labels Attach branch labels to RCS branch revision numbers (unimplemented) PVCS Settings ---------------------------- ----------------------------------- ( -p | --Pvcs-dirs ) leaf PVCS files expected in ./VCS (default) ( -p | --Pvcs-dirs ) flat PVCS files expected in . ( -i | --VCsid ) vcsid Use vcsid instead of \$VCSID -------------------------------------------------------------------------- The optional path argument should contain the name of a file or directory to convert. If not given, it will default to '.'. -------------------------------------------------------------------------- "; # # Initialize globals # my ($errors, $warnings) = (0, 0); my ($curlevel, $maxlevel); my ($rcs_base_command, $ci_base_command); my ($donefile_name, $errorfile_name); # set up the default options my %options = ( recurse => 1, mode => "convert", errorfiles => 1, 'rcs-dirs' => "leaf", 'rcs-extension' => ",v", 'force-binary' => 0, 'cvs-branch-labels' => 1, 'pvcs-dirs' => "leaf", verify => "locks", 'test-binaries' => 1, vcsid => $ENV{VCSID} || "", verbose => 0, debug => 0, warnings => 1 ); # This is untested except under Solaris 2.4 or 2.6 and # may not be portable # # I think the readline lib or some such has an interface # which may enable this now. The perl installer sure looks # like it's testing this kind of thing, anyhow. sub hit_any_key { STDOUT->autoflush; system "stty", "-icanon", "min", "1"; print "Hit any key to continue..."; getc; system "stty", "icanon", "min", "0"; STDOUT->autoflush (0); print "\nI always wondered where that key was...\n"; } # print the usage sub print_usage { my $fh = shift; unless (ref $fh) { my $fdn = $fh ? $fh : "STDERR"; $fh = new IO::File; $fh->fdopen ($fdn, "w"); } $fh->print ($usage); } # print the help sub print_help { my $fh = shift; unless (ref $fh) { my $fdn = $fh ? $fh : "STDOUT"; $fh = new IO::File; $fh->fdopen ($fdn, "w"); } $fh->print ($help); } # print the help and exit $_[0] || 0 sub exit_help { print_help; exit shift || 0; } sub error_count { my $type = shift or die "$0: error - error_count usage: error_count type [, ref] [, LIST]\n"; my $error_count_ref; my $outstring; if (ref ($_[0]) && ref ($_[0]) == "SCALAR") { $error_count_ref = shift; } else { $error_count_ref = \$errors; } $$error_count_ref++; push @_, "something wrong.\n" unless ( @_ > 0 ); $outstring = sprintf "$0: $type - " . join ("", @_); $outstring .= sprintf " - $!\n" unless ($outstring =~ /\n$/); print STDERR $outstring; if ($options{errorfiles}) { my $fh = new IO::File ">>$errorfile_name" or new IO::File ">$errorfile_name"; if ($fh) { $fh->print ($$error_count_ref . "\n"); $fh->print ($outstring); $fh->close; } else { my $cd = cwd; print STDERR "$0: error - failed to open errorfile $cd/$errorfile_name - $!\n" if ($options{debug}); } } return $$error_count_ref; } # the main procedure that is run once in each directory sub execdir { my $dir = shift; my ($errors, $warnings) = (0, 0); # We return these error counters my $old_dir = cwd; local ($_, @_); my $i; # Generic counter my ($pvcsarchive, $workfile, $rcsarchive); # .??v, checked out file, and ,v files, # respectively my ($rev_count, $first_vl, $last_vl, $description, $rev_index, @rev_num, %checked_in, %author, $relative_comment_index, @comment_string, %comment); my ($num_version_labels, $label_index, @label_revision, $label, @new_label, $rcs_rev); my ($revision, %rcs_rev_num); my ($get_output, $rcs_output, $ci_output, $mv_output); my ($ci_command, $rcs_command, $wtr); my @hits; my ($num_fields); my $skipdirlock; # if true, don't write conv.out # used only for single file operations # at the moment my $cd; my @filenames; # We may have recieved a single file name to process... if ( -d $dir ) { # change into the directory to be processed # open the current directory for listing # initialize the list of filenames # and set filenames equal to directory listing unless ( ( chdir $dir ) and ( opendir CURDIR, "." ) and ( @filenames = readdir CURDIR ) ) { $cd = cwd; error_count 'error', \$errors, "skipping directory $dir from $cd"; chdir $old_dir or die "Failed to restore original directory ($old_dir): ", $!, ", stopped"; return ($errors, $warnings); } # clean up by closing the directory closedir(CURDIR); } elsif ( -f $dir ) # we recieved a single file { push @filenames, $dir; $skipdirlock = 1; } else { $cd = cwd; error_count 'error', \$errors, "no such directory/file $dir from $cd\n"; # chdir $old_dir or die "Failed to restore original directory ($old_dir): ", $!, ", stopped"; return ($errors, $warnings); } # save the current directory $cd = cwd; # increment the global $curlevel variable $curlevel = $curlevel +1; # initialize a list for any subdirectories and any files # we need to process my $vcsdir = ""; my (@subdirs, $fn, $file, @files, @pvcsarchives); # print "$cd: " . join (", ", @filenames) . "\n"; # hit_any_key; (@files, @pvcsarchives) = ( (), () ); # begin a for loop to execute on each filename in the list @filename foreach $fn (@filenames) { # if the file is a directory... if (-d $fn) { # then if we are not expecting a flat arrangement of pvcs files # and we found a vcs directory add its files to @pvcsarchives if (!$options{'pvcs-dirs-flat'} and $fn =~ /^vcs$/i) { if ($options{verify} =~ /^locks$/ ) { if ( -f $donefile_name ) { print "Verified existence of lockfile $cd/$donefile_name." . ( ($options{mode} =~ /^convert$/) ? " Skipping directory." : "" ) . "\n" if ($options{verbose}); next; } elsif ( $options{mode} =~ /^verify$/ ) { print "No lockfile found for $cd .\n"; next; } } # else add the files in the vcs dir to our list of files to process error_count 'warning', \$warnings, "Found two vcs dirs in directory $cd.\n" if ($vcsdir and $options{warnings}); $vcsdir = $fn; unless ( ( opendir VCSDIR, $vcsdir ) and ( @files = readdir VCSDIR ) ) { error_count 'error', \$errors, "skipping directory &cd/$fn"; next; } closedir VCSDIR; # and so we don't need to worry about where these # files came from later... foreach $file (@files) { push @pvcsarchives, "$vcsdir/$file" if (-f "$vcsdir/$file"); } # don't want recursion here... @pvcsarchives = grep !/^\.\.?$/, @pvcsarchives; } elsif ($fn !~ /^\.\.?$/) { next if (!$options{'rcs-dirs-flat'} and $fn =~ /^rcs$/i); # include it in @subdir if it's not a parent directory push(@subdirs,$fn); } } # else if we are processing a flat arrangement of pvcs files... elsif ($options{'pvcs-dirs-flat'} and -f $fn) { if ($options{verify} =~ /^locks$/) { if ( -f $donefile_name) { print "Found lockfile $cd/$donefile_name." . ( ($options{mode} =~ /^convert$/) ? " Skipping directory." : "" ) . "\n" if ($options{verbose}); last; } elsif ($options{mode} =~ /^verify$/) { print "No lockfile found for $cd .\n"; last; } } # else add this to the list of files to process push (@pvcsarchives, $fn); } } # print "pvcsarchives: " . join (", ", @pvcsarchives) . "\n"; # print "subdirs: " . join (", ", @subdirs) . "\n"; # hit_any_key; # for loop of subdirs foreach (@subdirs) { # run execdir on each sub dir if ($maxlevel >= $curlevel) { my ($e, $w) = execdir ($_); $errors += $e; $warnings += $w; } } # Print output header for each directory print("Directory: $cd\n"); # the @files variable should already contain the list of files # we should attempt to process if ( @pvcsarchives && ( $options{mode} =~ /^convert$/ ) ) { # create an RCS directory in parent to store RCS files in if ( !( $options{'rcs-dirs-flat'} or (-d "RCS") or mkpath ( "RCS" ) ) ) { error_count 'error', \$errors, "failed to make directory $cd/RCS - skipping directory $cd"; @pvcsarchives = (); # after all, we have nowhere to put them... } } # begin a for loop to execute on each filename in the list @files foreach $pvcsarchive (@pvcsarchives) { my $got_workfile = 0; my $got_version_labels = 0; my $got_description = 0; my $got_rev_count = 0; my $abs_file = $cd . "/" . $pvcsarchive; print("Verifying $abs_file...\n") if ($options{verbose}); print "vlog $pvcsarchive\n"; my $vlog_output = `vlog $pvcsarchive`; $_ = $vlog_output; # Split the vcs status output into individual lines my @vlog_strings = split /\n/; my $num_vlog_strings = @vlog_strings; $_ = $vlog_strings[0]; if ( /^\s*$/ || /^vlog: warning/ ) { error_count 'warning', \$warnings, "$abs_file is NOT a valid PVCS archive!!!\n"; next; } my $num; # Collect all vlog output into appropriate variables # # This will ignore at the very least the /^\s*Archive:\s*/ field # and maybe more. This should not be a problem. for ( $num = 0; $num < $num_vlog_strings; $num++ ) { # print("$vlog_strings[$num]\n"); $_ = $vlog_strings[$num]; if( ( /^Workfile:\s*/ ) && (!$got_workfile ) ) { my $num_fields; $got_workfile = 1; # get the string to the right of the above search (with any path stripped) $workfile = $'; $_ = $workfile; $num_fields = split /[\/\\]/; if ( $num_fields > 1 ) { $workfile = $_[$num_fields - 1 ]; } $rcsarchive = $options{'rcs-dirs-flat'} ? "" : "RCS/"; $rcsarchive .= $workfile; $rcsarchive .= $options{'rcs-extension'} if ($options{'rcs-extension'}); print "Workfile is $workfile\n" if ($options{debug}); } elsif ( ( /^Rev count:\s*/ ) && (!$got_rev_count ) ) { $got_rev_count = 1; # get the string to the right of the above search $rev_count = $'; print "Revision count is $rev_count\n"; } elsif ( ( /^Version labels:\s*/ ) && (!$got_version_labels ) ) { $got_version_labels = 1; $first_vl = $num+1; print "Version labels start at $first_vl\n" if ($options{debug}); } elsif ( ( /^Description:\s*/ ) && (!$got_description ) ) { $got_description = 1; $description = "\"" . $vlog_strings[$num+1] . "\""; print "Description is $description\n" if ($options{debug}); $last_vl = $num - 1; } elsif ( /^Rev\s+/ ) # get all the revision information at once { $rev_index = 0; @rev_num = (); while ( $rev_index < $rev_count ) { $_ = $vlog_strings[$num]; /^\s*Rev\s+(\d+\.(\d+\.\d+\.)*\d+)$/; $rev_num[$rev_index] = $1; print "Found revision: $rev_num[$rev_index]\n" if ($options{debug}); die "Not a valid revision ($rev_num[$rev_index]).\n" if ($rev_num[$rev_index] !~ /^(\d+\.)(\d+\.\d+\.)*\d+$/); $_ = $vlog_strings[$num+1]; /^\s*Locked\s*/ and $num++; $_ = $vlog_strings[$num+1]; /^\s*Checked in:\s*/; $checked_in{$rev_num[$rev_index]} = "\"" . $' . "\""; print "Checked in: $checked_in{$rev_num[$rev_index]}\n" if ($options{debug}); $_ = $vlog_strings[$num+3]; /^\s*Author id:\s*/; split; $author{$rev_num[$rev_index]} = "\"" . $_[2] . "\""; print "Author: $author{$rev_num[$rev_index]}\n" if ($options{debug}); my @branches = (); $_ = $vlog_strings[$num+1]; if (/^\s*Branches:\s*/) { $num++; @branches = split /\s+/, $'; } $relative_comment_index = 0; @comment_string = (); while( ( ( $num + 4 + $relative_comment_index ) < @vlog_strings) && ( $vlog_strings[$num+4+$relative_comment_index] !~ /^\s*Rev\s+(\d+\.(\d+\.\d+\.)*\d+)$/ ) ) { # We need the \n added for multi-line comments. There is no effect for # single-line comments since RCS inserts the \n if it doesn't exist already # print "Found commment line: $vlog_strings[$num+4+$relative_comment_index]\n" # if ($options{debug}); push @comment_string, $vlog_strings[$num+4+$relative_comment_index], "\n"; $relative_comment_index += 1; } # print "Popped from comment: " . join ("", splice (@comment_string, -2)) # . "\n" # if ($options{debug}); # Pop the "-+" or "=+" line from the comment while ( (pop @comment_string) !~ /^-{35}|={35}$/ ) {} $comment{$rev_num[$rev_index]} = join "", @comment_string; $num += ( 4 + $relative_comment_index ); print "Got comment for $rev_num[$rev_index]\n" if ($options{debug}); print "comment string: $comment{$rev_num[$rev_index]}\n" if ($options{debug}); $rev_index += 1; } # while ( $rev_index < $rev_count ) $num -= 1; #although there should be nothing left for this to matter } # Get Rev information } # for ($num = 0; $num < $num_vlog_strings; $num++) # hit_any_key if ($options{debug}); # Create RCS revision numbers corresponding to PVCS version numbers foreach $revision (@rev_num) { $rcs_rev_num{ $revision } = &pvcs_to_rcs_rev_number( $revision ); print"PVCS revision is $revision; RCS revision is $rcs_rev_num{ $revision }\n" if ($options{debug}); } # Sort the revision numbers - PVCS and RCS store them in different orders # Clear @_ so we don't pass anything in by accident... @_ = (); @rev_num = sort revisions @rev_num; print "Sorted rev_nums:\n" . join ("\n", @rev_num) . "\n" if ($options{debug}); # hit_any_key; # Loop through each version label, checking for need to relabel ' ' with '_'. $num_version_labels = $last_vl - $first_vl + 1; print "Version label count is $num_version_labels\n"; for( $i = $first_vl; $i <= $last_vl; $i += 1 ) { # print("$vlog_strings[$i]\n"); $label_index = $i - $first_vl; $_=$vlog_strings[$i]; print "Starting with string '$_'\n" if ($options{debug}); split /\"/; $label = $_[1]; print "Got label '$label'\n" if ($options{debug}); split /\s+/, $_[2]; $label_revision[$label_index] = $_[2]; print "Original label is $label_revision[$label_index]\n" if ($options{debug}); # Create RCS revision numbers corresponding to PVCS version numbers by # adding 1 to the revision number (# after last .) $label_revision[ $label_index ] = pvcs_to_rcs_rev_number( $label_revision [ $label_index ] ); # replace ' ' with '_', if needed $_=$label; $new_label[$label_index] = $label; $new_label[$label_index] =~ s/ /_/g; $new_label[$label_index] =~ s/\./_/g; $new_label[$label_index] = "\"" . $new_label[$label_index] . "\""; print"Label $new_label[$label_index] is for revision $label_revision[$label_index]\n" if ($options{debug}); } ########## # # See if the RCS archive is up to date with the PVCS archive # ########## if ($options{verify} =~ /^locks|exists$/ and -f $rcsarchive) { print "Verified existence of $cd/$rcsarchive." . ( ($options{mode} =~ /^convert$/) ? " Skipping." : "" ) . "\n" if ($options{verbose}); next; } # Create RCS archive and check in all revisions, then label. my $first_time = 1; foreach $revision (@rev_num) { # print "get -p$revision $pvcsarchive >$workfile\n"; print "get -r$revision $pvcsarchive\n"; # $vcs_output = `vcs -u -r$revision $pvcsarchive`; # $get_output = `get -p$revision $pvcsarchive >$workfile`; $get_output = `get -r$revision $pvcsarchive`; # if this is the first time, delete the rcs archive if it exists # need for $options{verify} == none unlink $rcsarchive if ($first_time and $options{verify} =~ /^none$/ and -f $rcsarchive); # Also check here whether this file ought to be "binary" if ( $first_time ) { $rcs_command = "$rcs_base_command -i"; if ( ( @hits = grep { $workfile =~ /$_/ } keys %bin_ext ) || $options{'force-binary'} ) { $rcs_command .= " -kb"; $workfile =~ /$hits[0]/ if (@hits); print "Binary attribute -kb added (" . (@hits ? "file type is '$bin_ext{$hits[0]}' for extension '$&'" : "forced") . ")\n"; } $first_time and $ci_command .= " -t-$description"; $rcs_command .= " $workfile"; # print and execute the rcs archive initialization command print "$rcs_command\n"; $wtr = new IO::File "|$rcs_command"; $wtr->print ($description); $wtr->print ("\n") unless ($description =~ /\n$/s); $wtr->print (".\n"); $wtr->close; # $rcs_output = `$rcs_base_command -i -kb $workfile`; } # if this isn't the first time, we need to lock the rcs branch # # This is a little messy, but it works. Some extra locking is attempted. # (This happens the first time a branch is used, at the least) my $branch = ""; my @branch; @branch = split /\./, $rcs_rev_num{$revision}; pop @branch; $branch = join ".", @branch; $rcs_output = `$rcs_base_command -l$branch $workfile` if (!$first_time); # If an empty comment is specified, RCS will not check in the file; # check for this case. (but an empty -t- description is fine - go figure!) # Since RCS will pause and ask for a comment if one is not given, # substitute a dummy comment "no comment". $comment{$revision} =~ /^\s*$/ and $comment{$revision} = "no comment\n"; $ci_command = $ci_base_command; $ci_command .= " -f -r$rcs_rev_num{$revision} -d$checked_in{$revision}" . " -w$author{$revision}"; $ci_command .= " $workfile"; # print and execute the ci command print "$ci_command\n"; $wtr = new IO::File "|$ci_command"; $wtr->print ($comment{$revision}); $wtr->print ("\n") unless ($comment{$revision} =~ /\n$/s); $wtr->print (".\n"); $wtr->close; # $ci_output = `$ci_command`; # $ci_output = `cat $tmpdir/ci.out`; $first_time = 0 if ($first_time); } # foreach revision # Attach version labels for( $i = $num_version_labels - 1; $i >= 0; $i -= 1 ) { # print "rcs -x,v -n$new_label[$i]:$label_revision[$i] $workfile\n"; $rcs_output = `$rcs_base_command -n$new_label[$i]:$label_revision[$i] $workfile`; print "Version label $new_label[$i] added to revision $label_revision[$i]\n"; } # foreach label # hit_any_key; } # foreach pvcs archive file # We processed a vcs directory, so if there were any files, lock it. # We are guaranteed to have made the attempt at # # $skipdirlock gets set if a single file name was passed to this function to enable # a '$0 *' operation... if ( @pvcsarchives && !$skipdirlock) { my $fh = new IO::File ">>$donefile_name" or new IO::File ">$donefile_name"; if ($fh) { $fh->close; } else { error_count 'error', \$errors, "couldn't create lockfile $cd/$donefile_name"; } } $curlevel = $curlevel - 1; chdir $old_dir or die "Failed to restore original directory ($old_dir): ", $!, ", stopped"; return ($errors, $warnings); } # # This function effectively does a cmp between two revision numbers # It is intended to be passed into Perl's sort routine. # # the pvcs_out is not implemented well. It should probably be # returnning $b[0] <=> $a[0] rather than $a[0] <=> $b[0] # # The @_ argument implementation was going to be used for revision # comparison as an aid to remove the /^\sRev/ in revision comment # error. The effort was fruitless at the time. sub revisions { my @a = split /\./, (defined $a) ? $a : shift; my @b = split /\./, (defined $b) ? $b : shift; my $function = @_ ? shift : 'rcs_in'; my ($i, $ret_val); die "Not enough arguments to revisions : a = ", join (".", @a), "; b = ", join (".", @b), ", stopped" unless (@a and @b); for ($i = 0; $i < scalar( @a ) && $i < scalar( @b ); $i++) { $a[$i] == $b[$i] or return ($a[$i] <=> $b[$i]); } return 0 if (scalar (@a) == scalar (@b)); if ($function eq 'rcs_in') { return (($i == @b) || -1); } elsif ($function eq 'pvcs_out') { return (($i == @a) || -1); } else { die "error - Invalid function type passed to revisions ($function)", ", stopped"; } } sub pvcs_to_rcs_rev_number { my($input, $num_fields, @rev_string, $return_rev_num, $i); $input = $_[0]; $_ = $input; $num_fields = split /\./; @rev_string = @_; # @rev_string[$num_fields-1] += 1; for( $i = 1; $i < $num_fields; $i += 1 ) { if ( $i % 2 ) { # DRP: 10/1 # RCS does not allow revision zero $rev_string[ $i ] += 1; } elsif ( $i ) { # DRP: 10/1 # Branches must have even references for compatibility # with CVS's magic branch numbers. # (Indexes 2, 4, 6...) $rev_string[ $i ] *= 2; } } # If this is a branch revision # (PVCS: a.b.c.*) then we want the CVS # revision # instead. It's okay to do this conversion here since we # never commit to branches. We'll only get a PVCS revision # in that # form when looking through the revision labels. if ($input =~ /\*$/) { pop @rev_string; push @rev_string, splice (@rev_string, -1, 1, "0"); } $return_rev_num = join ".", @rev_string; return $return_rev_num; } ### ### ### ### ### ### MAIN program: checks to see if there are command line parameters ### ### ### ### ### # and read the options die $usage unless GetOptions (\%options, "h|help" => \&exit_help, "recurse!", "mode|m=s", "errorfiles!", "l", "rcs-dirs|rcs-directories|r=s", "pvcs-dirs|pvcs-directories|p=s", "test-binaries|t!", "rcs-extension=s", "verify|v=s", "vcsid|i=s", "verbose!", "debug!", "force-binary!", "cvs-branch-labels!", "warnings|w!"); # # Special processing for -l !^#%$^@#$%#$ # # At the moment, -l overrides --recurse, regardless of the order the # options were passed in # $options{recurse} = 0 if defined $options{l}; delete $options{l}; # Make sure we got acceptable values for rcs-dirs and pvcs-dirs my @hits = grep /^$options{'rcs-dirs'}/i, ("leaf", "flat"); @hits == 1 or die "$0: $options{'rcs-dirs'} invalid argument to --rcs-dirs or ambiguous\n" . " abbreviation.\n" . " Must be one of: 'leaf' or 'flat'.\n" . $usage; $options{'rcs-dirs'} = $hits[0]; $options{'rcs-dirs-flat'} = ($options{'rcs-dirs'} =~ /flat/); delete $options{'rcs-dirs'}; @hits = grep /^$options{'pvcs-dirs'}/i, ("leaf", "flat"); @hits == 1 or die "$0: $options{'pvcs-dirs'} invalid argument to --pvcs-dirs or ambiguous\n" . " abbreviation.\n" . " Must be one of: 'leaf' or 'flat'.\n" . $usage; $options{'pvcs-dirs'} = $hits[0]; $options{'pvcs-dirs-flat'} = ($options{'pvcs-dirs'} =~ /flat/); delete $options{'pvcs-dirs'}; # and for verify @hits = grep /^$options{verify}/i, ("none", "locks", "exists", "lockdates", "revs", "full"); @hits == 1 or die "$0: $options{verify} invalid argument to --verify or ambiguous\n" . " abbreviation.\n" . " Must be one of: 'none', 'locks', 'exists', 'lockdates', 'revs',\n" . " or 'full'.\n" . $usage; $options{verify} = $hits[0]; $options{verify} =~ /^none|locks|exists$/ or die "$0: --verify=$options{verify} unimplemented.\n" . $usage; # and mode @hits = grep /^$options{mode}/i, ("convert", "verify"); @hits == 1 or die "$0: $options{mode} invalid argument to --mode or ambiguous abbreviation.\n" . " Must be 'convert' or 'verify'.\n" . $usage; $options{mode} = $hits[0]; $options{'cvs-branch-labels'} or die "$0: RCS Branch Labels unimplemented.\n" . $usage; # export VCSID into th environment for ourselves and our children $ENV{VCSID} = $options{vcsid}; # # Verify we have all the binary executables we need to run this script # # Allowed this feature to be disabled in case which is missing or we are # running on a system which does not return error codes properly (e.g. WIN95) # # -- i.e. I don't feel like grepping output yet. -- # my @missing_binaries = (); if ($options{'test-binaries'}) { foreach (@bin_dependancies) { if (system "which", $_) { push @missing_binaries, $_; } } if (scalar @missing_binaries) { print STDERR "The following executables were not found in your PATH: " . join ( " ", @missing_binaries ) . "\n" . "You must correct this before continuing.\n"; exit 1; } } delete $options{'test-binaries'}; # # set up our base archive manipulation commands # # set up our rcs_command mods $rcs_base_command = "rcs"; $rcs_base_command .= " -x$options{'rcs-extension'}" if ($options{'rcs-extension'}); # set up our rcs_command mods $ci_base_command = "ci"; $ci_base_command .= " -x$options{'rcs-extension'}" if ($options{'rcs-extension'}); # # So our logs fill in a manner we can monitor with 'tail -f' fairly easily: # STDERR->autoflush (1); STDOUT->autoflush (1); # Initialize the globals we use to keep track of recursion if ($options{recurse}) { $maxlevel = 10000; # Arbitrary recursion limit } else { $maxlevel = 1; } delete $options{recurse}; # So we can lock the directories behind us $donefile_name = $options{'rcs-dirs-flat'} ? "" : "RCS/"; $errorfile_name = $donefile_name . "#conv.errors"; $donefile_name .= "#conv.done"; # # start the whole thing and drop the return code on exit # push (@ARGV, ".") unless (@ARGV); while ($_ = shift) { # reset the recursion level (corresponds to directory depth) # level 0 is the first directory we enter... $curlevel = -1; my ($e, $w) = execdir($_); $errors += $e; $warnings += $w; } print STDERR "$0: " . ($errors ? "Aborted" : "Done") . ".\n"; print STDERR "$0: "; print STDERR ($errors ? $errors : "No") . " error" . (($errors != 1) ? "s" : ""); print STDERR ", " . ($warnings ? $warnings : "no") . " warning" . (($warnings != 1) ? "s" : "") if ($options{warnings}); print STDERR ".\n"; # # Woo-hoo! We made it! # exit $errors; 07070100106b95000081ed0000000000000000000000014d58a1f800001402000000b600010002ffffffffffffffff0000002c00000000root/usr/local/share/cvs/contrib/rcs-to-cvs#! /bin/sh # # Copyright (c) 1989-2005 The Free Software Foundation, Inc. # Portions Copyright (c) 1989, Brian Berliner # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # Based on the CVS 1.0 checkin csh script. # Contributed by Per Cederqvist . # Rewritten in sh by David MacKenzie . # ############################################################################# # # Check in sources that previously were under RCS or no source control system. # # The repository is the directory where the sources should be deposited. # # Traverses the current directory, ensuring that an # identical directory structure exists in the repository directory. It # then checks the files in in the following manner: # # 1) If the file doesn't yet exist, check it in as revision 1.1 # # The script also is somewhat verbose in letting the user know what is # going on. It prints a diagnostic when it creates a new file, or updates # a file that has been modified on the trunk. # # Bugs: doesn't put the files in branch 1.1.1 # doesn't put in release and vendor tags # ############################################################################# usage="Usage: rcs-to-cvs [-v] [-m message] [-f message_file] repository" vbose=0 message="" if [ -d /var/tmp ]; then message_file=/var/tmp/checkin.$$; else message_file=/usr/tmp/checkin.$$; fi got_one=0 if [ $# -lt 1 ]; then echo "$usage" >&2 exit 1 fi while [ $# -ne 0 ]; do case "$1" in -v) vbose=1 ;; -m) shift echo $1 > $message_file got_one=1 ;; -f) shift message_file=$1 got_one=2 ;; *) break esac shift done if [ $# -lt 1 ]; then echo "$usage" >&2 exit 1 fi repository=$1 shift if [ -z "$CVSROOT" ]; then echo "Please the environmental variable CVSROOT to the root" >&2 echo " of the tree you wish to update" >&2 exit 1 fi if [ $got_one -eq 0 ]; then echo "Please Edit this file to contain the RCS log information" >$message_file echo "to be associated with this directory (please remove these lines)">>$message_file ${EDITOR-vi} $message_file got_one=1 fi # Ya gotta share. umask 0 update_dir=${CVSROOT}/${repository} [ ! -d ${update_dir} ] && mkdir $update_dir if [ -d SCCS ]; then echo SCCS files detected! >&2 exit 1 fi if [ -d RCS ]; then co RCS/* fi for name in * .[a-zA-Z0-9]* do case "$name" in RCS | *~ | \* | .\[a-zA-Z0-9\]\* ) continue ;; esac echo $name if [ $vbose -ne 0 ]; then echo "Updating ${repository}/${name}" fi if [ -d "$name" ]; then if [ ! -d "${update_dir}/${name}" ]; then echo "WARNING: Creating new directory ${repository}/${name}" mkdir "${update_dir}/${name}" if [ $? -ne 0 ]; then echo "ERROR: mkdir failed - aborting" >&2 exit 1 fi fi cd "$name" if [ $? -ne 0 ]; then echo "ERROR: Couldn\'t cd to $name - aborting" >&2 exit 1 fi if [ $vbose -ne 0 ]; then $0 -v -f $message_file "${repository}/${name}" else $0 -f $message_file "${repository}/${name}" fi if [ $? -ne 0 ]; then exit 1 fi cd .. else # if not directory if [ ! -f "$name" ]; then echo "WARNING: $name is neither a regular file" echo " nor a directory - ignored" continue fi file="${update_dir}/${name},v" comment="" if grep -s '\$Log.*\$' "${name}"; then # If $Log keyword myext=`echo $name | sed 's,.*\.,,'` [ "$myext" = "$name" ] && myext= case "$myext" in c | csh | e | f | h | l | mac | me | mm | ms | p | r | red | s | sh | sl | cl | ml | el | tex | y | ye | yr | "" ) ;; * ) echo "For file ${file}:" grep '\$Log.*\$' "${name}" echo -n "Please insert a comment leader for file ${name} > " read comment ;; esac fi if [ ! -f "$file" ]; then # If not exists in repository if [ ! -f "${update_dir}/Attic/${name},v" ]; then echo "WARNING: Creating new file ${repository}/${name}" if [ -f RCS/"${name}",v ]; then echo "MSG: Copying old rcs file." cp RCS/"${name}",v "$file" else if [ -n "${comment}" ]; then rcs -q -i -c"${comment}" -t${message_file} -m'.' "$file" fi ci -q -u1.1 -t${message_file} -m'.' "$file" if [ $? -ne 0 ]; then echo "ERROR: Initial check-in of $file failed - aborting" >&2 exit 1 fi fi else file="${update_dir}/Attic/${name},v" echo "WARNING: IGNORED: ${repository}/Attic/${name}" continue fi else # File existed echo "ERROR: File exists in repository: Ignored: $file" continue fi fi done [ $got_one -eq 1 ] && rm -f $message_file exit 0 07070100106b96000081ed0000000000000000000000014d58a1f800004c32000000b600010002ffffffffffffffff0000002900000000root/usr/local/share/cvs/contrib/rcs2log#! /bin/sh # Copyright (C) 1995-2005 The Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # RCS to ChangeLog generator # Generate a change log prefix from RCS files (perhaps in the CVS repository) # and the ChangeLog (if any). # Output the new prefix to standard output. # You can edit this prefix by hand, and then prepend it to ChangeLog. # Ignore log entries that start with `#'. # Clump together log entries that start with `{topic} ', # where `topic' contains neither white space nor `}'. Help='The default FILEs are the files registered under the working directory. Options: -c CHANGELOG Output a change log prefix to CHANGELOG (default ChangeLog). -h HOSTNAME Use HOSTNAME in change log entries (default current host). -i INDENT Indent change log lines by INDENT spaces (default 8). -l LENGTH Try to limit log lines to LENGTH characters (default 79). -L FILE Use rlog-format FILE for source of logs. -R If no FILEs are given and RCS is used, recurse through working directory. -r OPTION Pass OPTION to subsidiary log command. -t TABWIDTH Tab stops are every TABWIDTH characters (default 8). -u "LOGINFULLNAMEMAILADDR" Assume LOGIN has FULLNAME and MAILADDR. -v Append RCS revision to file names in log lines. --help Output help. --version Output version number. Report bugs to .' Id='$Id: rcs2log,v 1.48 2001/09/05 23:07:46 eggert Exp $' # Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2003 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. Copyright='Copyright 1992-2003 Free Software Foundation, Inc. This program comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of this program under the terms of the GNU General Public License. For more information about these matters, see the files named COPYING. Author: Paul Eggert ' # functions # Use the traditional C locale. LANG=C LANGUAGE=C LC_ALL=C LC_COLLATE=C LC_CTYPE=C LC_MESSAGES=C LC_NUMERIC=C LC_TIME=C export LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES LC_NUMERIC LC_TIME # These variables each contain a single ASCII character. # Unfortunately, there's no portable way of writing these characters # in older Unix implementations, other than putting them directly into # this text file. SOH='' # SOH, octal code 001 tab=' ' nl=' ' # Parse options. # defaults : ${MKTEMP="/bin/mktemp"} : ${AWK=awk} : ${TMPDIR=/tmp} changelog=ChangeLog # change log file name datearg= # rlog date option hostname= # name of local host (if empty, will deduce it later) indent=8 # indent of log line length=79 # suggested max width of log line logins= # login names for people we know fullnames and mailaddrs of loginFullnameMailaddrs= # loginfullnamemailaddr triplets logTZ= # time zone for log dates (if empty, use local time) recursive= # t if we want recursive rlog revision= # t if we want revision numbers rlog_options= # options to pass to rlog rlogfile= # log file to read from tabwidth=8 # width of horizontal tab while : do case $1 in -c) changelog=${2?}; shift;; -i) indent=${2?}; shift;; -h) hostname=${2?}; shift;; -l) length=${2?}; shift;; -L) rlogfile=${2?}; shift;; -[nu]) # -n is obsolescent; it is replaced by -u. case $1 in -n) case ${2?}${3?}${4?} in *"$tab"* | *"$nl"*) echo >&2 "$0: -n '$2' '$3' '$4': tabs, newlines not allowed" exit 1;; esac login=$2 lfm=$2$tab$3$tab$4 shift; shift; shift;; -u) # If $2 is not tab-separated, use colon for separator. case ${2?} in *"$nl"*) echo >&2 "$0: -u '$2': newlines not allowed" exit 1;; *"$tab"*) t=$tab;; *) t=':';; esac case $2 in *"$t"*"$t"*"$t"*) echo >&2 "$0: -u '$2': too many fields" exit 1;; *"$t"*"$t"*) uf="[^$t]*$t" # An unselected field, followed by a separator. sf="\\([^$t]*\\)" # The selected field. login=`expr "X$2" : "X$sf"` lfm="$login$tab"` expr "X$2" : "$uf$sf" `"$tab"` expr "X$2" : "$uf$uf$sf" `;; *) echo >&2 "$0: -u '$2': not enough fields" exit 1;; esac shift;; esac case $logins in '') logins=$login;; ?*) logins=$logins$nl$login;; esac case $loginFullnameMailaddrs in '') loginFullnameMailaddrs=$lfm;; ?*) loginFullnameMailaddrs=$loginFullnameMailaddrs$nl$lfm;; esac;; -r) case $rlog_options in '') rlog_options=${2?};; ?*) rlog_options=$rlog_options$nl${2?};; esac shift;; -R) recursive=t;; -t) tabwidth=${2?}; shift;; -v) revision=t;; --version) set $Id rcs2logVersion=$3 echo >&2 "rcs2log (GNU Emacs) $rcs2logVersion$nl$Copyright" exit 0;; -*) echo >&2 "Usage: $0 [OPTION]... [FILE ...]$nl$Help" case $1 in --help) exit 0;; *) exit 1;; esac;; *) break;; esac shift done month_data=' m[0]="Jan"; m[1]="Feb"; m[2]="Mar" m[3]="Apr"; m[4]="May"; m[5]="Jun" m[6]="Jul"; m[7]="Aug"; m[8]="Sep" m[9]="Oct"; m[10]="Nov"; m[11]="Dec" ' logdir=`$MKTEMP -d $TMPDIR/rcs2log.XXXXXX` test -n "$logdir" || exit llogout=$logdir/l trap exit 1 2 13 15 trap "rm -fr $logdir 2>/dev/null" 0 # If no rlog-format log file is given, generate one into $rlogfile. case $rlogfile in '') rlogfile=$logdir/r # If no rlog options are given, # log the revisions checked in since the first ChangeLog entry. # Since ChangeLog is only by date, some of these revisions may be duplicates of # what's already in ChangeLog; it's the user's responsibility to remove them. case $rlog_options in '') if test -s "$changelog" then e=' /^[0-9]+-[0-9][0-9]-[0-9][0-9]/{ # ISO 8601 date print $1 exit } /^... ... [ 0-9][0-9] [ 0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9]+ /{ # old-fashioned date and time (Emacs 19.31 and earlier) '"$month_data"' year = $5 for (i=0; i<=11; i++) if (m[i] == $2) break dd = $3 printf "%d-%02d-%02d\n", year, i+1, dd exit } ' d=`$AWK "$e" <"$changelog"` || exit case $d in ?*) datearg="-d>$d";; esac fi;; esac # Use TZ specified by ChangeLog local variable, if any. if test -s "$changelog" then extractTZ=' /^.*change-log-time-zone-rule['"$tab"' ]*:['"$tab"' ]*"\([^"]*\)".*/{ s//\1/; p; q } /^.*change-log-time-zone-rule['"$tab"' ]*:['"$tab"' ]*t.*/{ s//UTC0/; p; q } ' logTZ=`tail "$changelog" | sed -n "$extractTZ"` case $logTZ in ?*) TZ=$logTZ; export TZ;; esac fi # If CVS is in use, examine its repository, not the normal RCS files. if test ! -f CVS/Repository then rlog=rlog repository= else rlog='cvs -q log' repository=`sed 1q &2 "$0: $CVSROOT: CVSROOT has multiple ':/'s" exit 1;; *:/*) # remote repository pository=`expr "X$repository" : '.*:\(/.*\)'`;; *) # local repository case $repository in /*) ;; *) repository=${CVSROOT?}/$repository;; esac if test ! -d "$repository" then echo >&2 "$0: $repository: bad repository (see CVS/Repository)" exit 1 fi pository=$repository;; esac # Ensure that $pository ends in exactly one slash. while : do case $pository in *//) pository=`expr "X$pository" : 'X\(.*\)/'`;; */) break;; *) pository=$pository/; break;; esac done fi # Use $rlog's -zLT option, if $rlog supports it. case `$rlog -zLT 2>&1` in *' option'*) ;; *) case $rlog_options in '') rlog_options=-zLT;; ?*) rlog_options=-zLT$nl$rlog_options;; esac;; esac # With no arguments, examine all files under the RCS directory. case $# in 0) case $repository in '') oldIFS=$IFS IFS=$nl case $recursive in t) RCSdirs=`find . -name RCS -type d -print` filesFromRCSfiles='s|,v$||; s|/RCS/|/|; s|^\./||' files=` { case $RCSdirs in ?*) find $RCSdirs \ -type f \ ! -name '*_' \ ! -name ',*,' \ ! -name '.*_' \ ! -name .rcsfreeze.log \ ! -name .rcsfreeze.ver \ -print;; esac find . -name '*,v' -print } | sort -u | sed "$filesFromRCSfiles" `;; *) files= for file in RCS/.* RCS/* .*,v *,v do case $file in RCS/. | RCS/.. | RCS/,*, | RCS/*_) continue;; RCS/.rcsfreeze.log | RCS/.rcsfreeze.ver) continue;; RCS/.\* | RCS/\* | .\*,v | \*,v) test -f "$file" || continue;; RCS/*,v | RCS/.*,v) ;; RCS/* | RCS/.*) test -f "$file" || continue;; esac case $files in '') files=$file;; ?*) files=$files$nl$file;; esac done case $files in '') exit 0;; esac;; esac set x $files shift IFS=$oldIFS;; esac;; esac case $datearg in ?*) $rlog $rlog_options "$datearg" ${1+"$@"} >$rlogfile;; '') $rlog $rlog_options ${1+"$@"} >$rlogfile;; esac || exit;; esac # Get the full name of each author the logs mention, and set initialize_fullname # to awk code that initializes the `fullname' awk associative array. # Warning: foreign authors (i.e. not known in the passwd file) are mishandled; # you have to fix the resulting output by hand. initialize_fullname= initialize_mailaddr= case $loginFullnameMailaddrs in ?*) case $loginFullnameMailaddrs in *\"* | *\\*) sed 's/["\\]/\\&/g' >$llogout <$llogout || exit output_authors='/^date: / { if ($2 ~ /^[0-9]*[-\/][0-9][0-9][-\/][0-9][0-9]$/ && $3 ~ /^[0-9][0-9]:[0-9][0-9]:[0-9][0-9][-+0-9:]*;$/ && $4 == "author:" && $5 ~ /^[^;]*;$/) { print substr($5, 1, length($5)-1) } }' authors=` $AWK "$output_authors" <"$rlogfile" | sort -u | comm -23 - $llogout ` case $authors in ?*) cat >$llogout </dev/null | $AWK -F: "$awkscript" `$initialize_fullname;; esac # Function to print a single log line. # We don't use awk functions, to stay compatible with old awk versions. # `Log' is the log message. # `files' contains the affected files. printlogline='{ # Following the GNU coding standards, rewrite # * file: (function): comment # to # * file (function): comment if (Log ~ /^\([^)]*\): /) { i = index(Log, ")") filefunc = substr(Log, 1, i) while ((j = index(filefunc, "\n"))) { files = files " " substr(filefunc, 1, j-1) filefunc = substr(filefunc, j+1) } files = files " " filefunc Log = substr(Log, i+3) } # If "label: comment" is too long, break the line after the ":". sep = " " i = index(Log, "\n") if ('"$length"' <= '"$indent"' + 1 + length(files) + i) sep = "\n" indent_string # Print the label. printf "%s*%s:", indent_string, files # Print each line of the log. while (i) { logline = substr(Log, 1, i-1) if (logline ~ /[^'"$tab"' ]/) { printf "%s%s\n", sep, logline } else { print "" } sep = indent_string Log = substr(Log, i+1) i = index(Log, "\n") } }' # Pattern to match the `revision' line of rlog output. rlog_revision_pattern='^revision [0-9]+\.[0-9]+(\.[0-9]+\.[0-9]+)*(['"$tab"' ]+locked by: [^'"$tab"' $,.0-9:;@]*[^'"$tab"' $,:;@][^'"$tab"' $,.0-9:;@]*;)?['"$tab"' ]*$' case $hostname in '') hostname=`( hostname || uname -n || uuname -l || cat /etc/whoami ) 2>/dev/null` || { echo >&2 "$0: cannot deduce hostname" exit 1 } case $hostname in *.*) ;; *) domainname=`(domainname) 2>/dev/null` && case $domainname in *.*) hostname=$hostname.$domainname;; esac;; esac;; esac # Process the rlog output, generating ChangeLog style entries. # First, reformat the rlog output so that each line contains one log entry. # Transliterate \n to SOH so that multiline entries fit on a single line. # Discard irrelevant rlog output. $AWK ' BEGIN { pository = "'"$pository"'" SOH="'"$SOH"'" } /^RCS file: / { if (pository != "") { filename = substr($0, 11) if (substr(filename, 1, length(pository)) == pository) { filename = substr(filename, length(pository) + 1) } if (filename ~ /,v$/) { filename = substr(filename, 1, length(filename) - 2) } if (filename ~ /(^|\/)Attic\/[^\/]*$/) { i = length(filename) while (substr(filename, i, 1) != "/") i-- filename = substr(filename, 1, i - 6) substr(filename, i + 1) } } rev = "?" } /^Working file: / { if (repository == "") filename = substr($0, 15) } /'"$rlog_revision_pattern"'/, /^(-----------*|===========*)$/ { line = $0 if (line ~ /'"$rlog_revision_pattern"'/) { rev = $2 next } if (line ~ /^date: [0-9][- +\/0-9:]*;/) { date = $2 if (date ~ /\//) { # This is a traditional RCS format date YYYY/MM/DD. # Replace "/"s with "-"s to get ISO format. newdate = "" while ((i = index(date, "/")) != 0) { newdate = newdate substr(date, 1, i-1) "-" date = substr(date, i+1) } date = newdate date } time = substr($3, 1, length($3) - 1) author = substr($5, 1, length($5)-1) printf "%s%s%s%s%s%s%s%s%s%s", filename, SOH, rev, SOH, date, SOH, time, SOH, author, SOH rev = "?" next } if (line ~ /^branches: /) { next } if (line ~ /^(-----------*|===========*)$/) { print ""; next } if (line == "Initial revision" || line ~ /^file .+ was initially added on branch .+\.$/) { line = "New file." } printf "%s%s", line, SOH } ' <"$rlogfile" | # Now each line is of the form # FILENAME@REVISION@YYYY-MM-DD@HH:MM:SS[+-TIMEZONE]@AUTHOR@LOG # where @ stands for an SOH (octal code 001), # and each line of LOG is terminated by SOH instead of \n. # Sort the log entries, first by date+time (in reverse order), # then by author, then by log entry, and finally by file name and revision # (just in case). sort -t"$SOH" +2 -4r +4 +0 | # Finally, reformat the sorted log entries. $AWK -F"$SOH" ' BEGIN { logTZ = "'"$logTZ"'" revision = "'"$revision"'" # Initialize the fullname and mailaddr associative arrays. '"$initialize_fullname"' '"$initialize_mailaddr"' # Initialize indent string. indent_string = "" i = '"$indent"' if (0 < '"$tabwidth"') for (; '"$tabwidth"' <= i; i -= '"$tabwidth"') indent_string = indent_string "\t" while (1 <= i--) indent_string = indent_string " " } { newlog = "" for (i = 6; i < NF; i++) newlog = newlog $i "\n" # Ignore log entries prefixed by "#". if (newlog ~ /^#/) { next } if (Log != newlog || date != $3 || author != $5) { # The previous log and this log differ. # Print the old log. if (date != "") '"$printlogline"' # Logs that begin with "{clumpname} " should be grouped together, # and the clumpname should be removed. # Extract the new clumpname from the log header, # and use it to decide whether to output a blank line. newclumpname = "" sep = "\n" if (date == "") sep = "" if (newlog ~ /^\{[^'"$tab"' }]*}['"$tab"' ]/) { i = index(newlog, "}") newclumpname = substr(newlog, 1, i) while (substr(newlog, i+1) ~ /^['"$tab"' ]/) i++ newlog = substr(newlog, i+1) if (clumpname == newclumpname) sep = "" } printf sep clumpname = newclumpname # Get ready for the next log. Log = newlog if (files != "") for (i in filesknown) filesknown[i] = 0 files = "" } if (date != $3 || author != $5) { # The previous date+author and this date+author differ. # Print the new one. date = $3 time = $4 author = $5 zone = "" if (logTZ && ((i = index(time, "-")) || (i = index(time, "+")))) zone = " " substr(time, i) # Print "date[ timezone] fullname ". # Get fullname and email address from associative arrays; # default to author and author@hostname if not in arrays. if (fullname[author]) auth = fullname[author] else auth = author printf "%s%s %s ", date, zone, auth if (mailaddr[author]) printf "<%s>\n\n", mailaddr[author] else printf "<%s@%s>\n\n", author, "'"$hostname"'" } if (! filesknown[$1]) { filesknown[$1] = 1 if (files == "") files = " " $1 else files = files ", " $1 if (revision && $2 != "?") files = files " " $2 } } END { # Print the last log. if (date != "") { '"$printlogline"' printf "\n" } } ' && # Exit successfully. exec rm -fr $logdir # Local Variables: # tab-width:4 # End: 07070100106b8e000081ed0000000000000000000000014d58a1f800000af6000000b600010002ffffffffffffffff0000002a00000000root/usr/local/share/cvs/contrib/cvscheck#! /bin/sh # # Copyright (C) 1995-2005 The Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # cvscheck - identify files added, changed, or removed # in CVS working directory # # Contributed by Lowell Skoog # # This program should be run in a working directory that has been # checked out using CVS. It identifies files that have been added, # changed, or removed in the working directory, but not "cvs # committed". It also determines whether the files have been "cvs # added" or "cvs removed". For directories, it is only practical to # determine whether they have been added. name=cvscheck changes=0 # If we can't run CVS commands in this directory cvs status . > /dev/null 2>&1 if [ $? != 0 ] ; then # Bail out echo "$name: there is no version here; bailing out" 1>&2 exit 1 fi # Identify files added to working directory for file in .* * ; do # Skip '.' and '..' if [ $file = '.' -o $file = '..' ] ; then continue fi # If a regular file if [ -f $file ] ; then if cvs status $file | grep -s '^From:[ ]*New file' ; then echo "file added: $file - not CVS committed" changes=`expr $changes + 1` elif cvs status $file | grep -s '^From:[ ]*no entry for' ; then echo "file added: $file - not CVS added, not CVS committed" changes=`expr $changes + 1` fi # Else if a directory elif [ -d $file -a $file != CVS.adm ] ; then # Move into it cd $file # If CVS commands don't work inside cvs status . > /dev/null 2>&1 if [ $? != 0 ] ; then echo "directory added: $file - not CVS added" changes=`expr $changes + 1` fi # Move back up cd .. fi done # Identify changed files changedfiles=`cvs diff | egrep '^diff' | awk '{print $3}'` for file in $changedfiles ; do echo "file changed: $file - not CVS committed" changes=`expr $changes + 1` done # Identify files removed from working directory removedfiles=`cvs status | egrep '^File:[ ]*no file' | awk '{print $4}'` # Determine whether each file has been cvs removed for file in $removedfiles ; do if cvs status $file | grep -s '^From:[ ]*-' ; then echo "file removed: $file - not CVS committed" else echo "file removed: $file - not CVS removed, not CVS committed" fi changes=`expr $changes + 1` done exit $changes 07070100106b8d000081ed0000000000000000000000014d58a1f800009497000000b600010002ffffffffffffffff0000002a00000000root/usr/local/share/cvs/contrib/cvs_acls#! /bin/perl -T # -*-Perl-*- # Copyright (C) 1994-2005 The Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. ############################################################################### ############################################################################### ############################################################################### # # THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE # WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE # -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS # SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND # NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE # MAILING LIST. # # For more on general Perl security and taint-checking, please try running the # `perldoc perlsec' command. # ############################################################################### ############################################################################### ############################################################################### =head1 Name cvs_acls - Access Control List for CVS =head1 Synopsis In 'commitinfo': repository/path/to/restrict $CVSROOT/CVSROOT/cvs_acls [-d][-u $USER][-f ] where: -d turns on debug information -u passes the client-side userId to the cvs_acls script -f specifies an alternate filename for the restrict_log file In 'cvsacl': {allow.*,deny.*} [|user,user,... [|repos,repos,... [|branch,branch,...]]] where: allow|deny - allow: commits are allowed; deny: prohibited user - userId to be allowed or restricted repos - file or directory to be allowed or restricted branch - branch to be allowed or restricted See below for examples. =head1 Licensing cvs_acls - provides access control list functionality for CVS Copyright (c) 2004 by Peter Connolly All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA =head1 Description This script--cvs_acls--is invoked once for each directory within a "cvs commit". The set of files being committed for that directory as well as the directory itself, are passed to this script. This script checks its 'cvsacl' file to see if any of the files being committed are on the 'cvsacl' file's restricted list. If any of the files are restricted, then the cvs_acls script passes back an exit code of 1 which disallows the commits for that directory. Messages are returned to the committer indicating the file(s) that he/she are not allowed to committ. Additionally, a site-specific set of messages (e.g., contact information) can be included in these messages. When a commit is prohibited, log messages are written to a restrict_log file in $CVSROOT/CVSROOT. This default file can be redirected to another destination. The script is triggered from the 'commitinfo' file in $CVSROOT/CVSROOT/. =head1 Enhancements This section lists the bug fixes and enhancements added to cvs_acls that make up the current cvs_acls. =head2 Fixed Bugs This version attempts to get rid the following bugs from the original version of cvs_acls: =over 2 =item * Multiple entries on an 'cvsacl' line will be matched individually, instead of requiring that all commit files *exactly* match all 'cvsacl' entries. Commiting a file not in the 'cvsacl' list would allow *all* files (including a restricted file) to be committed. [IMO, this basically made the original script unuseable for our situation since any arbitrary combination of committed files could avoid matching the 'cvsacl's entries.] =item * Handle specific filename restrictions. cvs_acls didn't restrict individual files specified in 'cvsacl'. =item * Correctly handle multiple, specific filename restrictions =item * Prohibit mix of dirs and files on a single 'cvsacl' line [To simplify the logic and because this would be normal usage.] =item * Correctly handle a mixture of branch restrictions within one work directory =item * $CVSROOT existence is checked too late =item * Correctly handle the CVSROOT=:local:/... option (useful for interactive testing) =item * Replacing shoddy "$universal_off" logic (Thanks to Karl-Konig Konigsson for pointing this out.) =back =head2 Enhancements =over 2 =item * Checks modules in the 'cvsacl' file for valid files and directories =item * Accurately report restricted entries and their matching patterns =item * Simplified and commented overly complex PERL REGEXPs for readability and maintainability =item * Skip the rest of processing if a mismatch on portion of the 'cvsacl' line =item * Get rid of opaque "karma" messages in favor of user-friendly messages that describe which user, file(s) and branch(es) were disallowed. =item * Add optional 'restrict_msg' file for additional, site-specific restriction messages. =item * Take a "-u" parameter for $USER from commit_prep so that the script can do restrictions based on the client-side userId rather than the server-side userId (usually 'cvs'). (See discussion below on "Admin Setup" for more on this point.) =item * Added a lot more debug trace =item * Tested these restrictions with concurrent use of pserver and SSH access to model our transition from pserver to ext access. =item * Added logging of restricted commit attempts. Restricted commits can be sent to a default file: $CVSROOT/CVSROOT/restrictlog or to one passed to the script via the -f command parameter. =back =head2 ToDoS =over 2 =item * Need to deal with pserver/SSH transition with conflicting umasks? =item * Use a CPAN module to handle command parameters. =item * Use a CPAN module to clone data structures. =back =head1 Version Information This is not offered as a fix to the original 'cvs_acls' script since it differs substantially in goals and methods from the original and there are probably a significant number of people out there that still require the original version's functionality. The 'cvsacl' file flags of 'allow' and 'deny' were intentionally changed to 'allow' and 'deny' because there are enough differences between the original script's behavior and this one's that we wanted to make sure that users will rethink their 'cvsacl' file formats before plugging in this newer script. Please note that there has been very limited cross-platform testing of this script!!! (We did not have the time or resources to do exhaustive cross-platform testing.) It was developed and tested under Red Hat Linux 9.0 using PERL 5.8.0. Additionally, it was built and tested under Red Hat Linux 7.3 using PERL 5.6.1. $Id: cvs_acls.in,v 1.4.4.6 2005/09/01 13:44:49 dprice Exp $ This version is based on the 1.11.13 version of cvs_acls peter.connolly@cnet.com (Peter Connolly) Access control lists for CVS. dgg@ksr.com (David G. Grubbs) Branch specific controls added by voisine@bytemobile.com (Aaron Voisine) =head1 Installation To use this program, do the following four things: 0. Install PERL, version 5.6.1 or 5.8.0. 1. Admin Setup: There are two choices here. a) The first option is to use the $ENV{"USER"}, server-side userId (from the third column of your pserver 'passwd' file) as the basis for your restrictions. In this case, you will (at a minimum) want to set up a new "cvsadmin" userId and group on the pserver machine. CVS administrators will then set up their 'passwd' file entries to run either as "cvs" (for regular users) or as "cvsadmin" (for power users). Correspondingly, your 'cvsacl' file will only list 'cvs' and 'cvsadmin' as the userIds in the second column. Commentary: A potential weakness of this is that the xinetd cvspserver process will need to run as 'root' in order to switch between the 'cvs' and the 'cvsadmin' userIds. Some sysadmins don't like situations like this and may want to chroot the process. Talk to them about this point... b) The second option is to use the client-side userId as the basis for your restrictions. In this case, all the xinetd cvspserver processes can run as userId 'cvs' and no 'root' userId is required. If you have a 'passwd' file that lists 'cvs' as the effective run-time userId for all your users, then no changes to this file are needed. Your 'cvsacl' file will use the individual, client-side userIds in its 2nd column. As long as the userIds in pserver's 'passwd' file match those userIds that your Linux server know about, this approach is ideal if you are planning to move from pserver to SSH access at some later point in time. Just by switching the CVSROOT var from CVSROOT=:pserver:... to CVSROOT=:ext:..., users can switch over to SSH access without any other administrative changes. When all users have switched over to SSH, the inherently insecure xinetd cvspserver process can be disabled. [http://ximbiot.com/cvs/manual/cvs-1.11.17/cvs_2.html#SEC32] :TODO: The only potential glitch with the SSH approach is the possibility that each user can have differing umasks that might interfere with one another, especially during a transition from pserver to SSH. As noted in the ToDo section, this needs a good strategy and set of tests for that yet... 2. Put two lines, as the *only* non-comment lines, in your commitinfo file: ALL $CVSROOT/CVSROOT/commit_prep ALL $CVSROOT/CVSROOT/cvs_acls [-d][-u $USER ][-f ] where "-d" turns on debug trace "-u $USER" passes the client-side userId to cvs_acls "-f overrides the default filename used to log restricted commit attempts. (These are handled in the processArgs() subroutine.) If you are using client-side userIds to restrict access to your repository, make sure that they are in this order since the commit_prep script is required in order to pass the $USER parameter. A final note about the repository matching pattern. The example above uses "ALL" but note that this means that the cvs_acls script will run for each and every commit in your repository. Obviously, in a large repository this adds up to a lot of overhead that may not be necesary. A better strategy is to use a repository pattern that is more specific to the areas that you wish to secure. 3. Install this file as $CVSROOT/CVSROOT/cvs_acls and make it executable. 4. Create a file named CVSROOT/cvsacl and optionally add it to CVSROOT/checkoutlist and check it in. See the CVS manual's administrative files section about checkoutlist. Typically: $ cvs checkout CVSROOT $ cd CVSROOT [ create the cvsacl file, include 'commitinfo' line ] [ add cvsacl to checkoutlist ] $ cvs add cvsacl $ cvs commit -m 'Added cvsacl for use with cvs_acls.' cvsacl checkoutlist Note: The format of the 'cvsacl' file is described in detail immediately below but here is an important set up point: Make sure to include a line like the following: deny||CVSROOT/commitinfo CVSROOT/cvsacl allow|cvsadmin|CVSROOT/commitinfo CVSROOT/cvsacl that restricts access to commitinfo and cvsacl since this would be one of the easiest "end runs" around this ACL approach. ('commitinfo' has the line that executes the cvs_acls script and, of course, all the restrictions are in 'cvsacl'.) 5. (Optional) Create a 'restrict_msg' file in the $CVSROOT/CVSROOT directory. Whenever there is a restricted file or dir message, cvs_acls will look for this file and, if it exists, print its contents as part of the commit-denial message. This gives you a chance to print any site-specific information (e.g., who to call, what procedures to look up,...) whenever a commit is denied. =head1 Format of the cvsacl file The 'cvsacl' file determines whether you may commit files. It contains lines read from top to bottom, keeping track of whether a given user, repository and branch combination is "allowed" or "denied." The script will assume "allowed" on all repository paths until 'allow' and 'deny' rules change that default. The normal pattern is to specify an 'deny' rule to turn off access to ALL users, then follow it with a matching 'allow' rule that will turn on access for a select set of users. In the case of multiple rules for the same user, repository and branch, the last one takes precedence. Blank lines and lines with only comments are ignored. Any other lines not beginning with "allow" or "deny" are logged to the restrict_log file. Lines beginning with "allow" or "deny" are assumed to be '|'-separated triples: (All spaces and tabs are ignored in a line.) {allow.*,deny.*} [|user,user,... [|repos,repos,... [|branch,branch,...]]] 1. String starting with "allow" or "deny". 2. Optional, comma-separated list of usernames. 3. Optional, comma-separated list of repository pathnames. These are pathnames relative to $CVSROOT. They can be directories or filenames. A directory name allows or restricts access to all files and directories below it. One line can have either directories or filenames but not both. 4. Optional, comma-separated list of branch tags. If not specified, all branches are assumed. Use HEAD to reference the main branch. Example: (Note: No in-line comments.) # ----- Make whole repository unavailable. deny # ----- Except for user "dgg". allow|dgg # ----- Except when "fred" or "john" commit to the # module whose repository is "bin/ls" allow|fred, john|bin/ls # ----- Except when "ed" commits to the "stable" # branch of the "bin/ls" repository allow|ed|/bin/ls|stable =head1 Program Logic CVS passes to @ARGV an absolute directory pathname (the repository appended to your $CVSROOT variable), followed by a list of filenames within that directory that are to be committed. The script walks through the 'cvsacl' file looking for matches on the username, repository and branch. A username match is simply the user's name appearing in the second column of the cvsacl line in a space-or-comma separate list. If blank, then any user will match. A repository match: =over 2 =item * Each entry in the modules section of the current 'cvsacl' line is examined to see if it is a dir or a file. The line must have either files or dirs, but not both. (To simplify the logic.) =item * If neither, then assume the 'cvsacl' file was set up in error and skip that 'allow' line. =item * If a dir, then each dir pattern is matched separately against the beginning of each of the committed files in @ARGV. =item * If a file, then each file pattern is matched exactly against each of the files to be committed in @ARGV. =item * Repository and branch must BOTH match together. This is to cover the use case where a user has multiple branches checked out in a single work directory. Commit files can be from different branches. A branch match is either: =over 4 =item * When no branches are listed in the fourth column. ("Match any.") =item * All elements from the fourth column are matched against each of the tag names for $ARGV[1..$#ARGV] found in the %branches file. =back =item * 'allow' match remove that match from the tally map. =item * Restricted ('deny') matches are saved in the %repository_matches table. =item * If there is a match on user, repository and branch: If repository, branch and user match if 'deny' add %repository_matches entries to %restricted_entries else if 'allow' remove %repository_matches entries from %restricted_entries =item * At the end of all the 'cvsacl' line checks, check to see if there are any entries in the %restricted_entries. If so, then deny the commit. =back =head2 Pseudocode read CVS/Entries file and create branch{file}->{branch} hash table + for each 'allow' and 'deny' line in the 'cvsacl' file: | user match? | - Yes: set $user_match = 1; | repository and branch match? | - Yes: add to %repository_matches; | did user, repository match? | - Yes: if 'deny' then | add %repository_matches -> %restricted_entries | if 'allow' then | remove %repository_matches <- %restricted_entries + end for loop any saved restrictions? no: exit, set exit code allowing commits and exit yes: report restrictions, set exit code prohibiting commits and exit =head2 Sanity Check 1) file allow trumps a dir deny deny||java/lib allow||java/lib/README 2) dir allow can undo a file deny deny||java/lib/README allow||java/lib 3) file deny trumps a dir allow allow||java/lib deny||java/lib/README 4) dir deny trumps a file allow allow||java/lib/README deny||java/lib ... so last match always takes precedence =cut $debug = 0; # Set to 1 for debug messages %repository_matches = (); # hash of match file and pattern from 'cvsacl' # repository_matches --> [branch, matching-pattern] # (Used during module/branch matching loop) %restricted_entries = (); # hash table of restricted commit files (from @ARGV) # restricted_entries --> branch # (If user/module/branch all match on an 'deny' # line, then entries added to this map.) %branch; # hash table of key: commit file; value: branch # Built from ".../CVS/Entries" file of directory # currently being examined # ---------------------------------------------------------------- get CVSROOT $cvsroot = $ENV{'CVSROOT'}; die "Must set CVSROOT\n" if !$cvsroot; if ($cvsroot =~ /:([\/\w]*)$/) { # Filter ":pserver:", ":local:"-type prefixes $cvsroot = $1; } # ------------------------------------------------------------- set file paths $entries = "CVS/Entries"; # client-side file??? $cvsaclfile = $cvsroot . "/CVSROOT/cvsacl"; $restrictfile = $cvsroot . "/CVSROOT/restrict_msg"; $restrictlog = $cvsroot . "/CVSROOT/restrict_log"; # --------------------------------------------------------------- process args $user_name = processArgs(\@ARGV); print("$$ \@ARGV after processArgs is: @ARGV.\n") if $debug; print("$$ ========== Begin $PROGRAM_NAME for \"$ARGV[0]\" repository. ========== \n") if $debug; # --------------------------------------------------------------- filter @ARGV eval "print STDERR \$die='Unknown parameter $1\n' if !defined \$$1; \$$1=\$';" while ($ARGV[0] =~ /^(\w+)=/ && shift(@ARGV)); exit 255 if $die; # process any variable=value switches print("$$ \@ARGV after shift processing contains:",join("\, ",@ARGV),".\n") if $debug; # ---------------------------------------------------------------- get cvsroot ($repository = shift) =~ s:^$cvsroot/::; grep($_ = $repository . '/' . $_, @ARGV); print("$$ \$cvsroot is: $cvsroot.\n") if $debug; print "$$ Repos: $repository\n","$$ ==== ",join("\n$$ ==== ",@ARGV),"\n" if $debug; $exit_val = 0; # presume good exit value for commit # ---------------------------------------------------------------------------- # ---------------------------------- create hash table $branch{file -> branch} # ---------------------------------------------------------------------------- # Here's a typical Entries file: # # /checkoutlist/1.4/Wed Feb 4 23:51:23 2004// # /cvsacl/1.3/Tue Feb 24 23:05:43 2004// # ... # /verifymsg/1.1/Fri Mar 16 19:56:24 2001// # D/backup//// # D/temp//// open(ENTRIES, $entries) || die("Cannot open $entries.\n"); print("$$ File / Branch\n") if $debug; my $i = 0; while() { chop; next if /^\s*$/; # Skip blank lines $i = $i + 1; if (m| / # 1st slash ([\w.-]*) # file name -> $1 / # 2nd slash .* # revision number / # 3rd slash .* # date and time / # 4th slash .* # keyword / # 5th slash T? # 'T' constant (\w*) # branch -> #2 |x) { $branch{$repository . '/' . $1} = ($2) ? $2 : "HEAD"; print "$$ CVS Entry $i: $1/$2\n" if $debug; } } close(ENTRIES); # ---------------------------------------------------------------------------- # ------------------------------------- evaluate each active line from 'cvsacl' # ---------------------------------------------------------------------------- open (CVSACL, $cvsaclfile) || exit(0); # It is ok for cvsacl file not to exist while () { chop; next if /^\s*\#/; # skip comments next if /^\s*$/; # skip blank lines # --------------------------------------------- parse current 'cvsacl' line print("$$ ==========\n$$ Processing \'cvsacl\' line: $_.\n") if $debug; ($cvsacl_flag, $cvsacl_userIds, $cvsacl_modules, $cvsacl_branches) = split(/[\s,]*\|[\s,]*/, $_); # ------------------------------ Validate 'allow' or 'deny' line prefix if ($cvsacl_flag !~ /^allow/ && $cvsacl_flag !~ /^deny/) { print ("Bad cvsacl line: $_\n") if $debug; $log_text = sprintf "Bad cvsacl line: %s", $_; write_restrictlog_record($log_text); next; } # -------------------------------------------------- init loop match flags $user_match = 0; %repository_matches = (); # ------------------------------------------------------------------------ # ---------------------------------------------------------- user matching # ------------------------------------------------------------------------ # $user_name considered "in user list" if actually in list or is NULL $user_match = (!$cvsacl_userIds || grep ($_ eq $user_name, split(/[\s,]+/,$cvsacl_userIds))); print "$$ \$user_name: $user_name \$user_match match flag is: $user_match.\n" if $debug; if (!$user_match) { next; # no match, skip to next 'cvsacl' line } # ------------------------------------------------------------------------ # ---------------------------------------------------- repository matching # ------------------------------------------------------------------------ if (!$cvsacl_modules) { # blank module list = all modules if (!$cvsacl_branches) { # blank branch list = all branches print("$$ Adding all modules to \%repository_matches; null " . "\$cvsacl_modules and \$cvsacl_branches.\n") if $debug; for $commit_object (@ARGV) { $repository_matches{$commit_object} = [$branch{$commit_object}, $cvsacl_modules]; print("$$ \$repository_matches{$commit_object} = " . "[$branch{$commit_object}, $cvsacl_modules].\n") if $debug; } } else { # need to check for repository match @branch_list = split (/[\s,]+/,$cvsacl_branches); print("$$ Branches from \'cvsacl\' record: ", join(", ",@branch_list),".\n") if $debug; for $commit_object (@ARGV) { if (grep($branch{$commit_object}, @branch_list)) { $repository_matches{$commit_object} = [$branch{$commit_object}, $cvsacl_modules]; print("$$ \$repository_matches{$commit_object} = " . "[$branch{$commit_object}, $cvsacl_modules].\n") if $debug; } } } } else { # ----------------------------------- check every argument combination # parse 'cvsacl' modules to array my @module_list = split(/[\s,]+/,$cvsacl_modules); # ------------- Check all modules in list for either file or directory my $fileType = ""; if (($fileType = checkFileness(@module_list)) eq "") { next; # skip bad file types } # ---------- Check each combination of 'cvsacl' modules vs. @ARGV files print("$$ Checking matches for \@module_list: ", join("\, ",@module_list), ".\n") if $debug; # loop thru all command-line commit objects for $commit_object (@ARGV) { # loop thru all modules on 'cvsacl' line for $cvsacl_module (@module_list) { print("$$ Is \'cvsacl\': $cvsacl_modules pattern in: \@ARGV " . "\$commit_object: $commit_object?\n") if $debug; # Do match of beginning of $commit_object checkModuleMatch($fileType, $commit_object, $cvsacl_module); } # end for commit objects } # end for cvsacl modules } # end if print("$$ Matches for: \%repository_matches: ", join("\, ", (keys %repository_matches)), ".\n") if $debug; # ------------------------------------------------------------------------ # ----------------------------------------------------- setting exit value # ------------------------------------------------------------------------ if ($user_match && %repository_matches) { print("$$ An \"$cvsacl_flag\" match on User(s): $cvsacl_userIds; Module(s):" . " $cvsacl_modules; Branch(es): $cvsacl_branches.\n") if $debug; if ($cvsacl_flag eq "deny") { # Add all matches to the hash of restricted modules foreach $commitFile (keys %repository_matches) { print("$$ Adding \%repository_matches entry: $commitFile.\n") if $debug; $restricted_entries{$commitFile} = $repository_matches{$commitFile}[0]; } } else { # Remove all matches from the restricted modules hash foreach $commitFile (keys %repository_matches) { print("$$ Removing \%repository_matches entry: $commitFile.\n") if $debug; delete $restricted_entries{$commitFile}; } } } print "$$ ==== End of processing for \'cvsacl\' line: $_.\n" if $debug; } close(CVSACL); # ---------------------------------------------------------------------------- # --------------------------------------- determine final 'commit' disposition # ---------------------------------------------------------------------------- if (%restricted_entries) { # any restricted entries? $exit_val = 1; # don't commit print("**** Access denied: Insufficient authority for user: '$user_name\' " . "to commit to \'$repository\'.\n**** Contact CVS Administrators if " . "you require update access to these directories or files.\n"); print("**** file(s)/dir(s) restricted were:\n\t", join("\n\t",keys %restricted_entries), "\n"); printOptionalRestrictionMessage(); write_restrictlog(); } elsif (!$exit_val && $debug) { print "**** Access allowed: Sufficient authority for commit.\n"; } print "$$ ==== \$exit_val = $exit_val\n" if $debug; exit($exit_val); # ---------------------------------------------------------------------------- # -------------------------------------------------------------- end of "main" # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- # -------------------------------------------------------- process script args # ---------------------------------------------------------------------------- sub processArgs { # This subroutine is passed a reference to @ARGV. # If @ARGV contains a "-u" entry, use that as the effective userId. In this # case, the userId is the client-side userId that has been passed to this # script by the commit_prep script. (This is why the commit_prep script must # be placed *before* the cvs_acls script in the commitinfo admin file.) # Otherwise, pull the userId from the server-side environment. my $userId = ""; my ($argv) = shift; # pick up ref to @ARGV my @argvClone = (); # immutable copy for foreach loop for ($i=0; $i<(scalar @{$argv}); $i++) { $argvClone[$i]=$argv->[$i]; } print("$$ \@_ to processArgs is: @_.\n") if $debug; # Parse command line arguments (file list is seen as one arg) foreach $arg (@argvClone) { print("$$ \$arg for processArgs loop is: $arg.\n") if $debug; # Set $debug flag? if ($arg eq '-d') { shift @ARGV; $debug = 1; print("$$ \$debug flag set on.\n") if $debug; print STDERR "Debug turned on...\n"; } # Passing in a client-side userId? elsif ($arg eq '-u') { shift @ARGV; $userId = shift @ARGV; print("$$ client-side \$userId set to: $userId.\n") if $debug; } # An override for the default restrictlog file? elsif ($arg eq '-f') { shift @ARGV; $restrictlog = shift @ARGV; } else { next; } } # No client-side userId passed? then get from server env if (!$userId) { $userId = $ENV{"USER"} if !($userId = $ENV{"LOGNAME"}); print("$$ server-side \$userId set to: $userId.\n") if $debug; } print("$$ processArgs returning \$userId: $userId.\n") if $debug; return $userId; } # ---------------------------------------------------------------------------- # --------------------- Check all modules in list for either file or directory # ---------------------------------------------------------------------------- sub checkFileness { # Module patterns on the 'cvsacl' record can be files or directories. # If it's a directory, we pattern-match the directory name from 'cvsacl' # against the left side of the committed filename to see if the file is in # that hierarchy. By contrast, files use an explicit match. If the entries # are neither files nor directories, then the cvsacl file has been set up # incorrectly; we return a "" and the caller skips that line as invalid. # # This function determines whether the entries on the 'cvsacl' record are all # directories or all files; it cannot be a mixture. This restriction put in # to simplify the logic (without taking away much functionality). my @module_list = @_; print("$$ Checking \"fileness\" or \"dir-ness\" for \@module_list entries.\n") if $debug; print("$$ Entries are: ", join("\, ",@module_list), ".\n") if $debug; my $filetype = ""; for $cvsacl_module (@module_list) { my $reposDirName = $cvsroot . '/' . $cvsacl_module; my $reposFileName = $reposDirName . "\,v"; print("$$ In checkFileness: \$reposDirName: $reposDirName; \$reposFileName: $reposFileName.\n") if $debug; if (((-d $reposDirName) && ($filetype eq "file")) || ((-f $reposFileName) && ($filetype eq "dir"))) { print("Can\'t mix files and directories on single \'cvsacl\' file record; skipping entry.\n"); print(" Please contact a CVS administrator.\n"); $filetype = ""; last; } elsif (-d $reposDirName) { $filetype = "dir"; print("$$ $reposDirName is a directory.\n") if $debug; } elsif (-f $reposFileName) { $filetype = "file"; print("$$ $reposFileName is a regular file.\n") if $debug; } else { print("***** Item to commit was neither a regular file nor a directory.\n"); print("***** Current \'cvsacl\' line ignored.\n"); print("***** Possible problem with \'cvsacl\' admin file. Please contact a CVS administrator.\n"); $filetype = ""; $text = sprintf("Module entry on cvsacl line: %s is not a valid file or directory.\n", $cvsacl_module); write_restrictlog_record($text); last; } # end if } # end for print("$$ checkFileness will return \$filetype: $filetype.\n") if $debug; return $filetype; } # ---------------------------------------------------------------------------- # ----------------------------------------------------- check for module match # ---------------------------------------------------------------------------- sub checkModuleMatch { # This subroutine checks for a match between the directory or file pattern # specified in the 'cvsacl' file (i.e., $cvsacl_modules) versus the commit file # objects passed into the script via @ARGV (i.e., $commit_object). # The directory pattern only has to match the beginning portion of the commit # file's name for a match since all files under that directory are considered # a match. File patterns must exactly match. # Since (theoretically, if not normally in practice) a working directory can # contain a mixture of files from different branches, this routine checks to # see if there is also a match on branch before considering the file # comparison a match. my $match_flag = ""; print("$$ \@_ in checkModuleMatch is: @_.\n") if $debug; my ($type,$commit_object,$cvsacl_module) = @_; if ($type eq "file") { # Do exact file match of $commit_object if ($commit_object eq $cvsacl_module) { $match_flag = "file"; } # Do dir match at beginning of $commit_object } elsif ($commit_object =~ /^$cvsacl_module\//) { $match_flag = "dir"; } if ($match_flag) { print("$$ \$repository: $repository matches \$commit_object: $commit_object.\n") if $debug; if (!$cvsacl_branches) { # empty branch pattern matches all print("$$ blank \'cvsacl\' branch matches all commit files.\n") if $debug; $repository_matches{$commit_object} = [$branch{$commit_object}, $cvsacl_module]; print("$$ \$repository_matches{$commit_object} = [$branch{$commit_object}, $cvsacl_module].\n") if $debug; } else { # otherwise check branch hash table @branch_list = split (/[\s,]+/,$cvsacl_branches); print("$$ Branches from \'cvsacl\' record: ", join(", ",@branch_list),".\n") if $debug; if (grep(/$branch{$commit_object}/, @branch_list)) { $repository_matches{$commit_object} = [$branch{$commit_object}, $cvsacl_module]; print("$$ \$repository_matches{$commit_object} = [$branch{$commit_object}, " . "$cvsacl_module].\n") if $debug; } } } } # ---------------------------------------------------------------------------- # ------------------------------------------------------- check for file match # ---------------------------------------------------------------------------- sub printOptionalRestrictionMessage { # This subroutine optionally prints site-specific file restriction information # whenever a restriction condition is met. If the file 'restrict_msg' does # not exist, the routine immediately exits. If there is a 'restrict_msg' file # then all the contents are printed at the end of the standard restriction # message. # As seen from examining the definition of $restrictfile, the default filename # is: $CVSROOT/CVSROOT/restrict_msg. open (RESTRICT, $restrictfile) || return; # It is ok for cvsacl file not to exist while () { chop; # print out each line print("**** $_\n"); } } # ---------------------------------------------------------------------------- # ---------------------------------------------------------- write log message # ---------------------------------------------------------------------------- sub write_restrictlog { # This subroutine iterates through the list of restricted entries and logs # each one to the error logfile. # write each line in @text out separately foreach $commitfile (keys %restricted_entries) { $log_text = sprintf "Commit attempt by: %s for: %s on branch: %s", $user_name, $commitfile, $branch{$commitfile}; write_restrictlog_record($log_text); } } # ---------------------------------------------------------------------------- # ---------------------------------------------------------- write log message # ---------------------------------------------------------------------------- sub write_restrictlog_record { # This subroutine receives a scalar string and writes it out to the # $restrictlog file as a separate line. Each line is prepended with the date # and time in the format: "2004/01/30 12:00:00 ". $text = shift; # return quietly if there is a problem opening the log file. open(FILE, ">>$restrictlog") || return; (@time) = localtime(); # write each line in @text out separately $log_record = sprintf "%04d/%02d/%02d %02d:%02d:%02d %s.\n", $time[5]+1900, $time[4]+1, $time[3], $time[2], $time[1], $time[0], $text; print FILE $log_record; print("$$ restrict_log record being written: $log_record to $restrictlog.\n") if $debug; close(FILE); } 07070100106b8c000081ed0000000000000000000000014d58a1f800001465000000b600010002ffffffffffffffff0000002c00000000root/usr/local/share/cvs/contrib/cvs2vendor#! /bin/sh # # Copyright (C) 1997-2005 The Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # cvs2vendor - move revsisions from files in A to files in B # # The primary reason for this script is to move deltas from a # non-vendor branched repository onto a fresh vendor branched one, # skipping the initial checkin in assumption that it is the same in # both repositories. This way you can take a project that was moved # into CVS without the benefit of the vendor branch and for all # intents and purposes add the vendor branch underneath the existing # deltas. # # This script is also a decent example of repository maintenance using # raw RCS commands (if I do say so myself! ;-). # # Tags are preserved. # # The timestamp of the initial vendor branch revision will be adjusted # to be the same as the 1.1 revision of each source file. # # Extra branches in the source directory will cause breakage. # # Intermediate files are created in the current working directory # where this script is started. # # Written by Greg A. Woods , based on rcs2sccs # (retains some of the rlog parsing from it). # # The copyright is in the Public Domain. # if [ $# -ne 2 ]; then echo USAGE: $0 srcdir dstdir exit 2 fi tsrcdir=$1 tdstdir=$2 revfile=/tmp/cvs2vendor_$$_rev rm -f $revfile commentfile=/tmp/cvs2vendor_$$_comment rm -f $commentfile if sort -k 1,1 /dev/null 2>/dev/null then sort_each_field='-k 1 -k 2 -k 3 -k 4 -k 5 -k 6 -k 7 -k 8 -k 9' else sort_each_field='+0 +1 +2 +3 +4 +5 +6 +7 +8' fi srcdirs=`cd $tsrcdir && find . -type d -print | sed 's~^\.[/]*~~'` # the "" is a trick to get $tsrcdir itself without resorting to '.' for ldir in "" $srcdirs; do srcdir=$tsrcdir/$ldir dstdir=$tdstdir/$ldir # Loop over every RCS file in srcdir # for vfile in $srcdir/*,v; do # get rid of the ",v" at the end of the name file=`echo $vfile | sed -e 's/,v$//'` bfile=`basename $file` if [ ! -d $dstdir ]; then echo "making locally added directory $dstdir" mkdir -p $dstdir fi if [ ! -f $dstdir/$bfile,v ]; then echo "copying locally added file $dstdir/$bfile ..." cp $vfile $dstdir continue; fi # work on each rev of that file in ascending order rlog $file | grep "^revision [0-9][0-9]*\." | awk '{print $2}' | sed -e 's/\./ /g' | sort -n -u $sort_each_field | sed -e 's/ /./g' > $revfile for rev in `cat $revfile`; do case "$rev" in 1.1) newdate=`rlog -r$rev $file | grep "^date: " | awk '{printf("%s.%s\n",$2,$3); exit}' | sed -e 's~/~.~g' -e 's/:/./g' -e 's/;//' -e 's/^19//'` olddate=`rlog -r1.1.1.1 $dstdir/$bfile | grep "^date: " | awk '{printf("%s.%s\n",$2,$3); exit}' | sed -e 's~/~.~g' -e 's/:/./g' -e 's/;//' -e 's/^19//'` sed "s/$olddate/$newdate/" < $dstdir/$bfile,v > $dstdir/$bfile.x mv -f $dstdir/$bfile.x $dstdir/$bfile,v chmod -w $dstdir/$bfile,v symname=`rlog -h $file | sed -e '1,/^symbolic names:/d' -e 's/[ ]*//g' | awk -F: '$2 == "'"$rev"'" {printf("-n%s:1.1.1.1\n",$1)}'` if [ -n "$symname" ]; then echo "tagging $file with $symname ..." rcs $symname $dstdir/$bfile,v if [ $? != 0 ]; then echo ERROR - rcs $symname $dstdir/$bfile,v exit 1 fi fi continue # skip first rev.... ;; esac # get a lock on the destination local branch tip revision co -r1 -l $dstdir/$bfile if [ $? != 0 ]; then echo ERROR - co -r1 -l $dstdir/$bfile exit 1 fi rm -f $dstdir/$bfile # get file into current dir and get stats date=`rlog -r$rev $file | grep "^date: " | awk '{printf("%s %s\n",$2,$3); exit}' | sed -e 's/;//'` author=`rlog -r$rev $file | grep "^date: " | awk '{print $5; exit}' | sed -e 's/;//'` symname=`rlog -h $file | sed -e '1,/^symbolic names:/d' -e 's/[ ]*//g' | awk -F: '$2 == "'"$rev"'" {printf("-n%s\n",$1)}'` rlog -r$rev $file | sed -e '/^branches: /d' -e '1,/^date: /d' -e '/^===========/d' | awk '{if ((total += length($0) + 1) < 510) print $0}' > $commentfile echo "==> file $file, rev=$rev, date=$date, author=$author $symname" co -p -r$rev $file > $bfile if [ $? != 0 ]; then echo ERROR - co -p -r$rev $file exit 1 fi # check file into vendor repository... ci -f -m"`cat $commentfile`" -d"$date" $symname -w"$author" $bfile $dstdir/$bfile,v if [ $? != 0 ]; then echo ERROR - ci -f -m"`cat $commentfile`" -d"$date" $symname -w"$author" $bfile $dstdir/$bfile,v exit 1 fi rm -f $bfile # set the default branch to the trunk... # XXX really only need to do this once.... rcs -b1 $dstdir/$bfile if [ $? != 0 ]; then echo ERROR - rcs -b1 $dstdir/$bfile exit 1 fi done done done echo cleaning up... rm -f $commentfile echo " Conversion Completed Successfully" exit 0 07070100106b8b000081ed0000000000000000000000014d58a1f800000c71000000b600010002ffffffffffffffff0000002d00000000root/usr/local/share/cvs/contrib/commit_prep#! /bin/perl -T # -*-Perl-*- # Copyright (C) 1994-2005 The Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. ############################################################################### ############################################################################### ############################################################################### # # THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE # WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE # -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS # SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND # NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE # MAILING LIST. # # For more on general Perl security and taint-checking, please try running the # `perldoc perlsec' command. # ############################################################################### ############################################################################### ############################################################################### # Perl filter to handle pre-commit checking of files. This program # records the last directory where commits will be taking place for # use by the log_accum.pl script. # # IMPORTANT: this script interacts with log_accum, they have to agree # on the tmpfile name to use. See $LAST_FILE below. # # Contributed by David Hampton # Stripped to minimum by Roy Fielding # ############################################################ $TMPDIR = $ENV{'TMPDIR'} || '/tmp'; $FILE_PREFIX = '#cvs.'; # If see a "-u $USER" argument, then destructively remove it from the # argument list, so $ARGV[0] will be the repository dir again, as it # used to be before we added the -u flag. if ($ARGV[0] eq '-u') { shift @ARGV; $CVS_USERNAME = shift (@ARGV); } # This needs to match the corresponding var in log_accum.pl, including # the appending of the pgrp and username suffixes (see uses of this # var farther down). $LAST_FILE = "$TMPDIR/${FILE_PREFIX}lastdir"; sub write_line { my ($filename, $line) = @_; # A check of some kind is needed here, but the rules aren't apparent # at the moment: # foreach($filename, $line){ # $_ =~ m#^([-\@\w.\#]+)$#; # $_ = $1; # } open(FILE, ">$filename") || die("Cannot open $filename: $!\n"); print(FILE $line, "\n"); close(FILE); } # # Record this directory as the last one checked. This will be used # by the log_accumulate script to determine when it is processing # the final directory of a multi-directory commit. # $id = getpgrp(); &write_line("$LAST_FILE.$id.$CVS_USERNAME", $ARGV[0]); exit(0); 07070100106b89000081ed0000000000000000000000014d58a1f800000f28000000b600010002ffffffffffffffff0000002900000000root/usr/local/share/cvs/contrib/clmerge#! /bin/perl # Copyright (C) 1995-2005 The Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # Merge conflicted ChangeLogs # tromey Mon Aug 15 1994 # Usage is: # # cl-merge [-i] file ... # # With -i, it works in place (backups put in a ~ file). Otherwise the # merged ChangeLog is printed to stdout. # Please report any bugs to me. I wrote this yesterday, so there are no # guarantees about its performance. I recommend checking its output # carefully. If you do send a bug report, please include the failing # ChangeLog, so I can include it in my test suite. # # Tom # --- # tromey@busco.lanl.gov Member, League for Programming Freedom # Sadism and farce are always inexplicably linked. # -- Alexander Theroux # Month->number mapping. Used for sorting. %months = ('Jan', 0, 'Feb', 1, 'Mar', 2, 'Apr', 3, 'May', 4, 'Jun', 5, 'Jul', 6, 'Aug', 7, 'Sep', 8, 'Oct', 9, 'Nov', 10, 'Dec', 11); # If '-i' is given, do it in-place. if ($ARGV[0] eq '-i') { shift (@ARGV); $^I = '~'; } $lastkey = ''; $lastval = ''; $conf = 0; %conflist = (); $tjd = 0; # Simple state machine. The states: # # 0 Not in conflict. Just copy input to output. # 1 Beginning an entry. Next non-blank line is key. # 2 In entry. Entry beginner transitions to state 1. while (<>) { if (/^<<<>>>/) { # End of conflict. Output. # Copy last key into array. if ($lastkey ne '') { $conflist{$lastkey} = $lastval; $lastkey = ''; $lastval = ''; } foreach (reverse sort clcmp keys %conflist) { print STDERR "doing $_" if $tjd; print $_; print $conflist{$_}; } $lastkey = ''; $lastval = ''; $conf = 0; %conflist = (); } elsif ($conf == 1) { # Beginning an entry. Skip empty lines. Error if not a real # beginner. if (/^$/) { # Empty line; just skip at this point. } elsif (/^[MTWFS]/) { # Looks like the name of a day; assume opener and move to # "in entry" state. $lastkey = $_; $conf = 2; print STDERR "found $_" if $tjd; } else { die ("conflict crosses entry boundaries: $_"); } } elsif ($conf == 2) { # In entry. Copy into variable until we see beginner line. if (/^[MTWFS]/) { # Entry beginner line. # Copy last key into array. if ($lastkey ne '') { $conflist{$lastkey} = $lastval; $lastkey = ''; $lastval = ''; } $lastkey = $_; print STDERR "found $_" if $tjd; $lastval = ''; } else { $lastval .= $_; } } else { # Just copy. print; } } # Compare ChangeLog time strings like <=>. # # 0 1 2 3 # Thu Aug 11 13:22:42 1994 Tom Tromey (tromey@creche.colorado.edu) # 0123456789012345678901234567890 # sub clcmp { # First check year. $r = substr ($a, 20, 4) <=> substr ($b, 20, 4); # Now check month. $r = $months{substr ($a, 4, 3)} <=> $months{substr ($b, 4, 3)} if !$r; # Now check day. $r = substr ($a, 8, 2) <=> substr ($b, 8, 2) if !$r; # Now check time (3 parts). $r = substr ($a, 11, 2) <=> substr ($b, 11, 2) if !$r; $r = substr ($a, 14, 2) <=> substr ($b, 14, 2) if !$r; $r = substr ($a, 17, 2) <=> substr ($b, 17, 2) if !$r; $r; } 07070100106b91000081ed0000000000000000000000014d58a1f800001924000000b600010002ffffffffffffffff0000002500000000root/usr/local/share/cvs/contrib/log#! /bin/perl -T # -*-Perl-*- # Copyright (C) 1994-2005 The Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. ############################################################################### ############################################################################### ############################################################################### # # THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE # WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE # -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS # SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND # NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE # MAILING LIST. # # For more on general Perl security and taint-checking, please try running the # `perldoc perlsec' command. # ############################################################################### ############################################################################### ############################################################################### # XXX: FIXME: handle multiple '-f logfile' arguments # # XXX -- I HATE Perl! This *will* be re-written in shell/awk/sed soon! # # Usage: log.pl [-u user] [[-m mailto] ...] [-s] [-V] -f logfile 'dirname file ...' # # -u user - $USER passed from loginfo # -m mailto - for each user to receive cvs log reports # (multiple -m's permitted) # -s - to prevent "cvs status -v" messages # -V - without '-s', don't pass '-v' to cvs status # -f logfile - for the logfile to append to (mandatory, # but only one logfile can be specified). # here is what the output looks like: # # From: woods@kuma.domain.top # Subject: CVS update: testmodule # # Date: Wednesday November 23, 1994 @ 14:15 # Author: woods # # Update of /local/src-CVS/testmodule # In directory kuma:/home/kuma/woods/work.d/testmodule # # Modified Files: # test3 # Added Files: # test6 # Removed Files: # test4 # Log Message: # - wow, what a test # # (and for each file the "cvs status -v" output is appended unless -s is used) # # ================================================================== # File: test3 Status: Up-to-date # # Working revision: 1.41 Wed Nov 23 14:15:59 1994 # Repository revision: 1.41 /local/src-CVS/cvs/testmodule/test3,v # Sticky Options: -ko # # Existing Tags: # local-v2 (revision: 1.7) # local-v1 (revision: 1.1.1.2) # CVS-1_4A2 (revision: 1.1.1.2) # local-v0 (revision: 1.2) # CVS-1_4A1 (revision: 1.1.1.1) # CVS (branch: 1.1.1) use strict; use IO::File; my $cvsroot = $ENV{'CVSROOT'}; # turn off setgid # $) = $(; my $dostatus = 1; my $verbosestatus = 1; my $users; my $login; my $donefiles; my $logfile; my @files; # parse command line arguments # while (@ARGV) { my $arg = shift @ARGV; if ($arg eq '-m') { $users = "$users " . shift @ARGV; } elsif ($arg eq '-u') { $login = shift @ARGV; } elsif ($arg eq '-f') { ($logfile) && die "Too many '-f' args"; $logfile = shift @ARGV; } elsif ($arg eq '-s') { $dostatus = 0; } elsif ($arg eq '-V') { $verbosestatus = 0; } else { ($donefiles) && die "Too many arguments!\n"; $donefiles = 1; @files = split(/ /, $arg); } } # the first argument is the module location relative to $CVSROOT # my $modulepath = shift @files; my $mailcmd = "| Mail -s 'CVS update: $modulepath'"; # Initialise some date and time arrays # my @mos = ('January','February','March','April','May','June','July', 'August','September','October','November','December'); my @days = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime; $year += 1900; # get a login name for the guy doing the commit.... # if ($login eq '') { $login = getlogin || (getpwuid($<))[0] || "nobody"; } # open log file for appending # my $logfh = new IO::File ">>" . $logfile or die "Could not open(" . $logfile . "): $!\n"; # send mail, if there's anyone to send to! # my $mailfh; if ($users) { $mailcmd = "$mailcmd $users"; $mailfh = new IO::File $mailcmd or die "Could not Exec($mailcmd): $!\n"; } # print out the log Header # $logfh->print ("\n"); $logfh->print ("****************************************\n"); $logfh->print ("Date:\t$days[$wday] $mos[$mon] $mday, $year @ $hour:" . sprintf("%02d", $min) . "\n"); $logfh->print ("Author:\t$login\n\n"); if ($mailfh) { $mailfh->print ("\n"); $mailfh->print ("Date:\t$days[$wday] $mos[$mon] $mday, $year @ $hour:" . sprintf("%02d", $min) . "\n"); $mailfh->print ("Author:\t$login\n\n"); } # print the stuff from logmsg that comes in on stdin to the logfile # my $infh = new IO::File "< -"; foreach ($infh->getlines) { $logfh->print; if ($mailfh) { $mailfh->print ($_); } } undef $infh; $logfh->print ("\n"); # after log information, do an 'cvs -Qq status -v' on each file in the arguments. # if ($dostatus != 0) { while (@files) { my $file = shift @files; if ($file eq "-") { $logfh->print ("[input file was '-']\n"); if ($mailfh) { $mailfh->print ("[input file was '-']\n"); } last; } my $rcsfh = new IO::File; my $pid = $rcsfh->open ("-|"); if ( !defined $pid ) { die "fork failed: $!"; } if ($pid == 0) { my @command = ('cvs', '-nQq', 'status'); if ($verbosestatus) { push @command, '-v'; } push @command, $file; exec @command; die "cvs exec failed: $!"; } my $line; while ($line = $rcsfh->getline) { $logfh->print ($line); if ($mailfh) { $mailfh->print ($line); } } undef $rcsfh; } } $logfh->close() or die "Write to $logfile failed: $!"; if ($mailfh) { $mailfh->close; die "Pipe to $mailcmd failed" if $?; } ## must exit cleanly ## exit 0; 07070100106b8a000081ed0000000000000000000000014d58a1f80000099d000000b600010002ffffffffffffffff0000002a00000000root/usr/local/share/cvs/contrib/cln_hist#! /bin/perl # -*-Perl-*- # Copyright (C) 1995-2005 The Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # Contributed by David G. Grubbs # # Clean up the history file. 10 Record types: MAR OFT WUCG # # WUCG records are thrown out. # MAR records are retained. # T records: retain only last tag with same combined tag/module. # # Two passes: Walk through the first time and remember the # 1. Last Tag record with same "tag" and "module" names. # 2. Last O record with unique user/module/directory, unless followed # by a matching F record. # $r = $ENV{"CVSROOT"}; $c = "$r/CVSROOT"; $h = "$c/history"; eval "print STDERR \$die='Unknown parameter $1\n' if !defined \$$1; \$$1=\$';" while ($ARGV[0] =~ /^(\w+)=/ && shift(@ARGV)); exit 255 if $die; # process any variable=value switches %tags = (); %outs = (); # # Move history file to safe place and re-initialize a new one. # rename($h, "$h.bak"); open(XX, ">$h"); close(XX); # # Pass1 -- remember last tag and checkout. # open(HIST, "$h.bak"); while () { next if /^[MARWUCG]/; # Save whole line keyed by tag|module if (/^T/) { @tmp = split(/\|/, $_); $tags{$tmp[4] . '|' . $tmp[5]} = $_; } # Save whole line if (/^[OF]/) { @tmp = split(/\|/, $_); $outs{$tmp[1] . '|' . $tmp[2] . '|' . $tmp[5]} = $_; } } # # Pass2 -- print out what we want to save. # open(SAVE, ">$h.work"); open(HIST, "$h.bak"); while () { next if /^[FWUCG]/; # If whole line matches saved (i.e. "last") one, print it. if (/^T/) { @tmp = split(/\|/, $_); next if $tags{$tmp[4] . '|' . $tmp[5]} ne $_; } # Save whole line if (/^O/) { @tmp = split(/\|/, $_); next if $outs{$tmp[1] . '|' . $tmp[2] . '|' . $tmp[5]} ne $_; } print SAVE $_; } # # Put back the saved stuff # system "cat $h >> $h.work"; if (-s $h) { rename ($h, "$h.interim"); print "history.interim has non-zero size.\n"; } else { unlink($h); } rename ("$h.work", $h); exit(0); 07070100106b88000081ed0000000000000000000000014d58a1f80000595a000000b600010002ffffffffffffffff0000002b00000000root/usr/local/share/cvs/contrib/check_cvs#! /bin/perl -w ######################################################################## # Copyright (c) 2000, 2001 by Donald Sharp # All Rights Reserved # # Permission is granted to copy and/or distribute this file, with or # without modifications, provided this notice is preserved. # ######################################################################## =head1 check_cvs.pl Script to check the integrity of the Repository =head1 SYNOPSIS check_cvs.pl =head1 DESCRIPTION This script will search through a repository and determine if any of the files in it are corrupted. Please do not run this script inside of the repository itself, it will cause it too fail. Also it currently can only be run over the entire repository, so only point your CVSROOT at the actual CVSROOT. =head1 OPTIONS There are no options. =head1 EXAMPLES setenv CVSROOT /release/111/cvs # To see more verbose output setenv CVSDEBUGEDIT 1 check_cvs.pl =head1 SEE ALSO None =cut ###################################################################### # MODULES # ###################################################################### use strict; use File::Find; use File::Basename; use File::Path; use Cwd; ###################################################################### # GLOBALS # ###################################################################### my @list_of_broken_files; my @extra_files; my $verbose = 0; my $total_revisions; my $total_interesting_revisions; my $total_files; my @ignore_files; ###################################################################### # SUBROUTINES # ###################################################################### ###################################################################### # # NAME : # main # # PURPOSE : # To search the repository for broken files # # PARAMETERS : # NONE # # GLOBALS : # $ENV{ CVSROOT } - The CVS repository to search through # $ENV{ CVSDEBUGEDIT } - Turn on Debugging. # @list_of_broken_files - The list of files that need to # be fixed. # $verbose - is verbose mode on? # $total_revisions - The number of revisions considered # $total_interesting_revisions - The number of revisions used # $total_files - The total number of files looked at. # # RETURNS : # A list of broken files # # COMMENTS : # Do not run this script inside the repository. Choose # a nice safe spot( like /tmp ) outside of the repository. # ###################################################################### my $directory_to_look_at; select (STDOUT); $| = 1; # make unbuffered $total_revisions = 0; $total_interesting_revisions = 0; $total_files = 0; if( !exists( $ENV{ CVSROOT } ) ) { die( "The script should be run with the CVSROOT environment variable set" ); } if( exists( $ENV{ CVSDEBUGEDIT } ) ) { $verbose = 1; print( "Verbose Mode Turned On\n" ); } $directory_to_look_at = $ENV{ CVSROOT }; my $sym_count = 0; while( -l $directory_to_look_at ) { $directory_to_look_at = readlink( $directory_to_look_at ); $sym_count += 1; if( $sym_count > 5 ) { die( "Encountered too many symlinks for $ENV{ CVSROOT }\n" ); } } print( "Processing: $directory_to_look_at\n" ) if( $verbose ); @ignore_files = &get_ignore_files_from_cvsroot( $directory_to_look_at ); find( \&process_file, $directory_to_look_at ); my $num_files = @list_of_broken_files; print( "List of corrupted files\n" ) if( $num_files > 0 ); foreach my $broken ( @list_of_broken_files ) { print( "**** File: $broken\n" ); } $num_files = @extra_files; print( "List of Files That Don't belong in Repository:\n" ) if( $num_files > 0 ); foreach my $extra ( @extra_files ) { print( "**** File: $extra\n" ); } print( "Total Files: $total_files\n" ); print( "Total Revisions: $total_revisions Interesting Revisions: $total_interesting_revisions\n" ); ###################################################################### # # NAME : # process_file # # PURPOSE : # This function is called by the find function, it's purpose # is to decide if it is important to look at a file or not. # We only care about files that have the ,v at the end. # # PARAMETERS : # NONE # # GLOBALS : # $ENV{ CVSROOT } - The CVS repository to search through # # RETURNS : # NONE # # COMMENTS : # NONE # ###################################################################### sub process_file { my $path = $File::Find::name; $total_files += 1; $path =~ s/^$directory_to_look_at\///; print( "\tProcessing File: $path\n" ) if( $verbose ); if( $path =~ /,v$/ ) { $path =~ s/,v$//; look_at_cvs_file( $path ); } elsif( ! -d $File::Find::name ) { my $save = 0; foreach my $ignore ( @ignore_files ) { if( $path =~ /$ignore/ ) { $save = 1; last; } } if( !$save ) { push( @extra_files, $path ); } } } ###################################################################### # # NAME : # look_at_cvs_file # # PURPOSE : # To decide if a file is broken or not. The algorithm is: # a) Get the revision history for the file. # - If that fails the file is broken, save the fact # and continue processing other files. # - If that succeeds we have a list of revisions. # b) For Each revision try to retrieve that version # - If that fails the file is broken, save the fact # and continue processing other files. # c) Continue on # # PARAMETERS : # $file - The file to look at. # # GLOBALS : # NONE # # RETURNS : # NONE # # COMMENTS : # We have to handle Attic files in a special manner. # Basically remove the Attic from the string if it # exists at the end of the $path variable. # ###################################################################### sub look_at_cvs_file { my( $file ) = @_; my( $name, $path, $suffix ) = fileparse( $file ); if( $path =~ s/Attic\/$// ) { $file = $path . $name; } my $revisions = get_history( $name ); if( !defined( $revisions ) ) { print( "\t$file is corrupted, this was determined via a cvs log command\n" ) if( $verbose ); push( @list_of_broken_files, $file ); return(); } my @int_revisions = find_interesting_revisions( @$revisions ); foreach my $revision ( @int_revisions ) { print( "\t\tLooking at Revision: $revision\n" ) if( $verbose ); if( !check_revision( $file, $revision ) ) { print( "\t$file is corrupted in revision: $revision\n" ) if( $verbose ); push( @list_of_broken_files, $file ); return(); } } } ###################################################################### # # NAME : # get_history # # PURPOSE : # To retrieve a array of revision numbers. # # PARAMETERS : # $file - The file to retrieve the revision numbers for # # GLOBALS : # NONE # # RETURNS : # On Success - Reference to the list of revision numbers # On Failure - undef. # # COMMENTS : # The $_ is saved off because The File::find functionality # expects the $_ to not have been changed. # The -N option for the rlog command means to spit out # tags or branch names. # ###################################################################### sub get_history { my( $file ) = @_; $file =~ s/(["\$`\\])/\\$1/g; my @revisions; my $revision; my $ignore = 1; my $save_ = $_; open( FILE, "rlog -N \"$file\" 2>&1 |" ) or die( "unable to run rlog, help" ); while( ) { #rlog outputs a "----" line before the actual revision #without this we'll pick up peoples comments if they #happen to start with revision if( /^----------------------------$/ ) { $ignore = 0; next; } if( ( !$ignore ) && ( ( $revision ) = m/^revision (\S+)/ ) ) { push( @revisions, $revision ); $ignore = 1; } } $_ = $save_; if( !close( FILE ) ) { return( undef ); } return( \@revisions ); } ###################################################################### # # NAME : # check_revision # # PURPOSE : # Given a file and a revision number ensure that we can # check out that file # # PARAMETERS : # $file - The file to look at. # $revision - The revision to look at. # # GLOBALS : # NONE # # RETURNS : # If we can get the File - 1 # If we can not get the File - 0 # # COMMENTS : # cvs command line options are as followed: # -n - Do not run any checkout program as specified by the -o # option in the modules file # -p - Put all output to standard out. # -r - The revision of the file that we would like to look at. # Please note that cvs will return 0 for being able to successfully # read the file and 1 for failure to read the file. # ###################################################################### sub check_revision { my( $file, $revision ) = @_; $file =~ s/(["\$`\\])/\\$1/g; my $cwd = getcwd(); chdir( "/tmp" ); my $ret_code = 0xffff & system( "cvs co -n -p -r $revision \"$file\" > /dev/null 2>&1" ); chdir( $cwd ); return( 1 ) if ( $ret_code == 0 ); return( 0 ); return( $ret_code ); } ###################################################################### # # NAME : # find_interesting_revisions # # PURPOSE : # CVS stores information in a logical manner. We only really # need to look at some interestin revisions. These are: # The first version # And the last version on every branch. # This is because cvs stores changes descending from # main line. ie suppose the last version on mainline is 1.6 # version 1.6 of the file is stored in toto. version 1.5 # is stored as a diff between 1.5 and 1.6. 1.4 is stored # as a diff between 1.5 and 1.4. # branches are stored a little differently. They are # stored in ascending order. Suppose there is a branch # on 1.4 of the file. The first branches revision number # would be 1.4.1.1. This is stored as a diff between # version 1.4 and 1.4.1.1. The 1.4.1.2 version is stored # as a diff between 1.4.1.1 and 1.4.1.2. Therefore # we are only interested in the earliest revision number # and the highest revision number on a branch. # # PARAMETERS : # @revisions - The list of revisions to find interesting ones # # GLOBALS : # NONE # # RETURNS : # @new_revisions - The list of revisions that we find interesting # # COMMENTS : # ###################################################################### sub find_interesting_revisions { my( @revisions ) = @_; my @new_revisions; my %branch_revision; my $branch_number; my $branch_rev; my $key; my $value; START_OVER: foreach my $revision( @revisions ) { my $start_over = 0; ( $branch_number, $branch_rev ) = branch_split( $revision ); #if the number of elements in the branch is 1 #and the new branch is less than the old branch if( elements_in_branch( $branch_number ) == 1 ) { ( $start_over, %branch_revision ) = find_int_mainline_revision( $branch_number, $branch_rev, %branch_revision ); next START_OVER if( $start_over ); } %branch_revision = find_int_branch_revision( $branch_number, $branch_rev, %branch_revision ); } %branch_revision = remove_duplicate_branches( %branch_revision ); while( ( $key, $value ) = each ( %branch_revision ) ) { push( @new_revisions, $key . "." . $value ); } my $nrc; my $rc; $rc = @revisions; $nrc = @new_revisions; $total_revisions += $rc; $total_interesting_revisions += $nrc; print( "\t\tTotal Revisions: $rc Interesting Revisions: $nrc\n" ) if( $verbose ); return( @new_revisions ); } ######################################################################## # # NAME : # remove_duplicate_branches # # PURPOSE : # To remove from the list of branches that we are interested # in duplication that will cause cvs to check a revision multiple # times. For Instance revision 1.1.1.1 should be prefered # to be checked over revision 1.1, as that v1.1.1.1 can # only be retrieved by going through v1.1. Therefore # we should remove v1.1 from the list of branches that # are interesting. # # PARAMETERS : # %branch_revisions - The hash of the interesting revisions # # GLOBALS : # NONE # # RETURNS : # %branch_revisions - The hash of the modified interesting revisions # # COMMENTS : # NONE # ######################################################################## sub remove_duplicate_branches { my( %branch_revisions ) = @_; my $key; my $value; my $branch_comp; my $branch; RESTART: { my @keys = keys( %branch_revisions ); while( ( $key, $value ) = each ( %branch_revisions ) ) { $branch_comp = $key . "." . $value; foreach $branch ( @keys ) { if( $branch eq $key ) { next; } if( elements_in_branch( $branch_comp ) == elements_in_branch( $branch ) - 1 ) { if( $branch =~ /^$branch_comp/ ) { delete( $branch_revisions{ $key } ); goto RESTART; } } } } } return( %branch_revisions ); } ###################################################################### # # NAME : # find_int_branch_revision # # PURPOSE : # To Find a interesting branch revision. # Algorithm: # If the $branch_revision exists in the interesting branch # hash and the new $branch_rev is less than currently saved # one replace it with the new $branch_rev. # else if the $branch_revision doesn't exist in the interesting # branch hash, then just store the $branch_number and $branch_rev # # PARAMETERS : # $branch_number - The branch that we are looking at # $branch_rev - The particular revision we are looking # at on the $branch_number. # %branch_revision - The hash storing the interesting branches # and the revisions on them. # # GLOBALS : # NONE # # RETURNS : # %branch_revision - The modified hash that stores interesting # branches. # # COMMENTS : # NONE # ###################################################################### sub find_int_branch_revision { my( $branch_number, $branch_rev, %branch_revision ) = @_; if( exists( $branch_revision{ $branch_number } ) ) { if( $branch_rev > $branch_revision{ $branch_number } ) { $branch_revision{ $branch_number } = $branch_rev; } } else { $branch_revision{ $branch_number } = $branch_rev; } return( %branch_revision ); } ###################################################################### # # NAME : # find_int_mainline_revision # # PURPOSE : # To Find a interesting mainline revision. # Algorithm: # if the $branch_number is less then a branch number # with one element in it, then delete the old branch_number # and return. # if the $branch_number is greater than a branch number # then return, and tell the calling function that we # should skip this element, as that it's not important. # if the $branch_number is the same as a branch number # with one element in it, then check to see if the # $branch_rev is less than the stored branch rev if # it is replace with new $branch_rev. Else ignore revision # # PARAMETERS : # $branch_number - The branch that we are looking at # $branch_rev - The particular revision we are looking # at on the $branch_number. # %branch_revision - The hash storing the interesting branches # and the revisions on them. # # GLOBALS : # NONE # # RETURNS : # ( $skip, %branch_revision ) - # $skip - 1 if we need to ignore this particular $branch_number # $branch_rev combo. Else 0. # %branch_revision - The modified hash that stores interesting # branches. # # COMMENTS : # NONE # ###################################################################### sub find_int_mainline_revision { my( $branch_number, $branch_rev, %branch_revision ) = @_; foreach my $key ( keys %branch_revision ) { if( elements_in_branch( $key ) == 1 ) { if( $branch_number < $key ) { delete( $branch_revision{ $key } ); next; } if( $branch_number > $key ) { return( 1, %branch_revision ); } if( ( exists( $branch_revision{ $branch_number } ) ) && ( $branch_rev < $branch_revision{ $branch_number } ) ) { $branch_revision{ $branch_number } = $branch_rev; return( 1, %branch_revision ); } } } return( 0, %branch_revision ); } ###################################################################### # # NAME : # elements_in_branch # # PURPOSE : # Determine the number of elements in a revision number # Elements are defined by numbers seperated by ".". # the revision 1.2.3.4 would have 4 elements # the revision 1.2.4.5.6.7 would have 6 elements # # PARAMETERS : # $branch - The revision to look at. # # GLOBALS : # NONE # # RETURNS : # $count - The number of elements # # COMMENTS : # NONE # ###################################################################### sub elements_in_branch { my( $branch ) = @_; my @split_rev; @split_rev = split /\./, $branch; my $count = @split_rev; return( $count ); } ###################################################################### # # NAME : # branch_split # # PURPOSE : # To split up a revision number up into the branch part and # the number part. For Instance: # 1.1.1.1 - is split 1.1.1 and 1 # 2.1 - is split 2 and 1 # 1.3.4.5.7.8 - is split 1.3.4.5.7 and 8 # # PARAMETERS : # $revision - The revision to look at. # # GLOBALS : # NONE # # RETURNS : # ( $branch, $revision ) - # $branch - The branch part of the revision number # $revision - The revision part of the revision number # # COMMENTS : # NONE # ###################################################################### sub branch_split { my( $revision ) = @_; my $branch; my $version; my @split_rev; my $count; @split_rev = split /\./, $revision; my $numbers = @split_rev; @split_rev = reverse( @split_rev ); $branch = pop( @split_rev ); for( $count = 0; $count < $numbers - 2 ; $count++ ) { $branch .= "." . pop( @split_rev ); } return( $branch, pop( @split_rev ) ); } ###################################################################### # # NAME : # get_ignore_files_from_cvsroot # # PURPOSE : # Retrieve the list of files from the CVSROOT/ directory # that should be ignored. # These are the regular files (e.g., commitinfo, loginfo) # and those specified in the checkoutlist file. # # PARAMETERS : # The CVSROOT # # GLOBALS : # NONE # # RETURNS : # @ignore - the list of files to ignore # # COMMENTS : # NONE # ###################################################################### sub get_ignore_files_from_cvsroot { my( $cvsroot ) = @_; my @ignore = ( 'CVS\/fileattr$', '^CVSROOT\/loginfo', '^CVSROOT\/.#loginfo', '^CVSROOT\/rcsinfo', '^CVSROOT\/.#rcsinfo', '^CVSROOT\/editinfo', '^CVSROOT\/.#editinfo', '^CVSROOT\/verifymsg', '^CVSROOT\/.#verifymsg', '^CVSROOT\/commitinfo', '^CVSROOT\/.#commitinfo', '^CVSROOT\/taginfo', '^CVSROOT\/.#taginfo', '^CVSROOT\/cvsignore', '^CVSROOT\/.#cvsignore', '^CVSROOT\/checkoutlist', '^CVSROOT\/.#checkoutlist', '^CVSROOT\/cvswrappers', '^CVSROOT\/.#cvswrappers', '^CVSROOT\/notify', '^CVSROOT\/.#notify', '^CVSROOT\/modules', '^CVSROOT\/.#modules', '^CVSROOT\/readers', '^CVSROOT\/.#readers', '^CVSROOT\/writers', '^CVSROOT\/.#writers', '^CVSROOT\/passwd', '^CVSROOT\/config', '^CVSROOT\/.#config', '^CVSROOT\/val-tags', '^CVSROOT\/.#val-tags', '^CVSROOT\/history' ); my $checkoutlist_file = "$cvsroot\/CVSROOT\/checkoutlist"; open( CHECKOUTLIST, "<$cvsroot\/CVSROOT\/checkoutlist" ) or die( "Unable to read checkoutlist file: $!\n" ); my @list = ; chomp( @list ); close( CHECKOUTLIST ) or die( "Unable to close checkoutlist file: $!\n" ); foreach my $line( @list ) { next if( $line =~ /^#/ || $line =~ /^$/ ); if( $line =~ /^\s*(\S*)\s*/ ) { $line = $1 }; push( @ignore, "^CVSROOT\/$line", "^CVSROOT\/\.#$line" ); } return @ignore; } 07070100106b98000081ed0000000000000000000000014d58a1f80000273d000000b600010002ffffffffffffffff0000002a00000000root/usr/local/share/cvs/contrib/sccs2rcs#! /bin/csh -f # Copyright (C) 1995-2005 The Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # Sccs2rcs is a script to convert an existing SCCS # history into an RCS history without losing any of # the information contained therein. # It has been tested under the following OS's: # SunOS 3.5, 4.0.3, 4.1 # Ultrix-32 2.0, 3.1 # # Things to note: # + It will NOT delete or alter your ./SCCS history under any circumstances. # # + Run in a directory where ./SCCS exists and where you can # create ./RCS # # + /usr/local/bin is put in front of the default path. # (SCCS under Ultrix is set-uid sccs, bad bad bad, so # /usr/local/bin/sccs here fixes that) # # + Date, time, author, comments, branches, are all preserved. # # + If a command fails somewhere in the middle, it bombs with # a message -- remove what it's done so far and try again. # "rm -rf RCS; sccs unedit `sccs tell`; sccs clean" # There is no recovery and exit is far from graceful. # If a particular module is hanging you up, consider # doing it separately; move it from the current area so that # the next run will have a better chance or working. # Also (for the brave only) you might consider hacking # the s-file for simpler problems: I've successfully changed # the date of a delta to be in sync, then run "sccs admin -z" # on the thing. # # + After everything finishes, ./SCCS will be moved to ./old-SCCS. # # This file may be copied, processed, hacked, mutilated, and # even destroyed as long as you don't tell anyone you wrote it. # # Ken Cox # Viewlogic Systems, Inc. # kenstir@viewlogic.com # ...!harvard!cg-atla!viewlog!kenstir # # Various hacks made by Brian Berliner before inclusion in CVS contrib area. # # Modified to detect SCCS binary files. If binary, skip the keyword # substitution and flag the RCS file as binary (using rcs -i -kb). # -Allan G. Schrum schrum@ofsoptics.com agschrum@mindspring.com # Fri Sep 26 10:40:40 EDT 2003 # #we'll assume the user set up the path correctly # for the Pmax, /usr/ucb/sccs is suid sccs, what a pain # /usr/local/bin/sccs should override /usr/ucb/sccs there set path = (/usr/local/bin $path) ############################################################ # Error checking # if (! -w .) then echo "Error: ./ not writeable by you." exit 1 endif if (! -d SCCS) then echo "Error: ./SCCS directory not found." exit 1 endif set edits = (`sccs tell`) if ($#edits) then echo "Error: $#edits file(s) out for edit...clean up before converting." exit 1 endif if (-d RCS) then echo "Warning: RCS directory exists" if (`ls -a RCS | wc -l` > 2) then echo "Error: RCS directory not empty" exit 1 endif else mkdir RCS endif sccs clean set logfile = /tmp/sccs2rcs_$$_log rm -f $logfile set tmpfile = /tmp/sccs2rcs_$$_tmp rm -f $tmpfile set emptyfile = /tmp/sccs2rcs_$$_empty echo -n "" > $emptyfile set initialfile = /tmp/sccs2rcs_$$_init echo "Initial revision" > $initialfile set sedfile = /tmp/sccs2rcs_$$_sed rm -f $sedfile set revfile = /tmp/sccs2rcs_$$_rev rm -f $revfile # the quotes surround the dollar signs to fool RCS when I check in this script set sccs_keywords = (\ '%W%[ ]*%G%'\ '%W%[ ]*%E%'\ '%W%'\ '%Z%%M%[ ]*%I%[ ]*%G%'\ '%Z%%M%[ ]*%I%[ ]*%E%'\ '%M%[ ]*%I%[ ]*%G%'\ '%M%[ ]*%I%[ ]*%E%'\ '%M%'\ '%I%'\ '%G%'\ '%E%'\ '%U%') set rcs_keywords = (\ '$'Id'$'\ '$'Id'$'\ '$'Id'$'\ '$'SunId'$'\ '$'SunId'$'\ '$'Id'$'\ '$'Id'$'\ '$'RCSfile'$'\ '$'Revision'$'\ '$'Date'$'\ '$'Date'$'\ '') ############################################################ # Get some answers from user # echo "" echo "Do you want to be prompted for a description of each" echo "file as it is checked in to RCS initially?" echo -n "(y=prompt for description, n=null description) [y] ?" set ans = $< if ((_$ans == _) || (_$ans == _y) || (_$ans == _Y)) then set nodesc = 0 else set nodesc = 1 endif echo "" echo "The default keyword substitutions are as follows and are" echo "applied in the order specified:" set i = 1 while ($i <= $#sccs_keywords) # echo ' '\"$sccs_keywords[$i]\"' ==> '\"$rcs_keywords[$i]\" echo " $sccs_keywords[$i] ==> $rcs_keywords[$i]" @ i = $i + 1 end echo "" echo -n "Do you want to change them [n] ?" set ans = $< if ((_$ans != _) && (_$ans != _n) && (_$ans != _N)) then echo "You can't always get what you want." echo "Edit this script file and change the variables:" echo ' $sccs_keywords' echo ' $rcs_keywords' else echo "good idea." endif # create the sed script set i = 1 while ($i <= $#sccs_keywords) echo "s,$sccs_keywords[$i],$rcs_keywords[$i],g" >> $sedfile @ i = $i + 1 end onintr ERROR sort -k 1,1 /dev/null >& /dev/null if ($status == 0) then set sort_each_field = '-k 1 -k 2 -k 3 -k 4 -k 5 -k 6 -k 7 -k 8 -k 9' else set sort_each_field = '+0 +1 +2 +3 +4 +5 +6 +7 +8' endif ############################################################ # Loop over every s-file in SCCS dir # foreach sfile (SCCS/s.*) # get rid of the "s." at the beginning of the name set file = `echo $sfile:t | sed -e "s/^..//"` # work on each rev of that file in ascending order set firsttime = 1 # Only scan the file up to the "I" keyword, then see if # the "f" keyword is set to binary. The SCCS file has # -aI denoting the start of the file (or end of header). set binary = (`sed -e '/^.I/,$d' < $sfile | grep '^.f e 1$'`) #if ($#binary) then # echo This is a binary file #else # echo This is not a binary file #endif sccs prs $file | grep "^D " | gawk '{print $2}' | sed -e 's/\./ /g' | sort -n -u $sort_each_field | sed -e 's/ /./g' > $revfile foreach rev (`cat $revfile`) if ($status != 0) goto ERROR # get file into current dir and get stats # Is the substr stuff and the +0 in the following awk script really # necessary? It seems to me that if we didn't find the date format # we expected in the output we have other problems. # Note: Solaris awk does not like the following line. Use gawk # mawk, or nawk instead. set date = `sccs prs -r$rev $file | gawk '/^D / {print (substr($3,0,2)+0<70?20:19) $3, $4; exit}'` set author = `sccs prs -r$rev $file | gawk '/^D / {print $5; exit}'` echo "" echo "==> file $file, rev=$rev, date=$date, author=$author" sccs edit -r$rev $file >>& $logfile if ($status != 0) goto ERROR echo checked out of SCCS # add RCS keywords in place of SCCS keywords (only if not binary) if ($#binary == 0) then sed -f $sedfile $file > $tmpfile if ($status != 0) goto ERROR echo performed keyword substitutions cp $tmpfile $file endif # check file into RCS if ($firsttime) then set firsttime = 0 if ($#binary) then echo this is a binary file # Mark initial, empty file as binary rcs -i -kb -t$emptyfile $file endif if ($nodesc) then echo about to do ci echo ci -f -r$rev -d"$date" -w$author -t$emptyfile $file ci -f -r$rev -d"$date" -w$author -t$emptyfile $file < $initialfile >>& $logfile if ($status != 0) goto ERROR echo initial rev checked into RCS without description else echo "" echo Enter a brief description of the file $file \(end w/ Ctrl-D\): cat > $tmpfile ci -f -r$rev -d"$date" -w$author -t$tmpfile $file < $initialfile >>& $logfile if ($status != 0) goto ERROR echo initial rev checked into RCS endif else # get RCS lock set lckrev = `echo $rev | sed -e 's/\.[0-9]*$//'` if ("$lckrev" =~ [0-9]*.*) then # need to lock the brach -- it is OK if the lock fails rcs -l$lckrev $file >>& $logfile else # need to lock the trunk -- must succeed rcs -l $file >>& $logfile if ($status != 0) goto ERROR endif echo got lock sccs prs -r$rev $file | grep "." > $tmpfile # it's OK if grep fails here and gives status == 1 # put the delta message in $tmpfile ed $tmpfile >>& $logfile <>& $logfile if ($status != 0) goto ERROR echo checked into RCS endif sccs unedit $file >>& $logfile if ($status != 0) goto ERROR end rm -f $file end ############################################################ # Clean up # echo cleaning up... mv SCCS old-SCCS rm -f $tmpfile $emptyfile $initialfile $sedfile echo =================================================== echo " Conversion Completed Successfully" echo "" echo " SCCS history now in old-SCCS/" echo =================================================== set exitval = 0 goto cleanup ERROR: foreach f (`sccs tell`) sccs unedit $f end echo "" echo "" echo Danger\! Danger\! echo Some command exited with a non-zero exit status. echo Log file exists in $logfile. echo "" echo Incomplete history in ./RCS -- remove it echo Original unchanged history in ./SCCS set exitval = 1 cleanup: # leave log file rm -f $tmpfile $emptyfile $initialfile $sedfile $revfile exit $exitval 07070100106b90000081a40000000000000000000000014d58a1f800000fa2000000b600010002ffffffffffffffff0000002b00000000root/usr/local/share/cvs/contrib/intro.docDate: Tue, 16 Jun 1992 17:05:23 +0200 From: Steven.Pemberton@cwi.nl Message-Id: <9206161505.AA06927.steven@sijs.cwi.nl> To: berliner@Sun.COM Subject: cvs INTRODUCTION TO USING CVS CVS is a system that lets groups of people work simultaneously on groups of files (for instance program sources). It works by holding a central 'repository' of the most recent version of the files. You may at any time create a personal copy of these files; if at a later date newer versions of the files are put in the repository, you can 'update' your copy. You may edit your copy of the files freely. If new versions of the files have been put in the repository in the meantime, doing an update merges the changes in the central copy into your copy. (It can be that when you do an update, the changes in the central copy clash with changes you have made in your own copy. In this case cvs warns you, and you have to resolve the clash in your copy.) When you are satisfied with the changes you have made in your copy of the files, you can 'commit' them into the central repository. (When you do a commit, if you haven't updated to the most recent version of the files, cvs tells you this; then you have to first update, resolve any possible clashes, and then redo the commit.) USING CVS Suppose that a number of repositories have been stored in /usr/src/cvs. Whenever you use cvs, the environment variable CVSROOT must be set to this (for some reason): CVSROOT=/usr/src/cvs export CVSROOT TO CREATE A PERSONAL COPY OF A REPOSITORY Suppose you want a copy of the files in repository 'views' to be created in your directory src. Go to the place where you want your copy of the directory, and do a 'checkout' of the directory you want: cd $HOME/src cvs checkout views This creates a directory called (in this case) 'views' in the src directory, containing a copy of the files, which you may now work on to your heart's content. TO UPDATE YOUR COPY Use the command 'cvs update'. This will update your copy with any changes from the central repository, telling you which files have been updated (their names are displayed with a U before them), and which have been modified by you and not yet committed (preceded by an M). You will be warned of any files that contain clashes, the clashes will be marked in the file surrounded by lines of the form <<<< and >>>>. TO COMMIT YOUR CHANGES Use the command 'cvs commit'. You will be put in an editor to make a message that describes the changes that you have made (for future reference). Your changes will then be added to the central copy. ADDING AND REMOVING FILES It can be that the changes you want to make involve a completely new file, or removing an existing one. The commands to use here are: cvs add cvs remove You still have to do a commit after these commands. You may make any number of new files in your copy of the repository, but they will not be committed to the central copy unless you do a 'cvs add'. OTHER USEFUL COMMANDS AND HINTS To see the commit messages for files, and who made them, use: cvs log [filenames] To see the differences between your version and the central version: cvs diff [filenames] To give a file a new name, rename it and do an add and a remove. To lose your changes and go back to the version from the repository, delete the file and do an update. After an update where there have been clashes, your original version of the file is saved as .#file.version. All the cvs commands mentioned accept a flag '-n', that doesn't do the action, but lets you see what would happen. For instance, you can use 'cvs -n update' to see which files would be updated. MORE INFORMATION This is necessarily a very brief introduction. See the manual page (man cvs) for full details. 07070100106b81000041ed0000000000000000000000024d58a1ff00000000000000b600010002ffffffffffffffff0000001300000000root/usr/local/bin07070100106b82000081ed0000000000000000000000014d58a1f8001da208000000b600010002ffffffffffffffff0000001700000000root/usr/local/bin/cvsELF44 (#"44o& & & &&7t) t)/usr/lib/ld.so.1   !$&'+,/13479:;=>?@BCDFIKMOPQRUVXY[]_`abdfgiklmopqrstvwx{~    !"#$%&'*+-/24689:;<=>@ABCEFGHIJLNORSTVY[]^`abcdeghijlmnprtuwy|~   !"#$%&'(*,/3457:;=>?ABDEFGHJKMOPQRSUVXYZ\]^adegijklnoprstuwxy{|}     #%*-.1234679<=?BEFGHJKLOPQTVWXY[\^_`bdghilmnopqstvwxy|}~   #%&(*,-./123678:<>ACDGHJKMNOQSVWXYZ]^`bcfhiklmnoqrtuvwxyz{~   "#%()*-.02568<AEGHJLNSTWZ\^cehjnuyz|}  (),.01357?DKMPQUWXZ\_fkoqsvxz{}   )+-.012689<@CILNTW[_`bcfhmqvz~ !"$&'()+,/058:;>@ACDIMNRSUZ]acefjkruz{   !"$')+0459;=?@BEFILPRTU[\_adegjps|}   ,22 7- = < C`) I  N  HЊ  V( \_ h v22 70- =`< C) IХ  N  H  V0( ~`+ @5   22 7- =< C0) I`  N  H  V(  1 2`2 7- =< C) I@  N`  H  V(   F 0 * >`P Q gn + @% ( pI 22 70- =`< C) I  N  H  V0( 2P2 7- =< C) I0  NP  Hp  V(   H @ #e 82P2 7- =< C) I0  NP  Hp  V( C W$ a2&2 7&- =&< C0') I`'  N'  H'  V'( j'| p( p.  / / 0l `1Y 1I 1 &2 02k =4P S`5 f6s {6 W >  ? @? ? j A B3 Bd (@CK  7P2 IP4 ZQ2 iPQ2 xQ2 Q4 R2 PR2 R R RE  S @SK SN SA -0TA :TY _T XU} qPVA jVY W| ~W  XC pY ` c c pd e e e: n +`o ;s Gy Z`x e~a x} : P  I F 0*   `  22 70- =`< C) IС  N  H  V0( "`d 3Тw @Pn S, aF lS } @r b  [ p-  > ps !@M 5 Df M@ W  d| oP ypW 0 ^ 202 7p- =< C) I  N0  HP  Vp( 22 7- =< C0) I`  N  H  V( 202 7p- =< C) I  N0  HP  Vp( V  S `       ( 2 2 7 - = < C0 ) I`   N   H   V ( / u > p s R  ^ 0 P m   M E p* 2-2 7.- =@.< C.) I.  N.  H.  V/( @/ @0 0n 0:| `1`  ?  P6W  6x % ? 5 `EC C H_ M 2M2 7M- = N< C`N) IN  NN  HN  VN( U 2S2 70T- =`T< CT) IT  NT  HU  V0U( c `U t `\- 2^2 7^- =_< C@_) Ip_  N_  H_  V_( `X 0a` @mq 2r2 7r- =s< CPs) Is  Ns  Hs  Vs( O `x 22 70- =`< C) IЍ  N  H  V0( `  N   - / P 9 202 7p- =< C) I  N0  HP  Vp( D 22 7- =< CP) I  N  H  V( K  Q @ ^ 2 i Ф x  22 7P- =< C) I  N  H0  VP(      p   @   @D 22 7- =< C@) Ip  N  H  V(  2 2 7`- =< C) I  N   H@  V`(  h .  = = ` Q   d  t p > }    5 2 2 7 - = < C0 ) I`   N   H   V (  P " Q "  " # . k , : %  `' I  `/   P0  & '  1 ) Y ? ,  P 1  c 03  4 C q 24 2 75 - =@5 < C5 ) I5   N5   H5   V6 ( w @6 p 6 ' F  PD E H  A 4 h S I } I R `Q   `  b  &] s 7` R B``  LPd  Xb  aPi  q]  c  @h  2k 2 7Pk - =k < Ck ) Ik   Nl   H0l   VPl ( l  0m  p @ 2{ 2 7@{ - =p{ < C{ ) I{   N|   H |   V@| ( p|  @~ 9 ~    * i 8 i G 2 [  i  t2 2 7@ - =p < C ) I   N   H   V@ ( {p <     2` 2 7 - =г < C ) I@   N`   H   V (   `   K P C 2 2 7 - =0 < Cp ) I   N   H   V (  P f  q 2 2 70 - =` < C ) I   N   H   V0 ( p  p ` 2` 2 7 - = < C ) I@   N`   H   V ( "2 2 7 - = < C@ ) Ip   N   H   V ( .2 2 7 - =  < C` ) I   N   H   V ( 6@! / D  O! 5 ]0  l2p" 2 7" - =" < C # ) IP#   Np#   H#   V# ( r#  }P k `& o <   ?   K   P t > ] Q  K : p  <  O " ,@H  =L v Np:  d;  z0  I  @M  O # S n pT n U  m  t e p_ Q   %0h 9 8z  G{ n \}   lp   a 0         C  O       { *@ F : U B q O # _  n Z ~@   F @    p a  1  }   P   `   +2p 2 7 - = < C  ) IP   Np   H   V ( 5 $ G f W  n        m ` a   20! 2 7p! - =! < C! ) I"   N0"   HP"   Vp" ( : n gP; { ;  +  1  p3 h #2= 2 7> - =0> < Cp> ) I>   N>   H>   V? ( -0? ` <2F 2 7F - =F < C0G ) I`G   NG   HG   VG ( EJ R [O 5 mK  }2@O 2 7O - =O < CO ) I P   N@P   H`P   VP ( 2U 2 7V - =0V < CpV ) IV   NV   HV   VW ( \  2h 2 70i - =`i < Ci ) Ii   Ni   Hj   V0j ( k $ r o 2`x 2 7x - =x < Cy ) I@y   N`y   Hy   Vy ( 2z 2 70{ - =`{ < C{ ) I{   N{   H|   V0| ( `|  }  }  ~  !p - 4~  D  Qp i Y  ep  y` `  y @ O    O p h     p  P )   p  'p n 4  I  V  e  w    @ _     p   B г          l :   M  c D w  0   6 P   g           @  `    ,  9  E  O  Z  g@  s`              @  ` <    F   !0  1P  :  G ? U 0 i t {@         @   r `   Z "`  8  O2` 2 7 - = < C ) I@   N`   H   V ( W ? _P  f  ? q  z2 2 7 - = < CP ) I   N   H   V ( P# 5  ' # 1 2$ 2 7% - =@% < C% ) I%   N%   H%   V& ( 2< 2 7@< - =p< < C< ) I<   N=   H =   V@= ( D ; }L  I z O N V  ]  N -  O + pM x PO ? T  p^ r ^ /  a  -b 0 <2e 2 7@e - =pe < Ce ) Ie   Nf   H f   V@f ( E | F Zx z mw  q  0 =    e    P I v  p} F p "     2 2 7 - =P < C ) I   N   H   V ( 2P 2 7 - = < C ) I0   NP   Hp   V (   12 2 7 - = < C` ) I   N   Hк   V ( jP & 9 * Q  a  s2p 2 7 - = < C ) IP   Np   H   V ( } s 2 2 7@ - =p < C ) I   N   H   V@ ( p t   @  @   m  5 )@ I I   N   H@   V` ( ?  KP s S@  _ z p   2  M    P @  6  B P    " I   N   H   V ( pK w #  `# 6 # B 0   $ 8 ? D `K " 1C  D0K ' P< H ]L  o&  L  , K +  .  6  03  :  J ?  p>  0? S J L " IM   NM   HM   VN ( > @N  C V  N X  f `a  w `e M e 1 f # h L I@r   N`r   Hr   Vr ( Ips   Ns   Hs   Vs ( 0w V   0 S I   N   H   V@ ( !p o !  +!  ;!@  E!p  U! W p!  ~! w !I   NЗ   H   V ( !`  !  ! P !Ip   N   H   VМ ( ! E !Ip   N   H   VО ( !  "` J "  "P  0"` ] B" ! S" H f"I@   N`   H   V ( m"I   N   H   V ( s"P  |"0 $ "I`   N   H   V ( "  " [ "P  " + "@ : ""  # p #@  #` ~ #  -#  ;#`  F#` M T#  [#   k#  w#  ###p G # i #0  ####; #@2 ##@ #@F $` $ a ,$@_( 6$_V A$ `^ L$p_B V$aU m$p$? $p  $ $ $@8 $$IP  Np  H  V( $ $@ %%I  N  H  V0( %(%0%:% B%@i N% \% e% s%Q %@ % %M %% % % %@N % %&L %` &0 &R  &P  %& ] 4& )m ?&' H&% V&@ e&0( e"o& %y&@R &&&&&&P&p^ l &`  &@I &R'p~ )' M 4'+ ;'  H' - U'Z !\'HN|'P j '`@ '\p'0k  ''P'.(L !((( ] 5(L3X(8 f(-(6 ( 8h<8t  88888o  8;9P9l+29~:9 J9Qo9-  99x  9  9 `T  9 9]9 9;9@[  :pNP :P0:&: V 8:LtU:`\:& q:5 :x:= :8P:p^ p ( :S:lO: ;l ;#   ,;` 8;Ph;@o;.;:|;M;; ;\X;T;P<\ <p t <<|-B< [  R<(Pf<P% n<N<Q<NE2P<@<R<s  / +<HO =hO1=PO=]^=+m=8^{=TS==`=DP=S>w > z 7>XSX>0[ e> w t>  ~>P ' >,Q>P>&>\>ph   >LR?D0=?OV?Pm?0u?   ?$S?wG ?P?PP?P?@8 1 ?( $ @l7 @dO'@RC@]T@x-y@/@ Q @@@d  @$L@83Ap-A ApR6A^  CAО1 LA.SAPOnA`j : }Ap] A@ A6 A   A QA b A* APB33B;BlRRBHZdB 38pf /  BPX  B@BԣxB,BOC` ` C0p< C H  )C@RCZ_CN|CNC- C|3CPk? C  COD! %D@ 3D@7pXDdDkD} B vD\OX\\3t\@  \R;\@\ , \`:  \.p\\ g   \\  \D]S0]N$Q]@Su]`|]]Pq ]` x ] ]XO]PW ]T3]M^N4^ċ0\^8/u^^ _ ^-^tL^O^  V ^ ^l.[TZ_8D_Qf_ o_T  _@3_g  _N_\_N` b ``+3`PO`Of`l`@r`3 `@`  `^```@ ( ` B `1  `p , `  `0  aR a* a@*a` - ;a@NXa`  iaM8 ~aЅaPn} a  a6OYG aQbj  b-b4P0b`   9b@M# Bb  Rb6   Yb`bS ib  wbd 'A^bp bTb- by.UyOryjL ~yp  ydXyt)y@2 Q y4xy  y<|y- z   zO0z3VzT^<%LygzX^|z NAz- 6y  zPSzPRz*  X`O {$<!{`&{,{;L{@ ^ X{Pt{p  {P.  {x3{M{lf  {  {@^{0?G |N$|pO?|NX|.Gx|P|Q|O|@:' |L0|Fp4  |H0|.}( }0  :}.Q}Pr}l }1 }` } V R0}p}d-}Ї}@$ } Q}Ԓ~LO6~\OR~Г`j~ w~x~  ~P I ~) ' ~0b  J , y~lx~O/0<M@S ? Yv  ip ] u~p; (NhZ7\; ́  Y,@ZZ (p M  5X8T-xе : W  y k0  (O-ɀ ( ڀR3& ! 6P<{ ERRP  dNOdNp , MҁQ( ?  RQ=Pr | <R[P @ kRO ?   XR'{pՂNcvscrti.scrt1.ocrt1.sfsr.svalues-Xa.cadd.cxsumxsum3xsum4xmaxfstatlstat_xmknodbuild_entryadd_directoryadmin.carg_addadmin_dirprocadmin_fileprocannotate.crannotate_procannotate_fileprocbuffer.cbuf_default_memory_errorallocate_buffer_datasget_buffer_datastdio_buffer_inputstdio_buffer_outputstdio_buffer_flushstdio_buffer_shutdownpacketizing_buffer_inputpacketizing_buffer_outputpacketizing_buffer_flushpacketizing_buffer_shutdownpacketizing_buffer_blockcheckin.ccheckout.ccheckout_procbuild_one_dirfindslashbuild_dirs_and_chdirclassify.ckeywords_may_changesticky_ckclient.cis_arg_a_parent_or_listed_dirarg_should_not_be_sent_to_serverlog_buffer_initializelog_buffer_inputlog_buffer_outputlog_buffer_flushlog_buffer_shutdownlog_buffer_blockbuf_read_linehandle_okhandle_errorhandle_valid_requestspath_list_prefixedis_valid_client_pathcall_in_directoryadd_prune_candidatecopy_a_filehandle_copy_filestrto_file_sizeread_counted_filetry_read_from_serverhandle_checksumhandle_modehandle_mod_timeserver_update_entrieshandle_checked_inhandle_new_entryhandle_updatedhandle_createdhandle_update_existinghandle_mergedhandle_patchedhandle_rcs_diffhandle_remove_entryremove_entry_and_filehandle_removedis_cvsroot_levelset_statichandle_set_static_directoryclear_statichandle_clear_static_directoryhandle_set_stickyhandle_clear_stickyhandle_templateprocess_prune_candidatessend_repositoryhandle_module_expansionhandle_wrapper_rcs_optionhandle_mhandle_mbinaryhandle_ehandle_fhandle_mtinit_sockaddrget_port_numberauth_serverconnect_to_gserverrecv_bytessend_variable_procstart_rsh_serversend_modifiedsend_fileprocsend_ignprocsend_filesdoneprocsend_dirent_procsend_dirleave_procsend_max_dotdotnotified_a_filehandle_notifiedcommit.cfind_dirent_procfind_ignprocfind_filesdoneprocfind_fileproccopy_ulistcheck_direntproccheck_filesdoneprocncheck_fileproccommit_dirleaveproccommit_direntproccommit_filesdoneproccommit_fileprocclassify_file_internalmasterlist_delprocci_delprocprecommit_list_procprecommit_proclock_RCSunlockrcscheckaddfilefixaddfilefixbranchfindmaxrevfinaladdremove_filecreate_adm.ccvsrc.cno_diff.cadd_diff_argsdiff_dirleaveprocdiff_dirprocdiff_filesdoneprocdiff_fileprocdiff_file_nodiffdiff_mark_errorsedit.conoff_fileproconoff_filesdoneprocwatch_onoffdummy_fileprocsend_notificationsunedit_fileprocnotify_proceditors_fileprocentries.cEntnode_CreateEntnode_Destroywrite_ent_procfputententserver_write_entriesAddEntryNodefreesdtfgetententEntries_delprocsubdir_recordbase_walkerror.cexpand_path.cvariable_delprocexpand_variablefileattr.cfileattr_delprocfileattr_readwriteattr_procfilesubr.cdeep_remove_dirblock_readfind_names.cadd_entries_procfind_rcsadd_subdir_procregister_subdir_procfind_dirshardlink.chash.chashpfreenode_memqsort_compnodetypestringprintnodehistory.csort_ordersave_filesave_modulesave_userserve_expand_modulesread_hrecsreport_hrecsfill_hrecselect_hrecwithinaccept_hrecignore.cimport.cimport_descendadd_logclient_process_import_fileimport_descend_dirupdate_rcs_fileadd_tagsadd_revget_commentinfblock.clock_nameremove_lockslock_simple_removeunlock_procinternal_clear_lockset_lockWriter_Lockset_writelock_proclock_waitlock_obtainedwrite_lockreaders_existset_lockers_namelock_filesdoneprocinternal_locklog.csend_onesend_arg_listlog_parse_datelog_parse_revlistlog_parse_listrlog_proclog_dirproclog_fileprocprintlock_proclog_expand_revlistlog_fix_singledatelog_count_printlog_free_revlistlog_symbollog_countlog_versionlog_treeversion_comparelog_version_requestedlog_abranchlog_branchlogin.cconstruct_cvspass_filenamepassword_entry_parselinepassword_entry_operationlogmsg.csetup_tmpfilefind_typefmt_procrcsinfo_proceditinfo_procverifymsg_procupdate_logfile_proclogfile_writetitle_procmain.cset_root_directorycmd_synonymsmain_cleanupmkmodules.cmake_tempfilerename_rcsfilecheckout_filein_repositorymy_modulesave_dmyndbm.cmydbm_load_filewrite_itemparseinfo.cpatch.cpatch_cleanuppatch_procpatch_dirprocpatch_fileprocrcs.clocate_rcsrcsbuf_cache_closeRCS_parsercsfile_ircsbuf_openrcsbuf_getkeyrcsbuf_valcopyrcsbuf_cachercsbuf_closercsbuf_cache_openrcsbuf_valcmpgetdeltarcsvers_delprocrcsbuf_ftellrcsbuf_getrevnumrcsbuf_valpolishfree_rcsnode_contentsfree_rcsvers_contentsfreedeltatextrcsbuf_fillrcsbuf_valpolish_internalrcsbuf_get_buffereddo_symbolsdo_locksdo_branchesRCS_getdatebranchtranslate_symtagcheckmagic_proctruncate_revnumRCS_getbranchpointprintable_dateescape_keyword_valueexpand_keywordsRCS_findlock_or_tiptruncate_revnum_in_placecompare_truncated_revnumsmax_revRCS_addbranchrcs_internal_lockfileRCS_putadminRCS_putdtreeRCS_putdescputdeltatextrcs_internal_unlockfilecmp_file_bufferfindtagfindmagictaglinevector_initlinevector_addlinevector_copylinevector_freemonth_printnameapply_rcs_changesRCS_getdeltatextputsymbol_procputlock_procputrcsfield_procputdeltaRCS_copydeltascount_delta_actionsrcs_lockfilenamercscmds.ccall_diff_add_argcall_diff_setupcall_diff_write_outputcall_diff_flush_outputcall_diff_write_stdoutcall_diff_errorcall_diffcall_diff3RCS_output_diff_optionsrecurse.caddlistunroll_files_procdo_recursiondo_file_procdo_dir_procrelease.crelease_serverremove.cremove_force_fileprocremove_dirprocaddremove_fileprocrepos.croot.cnew_cvsroot_trun.crun_add_argwork_around_openssh_glitchscramble.cserver.cfd_buffer_initializefd_buffer_inputfd_buffer_outputfd_buffer_flushfd_buffer_shutdownfd_buffer_blockcreate_adm_pmkdir_pprint_errorprint_pending_erroralloc_pendingsupported_responseserve_valid_responsesserve_rootoutside_rootoutside_dirserve_max_dotdotdirswitchserve_repositoryserve_directoryserve_static_directoryserve_stickyreceive_partial_filereceive_fileserve_modifiedserve_is_modifiedserve_enable_unchangedserve_unchangedserve_entryserve_koptserve_checkin_timeserve_notifyserver_notifyserve_argumentserve_argumentxserve_global_optionserve_setserve_gssapi_authenticateserve_questionableprotocol_memory_erroroutbuf_memory_errorinput_memory_errorcheck_command_legal_pdo_cvs_commandoutput_dirnew_entries_lineserve_cichecked_in_responseserve_updateserve_diffserve_logserve_rlogserve_addserve_removeserve_statusserve_rdiffserve_tagserve_rtagserve_importserve_adminserve_historyserve_releaseserve_watch_onserve_watch_offserve_watch_addserve_watch_removeserve_watchersserve_editorsserve_noopserve_versionserve_initserve_annotateserve_rannotateserve_coserve_exporttemplate_procserve_gzip_contentsserve_gzip_streamserve_wrapper_sendme_rcs_optionsserve_ignoreexpand_procserve_valid_requestsswitch_to_usercheck_repository_passwordcheck_passwordgserver_authenticate_connectioncvs_gssapi_wrap_inputcvs_gssapi_wrap_outputstack.cdo_pushdo_popdo_unshiftdo_shiftstatus.cstatus_dirprocstatus_fileprocpretag_list_proctag.crtag_procrtag_fileproctag_dirproctag_delprocpretag_procrtag_deleteval_fileprocis_in_val_tagsadd_to_val_tagsval_direntprocupdate.cupdate_dirleave_procupdate_dirent_procupdate_filesdone_procupdate_fileprocmerge_filepatch_filescratch_filejoin_fileupdate_ignprocisremovedcheckout_to_bufferpatch_file_writeRegisterMergeversion.cvers_ts.ctime_stamp_serverwatch.caddremove_filesdoneprocwatch_addremovewatchers_fileprocwrapper.cwrap_matching_entryzlib.ccompress_errorcompress_buffer_inputcompress_buffer_outputcompress_buffer_flushcompress_buffer_shutdown_inputcompress_buffer_shutdown_outputcompress_buffer_blockoption_listck_atoiadd_excludeadd_exclude_fileinitialize_mainspecify_stylespecify_formatadd_regexpinit_usagecheck_outputtry_helpcompare_filesfiletypediff3.cprocess_diffmake_3way_diffoutput_diff3_edscriptdiff3_perror_with_exitoutput_diff3_mergediff3_fataloutput_diff3free_diff3_blocksusing_to_diff3_blockfree_diff_blockscreate_diff3_blockcopy_stringlistcompare_line_listread_diffprocess_diff_controlscan_diff_linemyreadundotlinesreverse_diff3_blocklistanalyze.c.XAKk4DpyHKWNFpk.bdiagcompareseqdiscard_confusing_linesshift_boundariesadd_changebuild_reverse_scriptbuild_scriptbriefly_reportcmpbuf.cio.cfind_and_hash_each_lineprepare_text_endfind_identical_endscontext.cprint_context_labelmark_ignorablepr_unidiff_hunkfind_hunkpr_context_hunkprint_context_number_rangefind_functionprint_unidiff_number_rangeed.cprint_ed_hunkpr_forward_ed_hunkprint_rcs_hunknormal.cprint_normal_hunkifdef.cprint_ifdef_hunkformat_ifdefformat_groupgroups_letter_valueprint_ifdef_linesscan_printf_specscan_char_literalzutil.cdir.cdir_sortcompare_namesside.cprint_sdiff_hunkprint_sdiff_common_linestab_from_toprint_half_lineprint_1sdiff_linegetdate.cgetdate_yyerrorToSecondsConvertDSTcorrectRelativeDateRelativeMonthLookupWordgetdate_yylexdifftmgetdate_yyparseyyinitstackyygrowstackgetline.cgetopt.cmy_indexexchange_getopt_initializegetopt1.cgetpass.cmd5.cgetu32putu32regex.cinit_syntax_onceregex_compileat_begline_loc_pat_endline_loc_pstore_op1insert_op1insert_op2store_op2group_in_compile_stackre_match_2_internalgroup_match_null_string_pbcmp_translatealt_match_null_string_pcommon_op_match_null_string_psavecwd.csighandle.cSIG_initSIG_handlestripslash.cxgetwd.cyesno.ccrc32.cdeflate.clm_initputShortMSBflush_pendingread_buflongest_matchfill_windowdeflate_storeddeflate_fastdeflate_slowinftrees.ctr_static_initinit_blockpqdownheapgen_bitlengen_codesbi_reversebuild_treescan_treesend_treebuild_bl_treesend_all_treescopy_blockbi_flushset_data_typecompress_blockbi_windupinflate.chuft_buildinfcodes.cinfutil.cinffast.cadler32.ccrtn.s.XBKk4Dp1HKWNlXm.main.short_optionsparse_cvsrootdiff_dirsbuf_empty_p.XAKk4Dp3HKWNlRn.tag_update_dirstart_serverread_fileszcfreewrite_lettercvs_getpass__ctype.XAKk4DpzHKWNlcl.importmergecmdwrap_free_entry_internalclient_expand_modules.XAKk4Dp1HKWNVPm.log_usagerun_argmemcmp.XAKk4Dp3HKWNlDn.server_temp_dirroot_directories.XAKk4DpyHKWNljk.longoptsgetcwdcvs_flusherr.XAKk4Dp3HKWNlRn.update_prune_dirscvs_MD5Update.XBKk4Dp1HKWNVMm.Lock_Cleanup.in_lock_cleanupsend_init_commandignore_blank_lines_flagName_Rootget_cvs_passwordperror_with_namegetpwuid.XAKk4Dp3HKWNlJn.localgss_wrapgetlogin.XAKk4DpxHKWN11j.MonthDayTable.XAKk4DpzHKWNVMl.admin_usage.XAKk4Dp1HKWNFSm.logout_usage.XAKk4Dp0HKWNFEm.user_maxMake_Datevariable_set.XAKk4Dp0HKWNFEm.module_report.XBKk4Dp3HKWNlDn.server_set_entstat.set_static_supported.XAKk4Dp1HKWNlJm.repos_lengetspnamrewindprogram_pathprintf_output.XAKk4DpzHKWNVXl.join_rev1.XAKk4DpzHKWNVXl.join_rev2_get_exit_frame_monitorinhibitrecvline_format.XAKk4DpzHKWNVXl.preload_update_dirxchmod.XAKk4Dp0HKWN1ql.setting_tuneditstrtokyycharstrtolsigaddset.XAKk4Dp1HKWN1Gm.ign_countinflateInit_cvstagdiff_abort_bufbuf_send_output.XAKk4DpxHKWN11j.yyHaveZone.XAKk4Dp0HKWNFEm.mod_listsetuid.XAKk4Dp0HKWNFEm.since_tagdate_from_time_t.XAKk4Dp3HKWNlRn.date_rev1.XAKk4Dp3HKWNlRn.date_rev2.XAKk4DpzHKWNVXl.pipeoutmemcpy_edataclient_senddate.XAKk4Dp3HKWNlRn.rcs_diff_patches___Argvwatch_usagebuf_send_counteddiff_program_namexgetwdLock_Cleanupyylenprint_normal_scriptno_discards.XAKk4Dp3HKWN1Zn.the_argsxresolvepathinflate_blocks_sync_pointSIG_beginCrSectrename_filecompress_buffer_initialize.XAKk4DpxHKWN11j.yyDayOrdinaldebug_script.XAKk4DpxHKWN11j.yyDayNumbersend_a_repositorylogHistory.XAKk4Dp3HKWNlRn.date.XAKk4Dp1HKWNFdm.s_headtolower.XAKk4DpzHKWNlcl.ignlistfchmodwrap_clean_fmt_strpop_stringcvs_regexec.XAKk4Dp3HKWNlcn.wrap_sizestdio_buffer_get_filememset.XAKk4DpxHKWN11j.yyHaveRelRCS_checkin.XAKk4Dp0HKWNF2l.attr_read_attemptedget_cvs_port_number.XAKk4Dp2HKWNFom.rev2_validatedxstrdup.XAKk4Dp1HKWN1Gm.s_ign_list.XAKk4DpzHKWNVXl.aflag_environ.XAKk4Dp1HKWNVam.loginfo_contents.XAKk4Dp0HKWN1ql.notify_argsmake_directoriesRCS_check_tag.XAKk4DpxHKWNF7j.posixly_correct.XAKk4Dp1HKWNVam.cvswrappers_contents.XAKk4Dp3HKWN1On.is_rtagyylhs.XAKk4DpzHKWNFgl.commit_usagewrap_tocvs_process_fileCVSroot_cmdlinecvs_output_taggedyesno.XAKk4Dp0HKWNFol.diff_argcrmdirprint_ifdef_script.XAKk4DpzHKWNVJl.add_usage.XAKk4DpzHKWNlcl.stored_checksum.XAKk4DpyHKWNVmk.overlap_onlyprint_ed_script.XAKk4Dp2HKWNl7m.root_allow_vectorfileattr_newfileisreadableserver_scratch_entry_only.XAKk4Dp0HKWNF2l.fileattr_default_attrsyygindexRCS_setattic.XAKk4Dp0HKWN1ql.edit_usagere_max_failureswrap_setupre_search.XAKk4DpyHKWNFpk.fdiag_lxstat.XAKk4Dp1HKWNFdm.def_statusinflate_trees_dynamicheuristic.XAKk4Dp1HKWN1Gm.dir_ign_listinflate_fastvforkinflate_maskgetcallerRCS_isdeadfileattr_modifyfseek.XAKk4Dp0HKWNFol.diff_date1.XAKk4Dp0HKWNFol.diff_date2.XAKk4DpxHKWN11j.yyYearbuf_initializeWriteTag.XAKk4DpxHKWNF7j.ordering.XAKk4Dp0HKWNF2l.fileattr_stored_repos.XAKk4Dp1HKWN1Um.verifymsg_scriptdelnode.XAKk4DpxHKWN11j.yyHaveDate__fsr_init_value.XAKk4Dp0HKWNFEm.hrec_countmydbm_firstkeybackup_file.XAKk4DpyHKWNVmk.edscript.XAKk4Dp3HKWNlRn.tag.XAKk4Dp3HKWNlDn.checkin_time.XAKk4Dp3HKWNlRn.update_usageScratch_Entry.XAKk4Dp1HKWNlJm.conflictsraiseRCS_setbranchwrap_name_hasbuf_flushno_details_flag.XAKk4Dp0HKWNFEm.last_backtoSubdirs_Known.XAKk4Dp3HKWN1On.symtag.XBKk4Dp3HKWNlcn.wrap_setup.wrap_setup_already_doneRCS_gettag.XBKk4Dp3HKWNlcn.wrap_unparse_rcs_options.iRCS_delete_revs.XAKk4Dp0HKWNFol.diff_argv.XAKk4Dp1HKWNVMm.locked_dirstrncatEditor.XAKk4Dp3HKWN1On.rtag_opts.XAKk4Dp3HKWNlDn.entries_linefree_cvsroot_tserver_modtime.XAKk4DpzHKWNlcl.updated_seenz_errmsggetstr.XAKk4Dp0HKWNFol.longopts.XAKk4Dp1HKWNlJm.logfp.XAKk4DpxHKWN11j.yyRelMonthRCS_head.XAKk4DpxHKWN11j.OtherTablelist_isemptysetup_output.XAKk4Dp1HKWN1Um.prefixdescramble.XBKk4Dp1HKWNlXm.tm_to_internet.month_namesRCS_exist_tag.XAKk4Dp1HKWN1Gm.ign_listvfprintf.XAKk4Dp3HKWNlDn.checkin_time_validstrncpy.XAKk4Dp0HKWNFol.diff_errors.XAKk4Dp3HKWNlJn.status_usagebuf_read_file_to_eofkrb5_aname_to_localnamewrap_rcsoptionfileattr_get0gethostname.XAKk4Dp0HKWNFEm.module_sortprint_file_same_flag.XAKk4DpyHKWNVdk.fixed_tdslurp.XAKk4Dp2HKWN1wm.repository.XAKk4DpzHKWNlcl.from_server.XBKk4Dp0HKWNFEm.history_write.PrCurDirerror_exittoplevel_wdmkmodules.XAKk4DpyHKWNVdk.fixed_tlsipgmtime.XAKk4Dp1HKWNlXm.usgdo_update.XAKk4DpyHKWN1Zk.static_l_descfsync.XAKk4DpzHKWNlcl.uppathsstrncmp_tr_flush_block.XAKk4Dp3HKWNlDn.kill_scratched_file.XAKk4Dp0HKWNFol.empty_filesexeclfree_cvs_passwordline_cmpignore_directorybuf_input_datafile_gzip_levelcvs_regerrorcvs_optargroot_allow_addgetgrnamserver_dirgetservbynameserver_checked_in.XAKk4DpyHKWN1Zk.extra_lbitsfclosebuf_nonio_initializeinsert_before.XAKk4DpxHKWNFZk.configuration_tablefree_cwd.XAKk4Dp1HKWN1Um.tagbuf_free.XAKk4DpxHKWN11j.yyHour.XAKk4Dp0HKWNFEm.histfileignore_files.XAKk4Dp1HKWNlXm.cmdsReader_LockCheckinbuf_shutdown.XBKk4DpxHKWNVIk.save_cwd.have_working_fchdirRereadLogAfterVerifyyyrindex.XAKk4DpzHKWNVXl.checkout_prune_dirscvs_MD5Final.XAKk4Dp1HKWNVam.verifymsg_contents__iob.XAKk4Dp3HKWNlDn.dir_namelock_dirdo_verifymunmap.XBKk4Dp0HKWNlll.read_cvsrc.old_argcroot_allow_used.XAKk4Dp1HKWN1Um.fpaddnode.XAKk4Dp0HKWNFol.diff_rev1.XAKk4Dp3HKWNlDn.notify_list.XAKk4Dp0HKWNFol.diff_rev2fgets.XAKk4DpyHKWNF5k.next_lineRCS_symbols.XAKk4Dp0HKWNFEm.rec_types.XAKk4Dp0HKWNFEm.tz_seconds_east_of_GMT.XAKk4Dp2HKWNlqm.rcs_lockfiledir_start_file__environ_lockpaginate_flag.XBKk4DpxHKWNVAk.cvs_getpass.bufsizerun_popengss_display_status.XBKk4Dp1HKWN1Um.rcsinfo_proc.last_template.XAKk4DpxHKWN11j.yyMeridianconnect_to_forked_serverlookup_command_attribute.XAKk4DpxHKWNlFk.re_syntax_tableSIG_registerserver_scratchdiff_execpserver_authenticate_connection.XAKk4Dp3HKWNlDn.saved_outputsigfillset_GLOBAL_OFFSET_TABLE_sdiff_column2_offsetdiff_2_files.XAKk4DpyHKWNljk.exclude_alloc.XAKk4Dp3HKWNlDn.Pserver_Repos.XAKk4Dp0HKWNFEm.mod_max.XAKk4Dp2HKWNF2m.localmemmovecvs_outerr.XAKk4DpxHKWN11j.yyHaveDayisdirsetgid.XAKk4Dp1HKWN1Um.changes.XAKk4Dp3HKWNlDn.pending_error_textresolve_symlinkpathname_levelsyytable.XAKk4Dp0HKWNFEm.tz_local.XAKk4DpxHKWN11j.yyTimezonesdiff_half_width.XBKk4Dp0HKWNlll.read_cvsrc.old_argvinflate_copyrightprint_sdiff_script.XAKk4Dp1HKWNVam.filelisttag_check_valid_join.XAKk4DpyHKWN1Zk.extra_blbits.XAKk4Dp3HKWNlRn.optionsuse_cvsrcasctime.XAKk4DpyHKWNVmk.tab_align_flagRCS_magicrevfreenodeTmpdir.XAKk4Dp0HKWNFEm.all_usersrun_arg_free_pstrip_trailing_slashescvs_casecmpinflateSetDictionarycvs_output.XAKk4Dp3HKWNlDn.command_pidclient_send_expansionszError.XAKk4Dp3HKWNlDn.entries.XAKk4DpyHKWNl7k.msg_chain_endmkstemp.XAKk4DpyHKWNVmk.mergeclient_prune_dirs.XAKk4Dp3HKWN1On.disturb_branch_tagsRCS_tag2revgss_import_name.XAKk4DpyHKWN1Zk.static_dtree.XBKk4Dp3HKWNFMn.shell_escape.meta.XAKk4Dp1HKWNlJm.repositoryset_block_fdre_match_getopt_internal.XBKk4Dp3HKWNlDn.outbuf_memory_error.msgcvs_cmd_name.XAKk4DpzHKWNFgl.got_message.XAKk4Dp0HKWNFol.have_rev1_label.XAKk4Dp1HKWNVMm.global_history_lock.XAKk4Dp3HKWNlcn.wrap_saved_countfileattr_setallVersion_TS.XAKk4Dp1HKWNVMm.lock_errornotify_dobuf_read_file.XAKk4Dp1HKWNVam.commitinfo_contentsgetpagesizegetenvisemptydir.XAKk4Dp1HKWN1Um.editinfo_editor.XAKk4Dp3HKWNlRn.rewrite_tagRCS_checkout.XAKk4DpzHKWNVXl.tag.XAKk4DpzHKWNlcl.modules_countbuf_count_memsigprocmaskfileattr_setclear_val_tags_lock.XAKk4DpyHKWNFpk.yvec.XAKk4Dp2HKWN1wm.filelist.XAKk4DpxHKWNlFk.reg_unset_dummyfreevers_tsprint_context_headerbase_registerwrap_send.XAKk4DpxHKWNFLk.SIG_handlersign_addfcntlstrlenfileattr_free.XAKk4DpyHKWNVdk.cpdist.XAKk4Dp1HKWN1Gm.ign_size.XAKk4Dp1HKWN1Gm.dir_ign_currentoutput_stylerestore_cwdwalklist.XAKk4DpxHKWN11j.yyInputdate_to_tmclear_history_lock.XAKk4Dp1HKWN1Um.str_list_formatgetline.XAKk4Dp0HKWNFol.diff_arg_allocated.XAKk4Dp2HKWNFom.rev1.XAKk4Dp2HKWNFom.rev2print_context_script.XAKk4Dp3HKWNlRn.pipeoutinflateSyncPoint.XAKk4Dp3HKWN1Zn.watchers_usagere_comp.XAKk4Dp0HKWN1ql.turning_onpush_stringdo_modulefwrite.XBKk4Dp1HKWNVam.make_tempfile.seedSanitize_Repository_NameclosedirRCS_rewritemethod_names.XAKk4DpyHKWNl7k.output_in_progresseditor_setadd_rcs_fileconnect.XBKk4DpyHKWNVmk.output_diff3.skew_increment.XAKk4DpyHKWNFxk.find_function_last_searchhistory_writezlibVersionbase_deregister.XAKk4Dp3HKWNlRn.last_register_time.XAKk4Dp2HKWNlqm.cached_rcsbuf.XAKk4DpyHKWNVmk.simple_onlyFind_DirectorieszcallocRCS_valid_rev.XBKk4DpxHKWNlFk.init_syntax_once.done.XAKk4DpzHKWNlcl.stored_modtime_valid.XAKk4DpyHKWNVdk.cplensignore_some_line_changesyylvalbuf_append_data.XAKk4DpxHKWN11j.yyMonthinflate_codescvsauthenticate.XAKk4Dp0HKWNFEm.file_countcvs_MD5Initclient_import_setup.XAKk4DpzHKWNFgl.saved_tag.XAKk4Dp2HKWNFom.toptwo_diffssignal.XAKk4Dp3HKWNlDn.buf_from_netwrap_add_file.XAKk4Dp0HKWNF2l.attrlist.XAKk4Dp3HKWNlJn.xrcsnode.XAKk4Dp0HKWN1ql.setting_tcommitcompare_revnums.XBKk4DpxHKWNFZk.deflateInit2_.my_versionclient_notifysleep_pastunlink_filexrealloc_and_strcat.XAKk4Dp3HKWNlDn.kopt.XAKk4DpyHKWN1Zk.bl_orderre_execcvswritedeflate_copyrightkrb5_parse_name.XAKk4Dp1HKWN1Um.str_listcvs_opterrgeteuidfsortcmp.XAKk4Dp3HKWNlDn.cvs_gssapi_wrappinglock_tree_for_writeinitgroups.XAKk4Dp1HKWNVPm.log_datasortlistinflateInit2_.XAKk4DpzHKWNlcl.stored_modesdiff_left_onlyinflate_blocks_freeget_crc_table.XAKk4DpyHKWN1Zk.static_ltreeconfig_stringgetuid.XAKk4Dp0HKWN1ql.unedit_usagegss_display_name.XAKk4DpyHKWNVmk.diff3_abort_bufwrap_addgroup_formatpcloseopen_modulegss_release_name.XAKk4Dp3HKWNlRn.join_rev1.XAKk4Dp3HKWNlRn.join_rev2inflate_trees_bitsgetpid.XAKk4Dp1HKWNVMm.locked_listrun_add_arg_pspecial_file_mismatchincrement_revnum.XAKk4Dp3HKWNlRn.ignlist.XAKk4Dp1HKWNVam.modules_contentsRCS_lock.XAKk4Dp2HKWNlqm.rcsbuf_inuse.XBKk4Dp1HKWN1Um.do_editor.reuse_log_messagecvs_MD5Transform.XAKk4Dp2HKWNFom.patch_shortselect.XAKk4Dp3HKWN1On.force_tag_move.XAKk4Dp0HKWNFEm.workingntohsbuf_chain_lengthClassify_File.XAKk4DpzHKWNFgl.write_dirtag.XAKk4DpyHKWN1Zk.static_d_desc.XAKk4Dp1HKWNVam.notify_contents_finimode_to_string.XAKk4Dp0HKWN1Am.listcache.XAKk4Dp1HKWN1Um.logfpswitch_stringdirs_sent_to_serversetsockoptnanosleepchange_lettermake_directory.XAKk4Dp2HKWNFum.call_diff_argv.XAKk4Dp2HKWNV_m.run_argc.XAKk4Dp0HKWNFEm.extract_allyynerrssyslog.XAKk4DpzHKWNVXl.history_name.XAKk4Dp2HKWNF2m.remove_usagercs_change_textinflate_trees_fixed.XBKk4Dp3HKWNlDn.server_clear_entstat.clear_static_supportedyysindexcurrent_parsed_root.XAKk4Dp2HKWNFum.call_diff_argcprint_message_queue__flsbufgss_unwrap.XAKk4Dp2HKWNFom.unidiff.XAKk4Dp2HKWNV_m.run_argvcvsumaskexpand_string.XAKk4Dp3HKWNlDn.last_node.XAKk4Dp0HKWNFEm.user_count.XAKk4Dp1HKWNVMm.lock_error_repos.XAKk4Dp1HKWNVam.editinfo_contentssend_optionsunshift_stringgetlist.XBKk4DpxHKWN11j.Convert.DaysInMonth_lib_version.XAKk4Dp3HKWNlRn.aflagcvs_temp_namebuf_send_special_countRCS_cmp_fileread_cvsrcconcatfile_has_markers.XAKk4DpxHKWNFLk.SIG_defaults.XAKk4DpzHKWNVXl.export_usage.XAKk4DpxHKWN11j.yyRelSeconds.XAKk4Dp0HKWNFEm.repos_sort.XAKk4Dp2HKWNV_m.run_argc_allocatedgss_release_buffer.XAKk4Dp3HKWNlRn.toss_local_changes.XAKk4DpzHKWN1Ol.annotate_usageinflate_flushgetgroupsget_server_responsesre_set_syntaxread_and_gzip.XAKk4Dp1HKWNlJm.vbranchcvs_temp_file.XAKk4Dp3HKWN1On.force_tag_match.XAKk4Dp2HKWNlqm.check_revmydbm_closeexecvp.XAKk4Dp1HKWNFSm.cvs_passwordrcs_cleanuplock_dir_for_write.XAKk4DpzHKWN1Ol.is_rannotategetopt_long_onlypacketizing_buffer_initialize_start.XAKk4Dp2HKWNlqm.keywords.XAKk4Dp3HKWN1On.rtag_usagebuffer_lcmstrpbrk.XAKk4Dp0HKWNFEm.user_list.XAKk4Dp3HKWNlDn.orig_server_temp_dir.XAKk4DpyHKWNVdk.cpdext.XAKk4Dp2HKWNlqm.rcsbuf_buffer.XAKk4DpxHKWN11j.UnitsTable_length_code.XAKk4DpzHKWNFgl.mulistCreate_Root.XAKk4Dp0HKWN1ql.setting_defaultputenvign_inhibit_server.XBKk4Dp3HKWNFMn.getcaller.cacheinflate_codes_new.XAKk4Dp3HKWN1On.check_uptodatestrerror.XAKk4DpzHKWNlcl.stored_checksum_validbuf_copy_linesxreallocre_compile_fastmapabortgettimeofdaymake_file_labelinflateResetsdiff_skip_common_linesRCS_getbranchRCS_deltasSIG_inCrSectcat_module.XAKk4DpzHKWNVXl.tag_validatedserver_clear_entstat.XAKk4DpzHKWNFgl.aflagRCS_getversionfdopen.XAKk4Dp1HKWNlJm.import_usage.XAKk4Dp0HKWN1Am.client_compperrorwatch_modify_watcherslocal_cvsroot.XAKk4Dp2HKWNFum.call_diff_stdout_callbacksclose_on_execparse_config.XAKk4Dp1HKWNVMm.lockers_namenoexecre_compile_patternset_nonblockkrb5_free_context.XAKk4Dp2HKWNlqm.rcsbuf_buffer_sizeSubdir_Registerfinish_outputName_RepositoryRCS_parsercsfilecvsremove.XAKk4Dp0HKWN1Am.nodecache.XAKk4DpzHKWNlcl.modules_allocatedignore_regexp_list_tr_tally.XAKk4Dp3HKWN1On.numtaginet_ntoapr_forward_ed_scriptgss_init_sec_contextignore_all_space_flagRCS_getexpandiswritableopendir__longdouble_used.XAKk4DpyHKWNluk.equivs_allocvallocatexit.XAKk4Dp2HKWNFum.call_diff_file_callbacksbuf_lengthunlink_file_dirrun_setupinflateEnd.XAKk4DpyHKWNFFl.next0.XAKk4Dp3HKWN1On.numtag_validated.XAKk4DpyHKWNFFl.next1.XAKk4Dp2HKWNF2m.removed_filesSIG_endCrSect.XAKk4DpzHKWN1Ol.tag_validated.XAKk4DpzHKWNFgl.saved_messagesafe_locationprevious_rev.XAKk4Dp1HKWNVMm.readlock.XAKk4Dp3HKWNlRn.dotemplateserver_copy_fileyydgotoroot_allow_freeshell_escape.XBKk4Dp1HKWNlXm.main.long_optionsxmallocRCS_branch_headlongjmpNo_Difference.XAKk4Dp1HKWNlJm.comtable.XAKk4DpxHKWN11j.yyDSTmode.XBKk4Dp0HKWN1ql.notify_do.blank.XAKk4DpxHKWNF7j.last_nonoptRCS_addaccessstrchrign_dir_addserver_set_entstat.XAKk4Dp2HKWNlqm.spacetab.XAKk4Dp0HKWNFEm.v_checkoutexpand_path.XAKk4Dp3HKWNlRn.patches.XAKk4DpzHKWNVXl.date.XAKk4Dp0HKWNFol.have_rev2_label.XBKk4Dp2HKWNlqm.month_printname.months.XAKk4Dp2HKWN1wm.dirlist.XAKk4DpxHKWNlWk.crc_tableprint_script.XAKk4Dp1HKWN1Gm.dir_ign_max.XAKk4DpyHKWNVck.border.XAKk4Dp1HKWNVMm.lock_tree_listpatchcrc32.XAKk4Dp1HKWNlXm.cmd_usage.XBKk4DpyHKWNVmk.make_3way_diff.zero_diff3.XAKk4Dp3HKWNlDn.dont_delete_tempsend_argShort_Repository.XAKk4Dp3HKWNlRn.force_tag_matchnormalize_cvsroot.XAKk4Dp0HKWNFol.use_rev1ignore_space_change_flag.XAKk4Dp0HKWNFol.use_rev2excluded_filename.XAKk4DpzHKWN1Ol.force_tag_match.XAKk4Dp2HKWN1wm.update_dir.XAKk4Dp1HKWNlJm.vheadfopencreatbuf_append_bufferRCS_nodeisbranchsdiff_help_sdiffgetegidcvs_getoptwrap_killcheck_numericgetopt_longstdio_buffer_initializewrap_unparse_rcs_optionsdeflatebuf_emptylocaltimeRCS_exec_rcsdiff.XAKk4DpzHKWNlcl.module_argvpfatal_with_name.XAKk4DpzHKWNlRl.free_buffer_data.XAKk4Dp3HKWNlDn.flowcontrol_pipesupported_requestmydbm_fetch.XAKk4Dp0HKWNFEm.file_sort.XAKk4Dp3HKWN1On.delete_flagRCS_getdateign_default.XAKk4Dp1HKWN1Um.coldiff_runbase_getserver_registercvsloggetgidfperrmsgRCS_exist_revfileattr_getbuf_append_char.XAKk4Dp1HKWNVam.taginfo_contents.XAKk4Dp1HKWNVMm.global_val_tags_lock.XAKk4DpzHKWNlcl.module_argcRCS_isbranchmessage5.XAKk4Dp1HKWNlJm.use_file_modtime.XAKk4Dp0HKWNFEm.backto.XAKk4DpzHKWNlcl.gcontext.XAKk4DpxHKWNFLk.SIG_crSectMask.XAKk4DpyHKWNljk.exclude_countlast_componentutime.XAKk4Dp2HKWNFum.call_diff_argc_allocated.XAKk4Dp1HKWNFdm.s_count.XAKk4Dp1HKWNFdm.Statusstart_recursion.XAKk4Dp3HKWN1On.dateadler32connect_to_pserversend_to_serverstrcmpreally_quiet.XAKk4Dp3HKWN1On.mtlist__1cG__CrunMdo_exit_code6F_v_set_blockserver_pause_checkset_nonblock_fd.XBKk4Dp2HKWNlqm.RCS_check_kflag.keyword_usage.XAKk4Dp2HKWNVzm.release_usage.XAKk4Dp3HKWNlDn.saved_outerr.XAKk4DpzHKWNFgl.logfileunidirectional_new_file_flag.XAKk4DpyHKWNl7k.msg_chainfind_change.XBKk4Dp2HKWNlqm.rcs_internal_lockfile.first_callyydebug.XAKk4Dp0HKWNFEm.last_since_tagcvsstatusignore_some_changesprint_number_range.XAKk4DpyHKWNVmk.flaggingprint_1_lineunlink.XAKk4Dp1HKWN1Um.messagegss_accept_sec_context.XAKk4DpzHKWNFgl.write_dirnonbranchFind_Names_etextlogoff.XAKk4DpzHKWN1Ol.tagdeflateParams.XAKk4DpyHKWNluk.equivsqsortre_syntax_options.XAKk4Dp3HKWNlDn.scratched_fileRCS_merge__assertEntries_Open.XAKk4Dp0HKWNFol.diff_usage.XAKk4DpyHKWNl7k.pr_piderror_use_protocolinflate_blocks_resettab_expand_flagexpand_wild.XAKk4DpyHKWNljk.option_helpyyerrflagsave_cwdRCS_deltag.XAKk4DpzHKWNlcl.stored_modtime.XAKk4Dp1HKWNVam.checkoutlist_contentsstrcpyRCS_whatbranchserver_use_rcs_diffserver_activesigactionfflushkrb5_init_contextfnmatchRCS_delaccess__fsr.XAKk4Dp1HKWNlXm.opt_usage_xstatoutfile.XAKk4Dp2HKWNl7m.root_allow_countentire_new_file_flagwaitpid.XAKk4DpxHKWN11j.yySeconds.XAKk4Dp3HKWNlDn.pending_erroroption_with_arglseekstrip_trailing_newlines.XAKk4DpyHKWNVmk.finalwrite.XAKk4DpxHKWN11j.yyDay.XAKk4Dp2HKWNlqm.cached_rcs.XAKk4Dp0HKWNFEm.extractfreercsnode.XAKk4Dp0HKWNFEm.mod_countchange_mode.XAKk4DpyHKWNVmk.horizon_lines.XAKk4Dp1HKWNVPm.is_rlogmkdir_if_needed.XAKk4DpxHKWNF7j.first_nonopt.XAKk4Dp0HKWNFEm.last_entrygcacvsencryptcvs_regfreegetline_safe.XAKk4Dp2HKWN1An.shiftsmmapParseTagclient_nonexpanded_setup_tr_initcvs_optoptsocketalways_text_flagfree_namesRCS_unlock__fpstart.XAKk4Dp3HKWN1On.tag_optsstrtouluse_editor.XAKk4DpzHKWNVXl.join_tags_validated.XAKk4DpzHKWNlcl.toplevel_reposwrap_restore_savedinflateSyncjoiningdiff3_runserver_cleanup.XAKk4Dp3HKWNlcn.wrap_list__ctype_maskfileattr_getalloutput_1_line.XAKk4DpzHKWNlcl.last_register_timeSubdir_Deregistersigemptysettcsetattrstrrchrmydbm_nextkey_tr_stored_blockfileattr_writevariable_list.XAKk4DpxHKWN11j.yysccsid.XAKk4DpzHKWNlcl.updated_fname.XAKk4Dp3HKWNlDn.command_fds_to_drain_PROCEDURE_LINKAGE_TABLE_filenodeflateInit2_dir_file_pathname.XAKk4Dp0HKWNFEm.since_revcvs_output_binarysprintf.XAKk4Dp1HKWN1Gm.ign_holdnumdots.XAKk4DpyHKWNluk.equivs_index.XAKk4Dp3HKWNlDn.argument_vectorprint_rcs_script.XAKk4Dp3HKWNlcn.wrap_tempcountfailed_patches_count.XAKk4DpxHKWN11j.yyMinutes.XBKk4Dp3HKWNlDn.serve_questionable.inittedre_set_registersstrcat_filename_onto_homedir.XAKk4DpzHKWNlcl.last_update_dirRCS_getlocks.XAKk4DpzHKWN1Ol.date.XAKk4DpyHKWNluk.bucketsserver_template.XAKk4Dp3HKWNlcn.wrap_countsigismemberget_responses_and_closemydbm_openyydefredsend_files.XAKk4Dp0HKWN1ql.editors_usageisfile.XBKk4Dp2HKWNVlm.parse_config.parsed.XAKk4DpxHKWNF7j.nextcharwrap_merge_is_copy.XAKk4Dp2HKWNF2m.existing_files.XAKk4DpxHKWN11j.yyHaveTimeSIG_deregisterpreserve_permsRCS_settagyycheckgss_acquire_cred.XAKk4Dp3HKWN1On.attic_toodeflateEnd.XBKk4DpzHKWNlcl.send_to_server.nbytesxcmp.XAKk4Dp2HKWNF2m.forceserver_set_stickydellist.XAKk4DpxHKWNlFk.re_error_msgidtop_level_admin.XAKk4DpzHKWNVXl.checkout_usageinflate_set_dictionary.XAKk4Dp0HKWNFol.user_file_revfindnode_fn_fxstatroot_allow_ok.XAKk4DpyHKWNluk.nbucketsbuf_output.XAKk4DpyHKWNVdk.fixed_bdgetnodegethostbynameserver_updatedign_add_file.XAKk4Dp1HKWNVam.rcsinfo_contentsgunzip_and_write.XAKk4DpyHKWNFpk.xvec.XAKk4DpyHKWNVmk.always_text.XAKk4Dp0HKWNFEm.history_usg.XAKk4DpzHKWNVXl.options.XAKk4DpzHKWNFgl.maxrev.XAKk4Dp0HKWNFEm.hrec_head.XAKk4DpyHKWNVdk.fixed_bltime_stamp.XAKk4DpzHKWNlcl.modules_vector.XAKk4Dp3HKWNlDn.protocol.XAKk4Dp2HKWNlqm.kflagstzset.XAKk4DpzHKWNFgl.sbranch.XAKk4Dp3HKWN1On.branch_modeRCS_parseclose_moduleisdeviceign_setup.XAKk4Dp0HKWNFEm.tz_name.XAKk4DpxHKWN11j.TimezoneTablerun_exec.XAKk4Dp3HKWN1On.tlist.XAKk4Dp3HKWNlRn.update_build_dirs.XAKk4Dp3HKWNlJn.long_formattracetm_to_internetsystem_auth.XAKk4Dp0HKWNltl.entfile.XAKk4DpyHKWNFxk.find_function_last_matchfindnodecvs_regcompCreate_Admin.XAKk4DpyHKWNljk.exclude.XAKk4Dp0HKWNF2l.unrecog_headkrb5_kuserok.XAKk4Dp1HKWNVMm.writelockisaccessibleRCS_fully_parseRCS_setexpand_dist_coderun_printserver_pathname_checkget_homedirwrap_kill_tempsend_file_namestranslate_range.XAKk4DpzHKWNFgl.force_ci.XAKk4Dp2HKWNFom.tmpfile1isabsolute.XAKk4Dp2HKWNFom.tmpfile2.XAKk4DpyHKWN1Zk.base_length.XAKk4DpxHKWNlFk.re_comp_buf.XAKk4Dp2HKWNFom.tmpfile3piped_child.XAKk4DpzHKWN1Ol.force_binaryRCS_getaccesstcgetattr.XAKk4DpzHKWNFgl.last_register_timeget_date.XAKk4Dp3HKWNlRn.nonbranchislink.XAKk4Dp2HKWNFom.options.XAKk4Dp1HKWNVMm.locklistmake_bufs_from_fds.XAKk4Dp2HKWNFom.force_tag_match.XAKk4Dp3HKWNlUn.version_usagecvs_gssapi_wrap_buffer_initializedeflateCopybegin_output.XAKk4Dp0HKWNFEm.user_sortre_match_2Parse_Infostrspnfailed_patchesupdate_delprocdeflateInit_krb5_free_principalbuf_copy_countedopen_file.XAKk4Dp1HKWN1Um.type.XAKk4Dp3HKWN1On.tag_usagelogout.XAKk4Dp1HKWNlJm.keyword_opt.XBKk4Dp3HKWNlDn.server_set_sticky.set_sticky_supportedxreadlink.XAKk4DpzHKWNVXl.m_type.XAKk4Dp1HKWNFdm.s_max.XAKk4Dp0HKWNltl.entfilenamere_search_2renameerrno_DYNAMICmake_message_rcslegal.XAKk4DpyHKWN1Zk.extra_dbitsmark_up_to_date.XAKk4DpyHKWNVdk.cplext.XAKk4Dp1HKWN1Gm.s_ign_countdo_editor.XAKk4Dp0HKWNFEm.hrec_max.XAKk4Dp3HKWNlcn.wrap_saved_tempcountignore_case_flagfunction_regexp_list.XAKk4DpzHKWNlcl.failure_exit.XAKk4Dp1HKWNVMm.global_readlock.XBKk4DpxHKWNVAk.cvs_getpass.buf.XAKk4DpyHKWNljk.recursiveline2argv.XAKk4DpyHKWN1Zk.static_bl_descdup2fread.XAKk4DpxHKWNFLk.SIG_crSectNestRCS_abandon.XAKk4Dp3HKWNlDn.buf_to_netmydbm_storeinflate.XAKk4Dp3HKWNlcn.wrap_saved_list.XAKk4DpzHKWNlcl.to_serversscanffind_reverse_changeno_diff_means_no_outputEntries_Close.XAKk4Dp0HKWN1ql.setting_tedit.XAKk4Dp0HKWNFEm.file_list.XAKk4Dp0HKWNFol.options.XAKk4Dp2HKWNFom.rev1_validatedstrstr.XAKk4Dp3HKWNlDn.tpd.XAKk4Dp0HKWNFEm.hrec_idxinflate_blocks_newCVS_Usernamereaddir.XAKk4Dp3HKWNlDn.max_dotdot_limit.XAKk4Dp2HKWNFom.date1cvs_notify_checkwrap_fromcvs_process_file.XAKk4Dp2HKWNFom.date2.XAKk4Dp2HKWNl7m.root_allow_sizeinflate_codes_free_tr_alignfileattr_startdirUpdate_Logfilehtonsserver_startedsetjmpbuf_output0.XAKk4Dp3HKWNlDn.argument_vector_size.XAKk4DpyHKWNVmk.longopts.XAKk4Dp0HKWNFEm.report_count.XAKk4Dp0HKWNFEm.since_date.XAKk4DpyHKWNluk.primesdeflateReset.XAKk4DpyHKWN1Zk.base_distdeflateSetDictionarywrap_add_entryRCS_reparsercsfiletag_check_valid.XAKk4Dp1HKWNVam.config_contents.XAKk4Dp0HKWNFEm.file_max.XAKk4Dp2HKWNlqm.rcs_lockfd.XAKk4Dp2HKWNFom.patch_usagemkdirwatchRCS_check_kflagRCS_datecmpgetpwnammemchrinflate_blocks__filbuf.XAKk4DpzHKWNlcl.last_reposGSS_C_NT_HOSTBASED_SERVICEcvs_optindemptydir_name.XAKk4Dp1HKWNFSm.login_usagediff_version_stringprintlistcvs_flushout.XAKk4DpxHKWN11j.MilitaryTable.XBKk4Dp0HKWNFEm.history_write.tildebuf_read_data.XAKk4Dp0HKWNF2l.attrs_modified.XBKk4Dp0HKWN14l.get_homedir.homedate_to_internet.XAKk4DpyHKWNFpk.too_expensive.XBKk4Dp3HKWNlcn.wrap_tocvs_process_file.bufwrap_free_entryfputsign_name.XAKk4DpyHKWNl7k.current_depth.XAKk4Dp0HKWNFEm.tag_report.XAKk4DpzHKWNFgl.find_data_staticRCS_getrevtime.XAKk4DpzHKWNVXl.force_tag_match.XAKk4Dp3HKWNlDn.gcontextaddnode_at_front.XAKk4DpyHKWNl7k.current_name0.XAKk4Dp3HKWNlDn.argument_count.XAKk4DpyHKWNl7k.current_name1expand_at_signs.XAKk4Dp0HKWNFEm.modifiedclient_import_donetranslate_line_numberanalyze_hunk.XAKk4DpyHKWNVmk.show_2nd.XAKk4DpzHKWNFgl.saved_ulistlibnsl.so.1SUNW_0.7SUNWprivate_1.1libsocket.so.1libc.so.1SUNW_1.23SUNW_0.9SUNW_0.8SYSVABI_1.3libgssapi_krb5.so.2libkrb5.so.3libgen.so.1libk5crypto.so.3libcrypto.so.0.9.8libcom_err.so.3/usr/local/lib:/lib:/usr/lib0(= qN  (= &y0(= :(= C(= qN 7 L                                                                                                                   /: gx !"#$%&'(*+,-./01\234It pb> F& !5678.9:;=<?@ABCDEFHIJKLMNOrQPR SUVWXYZ[\]^`abcdefghiOjklmonpqrstuvxyz{}~w#b|v& & E! t: {=h      ke$Y ]`s}R !"#$' J &'()*+,-./12345678n 9:VKz:A;Y=>?@ABCDX Bx( .SEF". *HIJKLMNOPRSQTVWXYZ[\]_`abcdefg ah `ijk mnopqrstuKxvwy|z~}{U | *ce L\ + = o  b\     qQ%eQ  !"#$%&')*+,-./0 ^23456789;=<:?@ABCDEFGjI~ FMVWRJNKTYPLUZS[MHO\]^U,va2Nc_ ` /UwdefFgbhijk$r.nj 9 stxuvwxyzOQX{|}~mnop)lqwO " khu<[  ]F      1C[ !"#$%&'()*+,-./0123453S6789:;<=w% >?@A BC! 7EFGHIJKLMpNO^P RSTUVWXY [Z\^_`abcde=G(G iI TW8 , f ghijklmnoqpwuvxrystz{|} +Cu>;PZ 5 I s} o5i  v    2Qj"!$ #&'()?*s+,./01 24567;89:;<>=@ABC V  f; W {  EFGHIJMNOPSTURQWXYZ[\]^_ ab`e[efg3-klnorustpqvHJ3 2 wxz{yanZ-_~P8" | z  cm p$LR tl(b NBl QA  <4%GW <,?01 0y4/1* }lj m+v y 9 .: 9 { ; Z77 +z q$ r   l )< ]P, 8E (|`ns1 M ij hg  ] '   8d \~N]f c 4- *# hkuxS 9?  ~&z   3E dHaN K S+ GRp0 *T E=/C | mH T; 69fy7XY\ o=Z e-2 _%D X w  Vx L [ N4d a > r[!0lz <_R) D`dJ$@k @P D5i% u  " ~!` A2CqtE  wH  >H(gKM { & aZICb#T0^G O T 6   yu )o A@65q gh ?'nKMYO,)QX g ^@ B / 0+LhZdXZ T%(Z&&&&&&&&]&&&I&'''q ''''' '$'(' ,'l0'-4'r8'<'@'MD'H'L'P'T'X'\'`'d'h'l'p'7t'Lx'|' '='''''f'?'2' ''''' '-'''''''6''|''>' 'b'''';((( ((@(((  ($(((,(0(4(8(v<(@(D(H(hL(P(mT(X(Q\(`(d(h(:l(`p(t(.x(+|(((((()(((j(1((v(((>((=( (((((A()((U((G(n((-(9())d) ))))D)r )$)M()h,)!0)4)=8)"<)@)D)H)L)P)T)ZX)\)`)Id)h)l)p)45&%&%&h%&h%&h%&h%&h %&h(%&h0%&h8p%&h@`%&hHP%&hP@%&hX0%'h` %'hh%'hp% 'hx%'h%'h%'h%'h% 'h%$'h%('h%,'hp%0'h`%4'hP%8'h@%<'h0%@'h %D'h%H'h%L'h%P'h%T'h%X'h%\'h%`'h %d'h(%h'h0%l'h8p%p'h@`%t'hHP%x'hP@%|'hX0%'h` %'hh%'hp%'hx%'h%'h%'h%'h%'h%'h%'h%'hp%'h`%'hP%'h@%'h0%'h %'h%'h%'h%'h%'h%'h%'h%'h %'h(%'h0%'h8p%'h@`%'hHP%'hP@%'hX0%(h` %(hh%(hp% (hx%(h%(h%(h%(h% (h%$(h%((h%,(hp%0(h`%4(hP%8(h@%<(h0%@(h %D(h%H(h%L(h%P(h%T(h%X(h%\(h%`(h %d(h(%h(h0%l(h8p%p(h@`%t(hHP%x(hP@%|(hX0%(h` %(hh%(hp%(hx%(h%(h%(h%(h%(h%(h%(h%(hp%(h`%(hP%(h@%(h0%(h %(h%(h%(h%(h%(h%(h%(h%(h %(h(%(h0%(h8p%(h@`%(hHP%(hP@%(hX0%)h` %)hh%)hp% )hx%)h%)h%)h%)h% )h%$)h%()h%,)hp%0)h`%4)hP%8)h@%<)h0%@)h %D)h%H)h%L)h%P)h%T)h%X)h%\)h%`)h %d)h(%h)h0%l)h8p%p)h@`jjRt)t{hhyq,+t0+t PSE +u T +RU (+RP4PjURQt`|$у8+ D$td$у`tƒ 3fd$f T$tfd$f L$l$YZ]ÐU EE EE;Er EEEEEEÐUE PEPЋEPREEÐUE PEP}ЋEPRnЋEPR_EEÐUE;E r EEE EEEEÐUE PEPj EEUE PEPj EEUE PEPj EEUjjEPE PEPjsEEÐUp]EEEEEEtEujhyx'p@;hثE PEPs EElEtjEPj;P-EaEtjEPj;P1E5jhy&#Ek}?tݐk{mthثE PEPs EENE+;E;E E Ejhya&@/j@PEEE;EVEUE jP8UE hPtCUE hPt'UE jPqhPu3.uUE jjPhjjEDUE EE@t+E@/u EE@EE@uՋEătKEEEUH;}%UE ]M DE@EEUH;|ۋEHEEHEE@EE@EE;E@/@ Eu9EtjEPbEtjEPLEE.OEtjEPjEPEPhjhẼt3jjEh EPht jEPEE;EUċE jPjEP.tUċE jPEjEP9EE;Eu $EAUBEEjEPD}jjEPh(dXPj¿EPjE@/EPBPEP upEE@/uaEEjh@@P uEEȋUD/u5EEhH PujjEPhTjj"EPEPEP jEP@jEP0jDPEjjEPEPhhEPAMċU jjjjEPEPEPEPPEPP(ẼtEPEPhpV jEPX.tjEP/EtjEPjEtjEPTjEPFE;EuUċE PjjH EPEPj1 jEPjEPE@EċE;E?jjjjE PEPZjE PEP jht)EtjEP+U‰En EE;E EEċEEjjEP jEP+tżUE jP贕EUE jP蝕EjEPEE;Eu|EEEHUBEEEEjEP}jjEPh(dXPjhjhI=EEPj蔽E@/EPBPEP upEE@/uaEEjh@@Pl uEEȋUD/u5EEhH P ujjEPhTjj費jjE܋EEE܉EjjjjEPEPE؋E؋@E؋@E؋@ u(jjEPhjj:E@E[jEP=tjEPJD.jEP3jEP#jD P贑EjjEPEPhhEP4jEPtCjjEPhjj舺jjEPhԬjjohjj^ jEPE؋@tE؋@@uEjEPhCt2E؋@tEj@P7jEPDЋE؉PE؋@$t+Ejj@PhjjʹE@EU؋E؋@PEPEPBPEPEP t E@EE@E䡌.E؋@tLjEPBt pE xEE؋@PEPEPh@jjEjEPIBt pE xEjEPEPhjjӸU؋E؋@PB,PjEPtBjEPAu/jjEPhjjmhܭjj\ fE؋@$t)Ejj@Phjj0E@E3EE؋@ !U؋E؋@PB,PEEu9.ujjEPhjjɷjEP.ujEPEPh<jj获M؋U؋Ejjjjj@PBPEPEPA,P(EjEP>Et#jjEPhhjj-E@E*jEPUE.ujUEP:jEP.uQE؋@t(U؋E؋@PBPEPhjj贶!Ej@PEPhjj葶Et EE E؋@ EM؋U؋Ejjj@ PBPAPEPhEPEP(EtjEP\T0t*E؋@ ujjjjEPEP?IE@EE@E jjEPhjjֵE@E~E؋@@0uAE؋@@u2.ujjEPh jj膵E@E.E؋@@-E؋@ E؋@u'jjEPh<jj1E@EEj@PRjPEE؋@@PEPU؋EPBP}jEP]؋M؋U؋Ejjjjj@PBPAPEPC,P(EjEP|Et-Ejj@PhhjjhE@EEHjEPEjUEPx.uEj@PEPhtjj]؋M؋U؋Ejjj@ PBPAPEPCPEPEPz(EtjEPT0tjjjjEPEPF!jjEPhjj膳E@E1.uEj@PEPh̯jjSE@EjEPE;Eu?jEPHt,jEPU<ujEP2U‰E'T0tE;EtEPEPEPA= jEPjEP腢jEP"tZjEP?#jEPjEPE@EE;E$EtC.u9Eu  E ,EjEP4ZPhjjEtjEP/EtjEPEEE]ÐUP]E@ EE@EE@EEEj/EPCt'jjEPh8jjuEhEPu&jjhhpjj7EMEPEPEP jEPjj]EjEPtEjEP%}-Ejj@PhdXPj蠰ET0u:jht&Ejh@PhjjVjEPjEPqjDPEjjEPEPhhEPjEP$t8jEPu%Ej@PEPhjj辯E܃u EjEPPE̋E؃u EjEPPEjEPŰMjAPP!EEPhܰEP E܃t2hEPEPEPh,EPE؃t2h0EPEPEPh,EPujEPz.ugj.PTEhEPP}0jjEPhXdXPjNjEPjEPjEP迾EPjiEЃtjEP!EBEEE@EPjhhuЋEPjj聄EE@ jEPFЋEPEEUP EUPEUPEPEP<jjEPjEPEPRjEPTT0u,UjjjjEPEPEPEPBPh.?(E܃tjEPE؃tjEPjEPtgjEPLEPjEPڤ .ujEPljEPjEPEЃtjEPpEYjEPtܫjEPEtjEP+EtjEPEE]ÐU.t E>jE PjPP{EjhE PhhxEPhEP&EEt2EPEP;ujjEPhdXPj)jEPujjEPhdXPjjEPjE PjP证EE PhEP7 jjjjEPEPEPhE PEP.(jEPEEÐU EE EE;Er EEEEEEÐUE PEPЋEPREEÐUE PEP}ЋEPRnЋEPR_EEÐUE;E r EEE EEEEÐUE PEPjk EEUE PEPj[ EEUE PEPjK EEUjjEPE PEPj3EEÐUEu EjEPEEjPEhEPUUE BEu UBUEPBP$E@(u.E@(E@(jP7ЋEP$HEU@ ;B(|8E@(UEB(UE@(PB$PMЋEP$E EE@EEU@BEU@$M ÐULEjhy6 .$j,jEP1 ;EhE PEP[W EċEăEăktEăqtEhjj> hjj- Eȃth8jj ;ujhPEFj;PjP}EhPEPU;PEPcẼthTjj肦 j;PjP=}EhlEP;PEP};PjaEP a;PjAEP E;PjeEP );PjlEP ;PjuEP Eԃthpjj芥 &EEЃthpjj^