| 1 | .\" ci.1,v 1.2 1993/08/02 17:51:19 mycroft Exp -*- nroff -*- |
| 2 | .TH CI 1 6/29/83 "Purdue University" |
| 3 | .SH NAME |
| 4 | ci \- check in RCS revisions |
| 5 | .SH SYNOPSIS |
| 6 | .B ci |
| 7 | [ options ] |
| 8 | file ... |
| 9 | .SH DESCRIPTION |
| 10 | .I Ci |
| 11 | stores new revisions into RCS files. |
| 12 | Each file name ending in `,v' is taken to be an RCS file, all others |
| 13 | are assumed to be working files containing new revisions. |
| 14 | \fICi\fR deposits the contents of each working file |
| 15 | into the corresponding RCS file. |
| 16 | .PP |
| 17 | Pairs of RCS files and working files may be specified in 3 ways (see also the |
| 18 | example section of \fIco\fR (1)). |
| 19 | .PP |
| 20 | 1) Both the RCS file and the working file are given. The RCS file name is of |
| 21 | the form \fIpath1/workfile\fR,v |
| 22 | and the working file name is of the form |
| 23 | \fIpath2/workfile\fR, where |
| 24 | \fIpath1/\fR and |
| 25 | \fIpath2/\fR are (possibly different or empty) paths and |
| 26 | \fIworkfile\fR is a file name. |
| 27 | .PP |
| 28 | 2) Only the RCS file is given. |
| 29 | Then the working file is assumed to be in the current |
| 30 | directory and its name is derived from the name of the RCS file |
| 31 | by removing \fIpath1/\fR and the suffix `,v'. |
| 32 | .PP |
| 33 | 3) Only the working file is given. |
| 34 | Then the name of the RCS file is derived from the name of the working file |
| 35 | by removing \fIpath2/\fR |
| 36 | and appending the suffix `,v'. |
| 37 | .PP |
| 38 | If the RCS file is omitted or specified without a path, then \fIci\fR |
| 39 | looks for the RCS file first in the directory ./RCS and then in the current |
| 40 | directory. |
| 41 | .PP |
| 42 | For \fIci\fR to work, the caller's login must be on the access list, |
| 43 | except if the access list is empty or the caller is the superuser or the |
| 44 | owner of the file. |
| 45 | To append a new revision to an existing branch, the tip revision on |
| 46 | that branch must be locked by the caller. Otherwise, only a |
| 47 | new branch can be created. This restriction is not enforced |
| 48 | for the owner of the file, unless locking is set to \fIstrict\fR |
| 49 | (see \fIrcs\fR (1)). |
| 50 | A lock held by someone else may be broken with the \fIrcs\fR command. |
| 51 | .PP |
| 52 | Normally, \fIci\fR checks whether the revision to be deposited is different |
| 53 | from the preceding one. If it is not different, \fIci\fR |
| 54 | either aborts the deposit (if \fB-q\fR is given) or asks whether to abort |
| 55 | (if \fB-q\fR is omitted). A deposit can be forced with the \fB-f\fR option. |
| 56 | .PP |
| 57 | For each revision deposited, \fIci\fR prompts for a log message. |
| 58 | The log message should summarize the change and must be terminated with |
| 59 | a line containing a single `.' or a control-D. |
| 60 | If several files are checked in, \fIci\fR asks whether to reuse the |
| 61 | previous log message. |
| 62 | If the std. input is not a terminal, \fIci\fR suppresses the prompt |
| 63 | and uses the same log message for all files. |
| 64 | See also \fB-m\fR. |
| 65 | .PP |
| 66 | The number of the deposited revision can be given by any of the options |
| 67 | \fB-r\fR, \fB-f\fR, \fB-k\fR, \fB-l\fR, \fB-u\fR, or \fB-q\fR (see \fB-r\fR). |
| 68 | .PP |
| 69 | If the RCS file does not exist, \fIci\fR creates it and |
| 70 | deposits the contents of the working file as the initial revision |
| 71 | (default number: 1.1). |
| 72 | The access list is initialized to empty. |
| 73 | Instead of the log message, \fIci\fR requests descriptive text (see |
| 74 | \fB-t\fR below). |
| 75 | .TP 10 |
| 76 | .B \-r\fR[\fIrev\fR] |
| 77 | assigns the revision number \fIrev\fR |
| 78 | to the checked-in revision, releases the corresponding lock, and |
| 79 | deletes the working file. This is also the default. |
| 80 | |
| 81 | If \fIrev\fR is omitted, \fIci\fR derives the new revision number from |
| 82 | the caller's last lock. If the caller has locked the tip revision of a branch, |
| 83 | the new revision is appended to that branch. The new revision number is obtained |
| 84 | by incrementing the tip revision number. |
| 85 | If the caller locked a non-tip revision, a new branch is started at |
| 86 | that revision by incrementing the highest branch number at that revision. |
| 87 | The default initial branch and level numbers are 1. |
| 88 | If the caller holds no lock, but he is the owner of the file and locking |
| 89 | is not set to \fIstrict\fR, then the revision is appended to the trunk. |
| 90 | |
| 91 | If \fIrev\fR indicates a revision number, it must be higher than the latest |
| 92 | one on the branch to which \fIrev\fR belongs, or must start a new branch. |
| 93 | |
| 94 | If \fIrev\fR indicates a branch instead of a revision, |
| 95 | the new revision is appended to that branch. The level number is obtained |
| 96 | by incrementing the tip revision number of that branch. |
| 97 | If \fIrev\fR indicates a non-existing branch, |
| 98 | that branch is created with the initial revision numbered \fIrev.1\fR. |
| 99 | |
| 100 | Exception: On the trunk, revisions can be appended to the end, but |
| 101 | not inserted. |
| 102 | .TP 10 |
| 103 | .B \-f\fR[\fIrev\fR] |
| 104 | forces a deposit; the new revision is deposited even it is not different |
| 105 | from the preceding one. |
| 106 | .TP 10 |
| 107 | .B \-k\fR[\fIrev\fR] |
| 108 | searches the working file for keyword values to determine its revision number, |
| 109 | creation date, author, and state (see \fIco\fR (1)), and assigns these |
| 110 | values to the deposited revision, rather than computing them locally. |
| 111 | A revision number given by a command option overrides the number |
| 112 | in the working file. |
| 113 | This option is useful for software distribution. A revision that is sent to |
| 114 | several sites should be checked in with the \fB-k\fR option at these sites to |
| 115 | preserve its original number, date, author, and state. |
| 116 | .TP 10 |
| 117 | .B \-l\fR[\fIrev\fR] |
| 118 | works like \fB-r\fR, except it performs an additional \fIco -l\fR for the |
| 119 | deposited revision. Thus, the deposited revision is immediately |
| 120 | checked out again and locked. |
| 121 | This is useful for saving a revision although one wants to continue |
| 122 | editing it after the checkin. |
| 123 | .TP 10 |
| 124 | .B \-u\fR[\fIrev\fR] |
| 125 | works like \fB-l\fR, except that the deposited revision is not locked. |
| 126 | This is useful if one wants to process (e.g., compile) the revision |
| 127 | immediately after checkin. |
| 128 | .TP 10 |
| 129 | .B \-q\fR[\fIrev\fR] |
| 130 | quiet mode; diagnostic output is not printed. |
| 131 | A revision that is not different from the preceding one is not deposited, |
| 132 | unless \fB-f\fR is given. |
| 133 | .TP 10 |
| 134 | .BI \-m "msg" |
| 135 | uses the string \fImsg\fR as the log message for all revisions checked in. |
| 136 | .TP 10 |
| 137 | .BI \-n "name" |
| 138 | assigns the symbolic name \fIname\fR to the number of the checked-in revision. |
| 139 | \fICi\fR prints an error message if \fIname\fR is already assigned to another |
| 140 | number. |
| 141 | .TP 10 |
| 142 | .BI \-N "name" |
| 143 | same as \fB-n\fR, except that it overrides a previous assignment of \fIname\fR. |
| 144 | .TP |
| 145 | .BI \-s "state" |
| 146 | sets the state of the checked-in revision to the identifier \fIstate\fR. |
| 147 | The default is \fIExp\fR. |
| 148 | .TP |
| 149 | .B \-t\fR[\fItxtfile\fR] |
| 150 | writes descriptive text into the RCS file (deletes the existing text). |
| 151 | If \fItxtfile\fR is omitted, |
| 152 | \fIci\fR prompts the user for text supplied from the std. input, |
| 153 | terminated with a line containing a single `.' or control-D. |
| 154 | Otherwise, the descriptive text is copied from the file \fItxtfile\fR. |
| 155 | During initialization, descriptive text is requested |
| 156 | even if \fB-t\fR is not given. |
| 157 | The prompt is suppressed if std. input is not a terminal. |
| 158 | .SH DIAGNOSTICS |
| 159 | For each revision, |
| 160 | \fIci\fR prints the RCS file, the working file, and the number |
| 161 | of both the deposited and the preceding revision. |
| 162 | The exit status always refers to the last file checked in, |
| 163 | and is 0 if the operation was successful, 1 otherwise. |
| 164 | .SH "FILE MODES" |
| 165 | An RCS file created by \fIci\fR inherits the read and execute permissions |
| 166 | from the working file. If the RCS file exists already, \fIci\fR |
| 167 | preserves its read and execute permissions. |
| 168 | \fICi\fR always turns off all write permissions of RCS files. |
| 169 | .SH FILES |
| 170 | The caller of the command |
| 171 | must have read/write permission for the directories containing |
| 172 | the RCS file and the working file, and read permission for the RCS file itself. |
| 173 | A number of temporary files are created. |
| 174 | A semaphore file is created in the directory containing the RCS file. |
| 175 | \fICi\fR always creates a new RCS file and unlinks the old one. |
| 176 | This strategy makes links to RCS files useless. |
| 177 | .SH IDENTIFICATION |
| 178 | .de VL |
| 179 | \\$2 |
| 180 | .. |
| 181 | Author: Walter F. Tichy, |
| 182 | Purdue University, West Lafayette, IN, 47907. |
| 183 | .sp 0 |
| 184 | Revision Number: |
| 185 | .VL 1.2 |
| 186 | ; Release Date: |
| 187 | .VL 1993/08/02 17:51:19 |
| 188 | \&. |
| 189 | .sp 0 |
| 190 | Copyright \(co 1982 by Walter F. Tichy. |
| 191 | .SH SEE ALSO |
| 192 | co (1), ident(1), rcs (1), rcsdiff (1), rcsintro (1), rcsmerge (1), rlog (1), rcsfile (5), sccstorcs (8). |
| 193 | .sp 0 |
| 194 | Walter F. Tichy, "Design, Implementation, and Evaluation of a Revision Control |
| 195 | System," in \fIProceedings of the 6th International Conference on Software |
| 196 | Engineering\fR, IEEE, Tokyo, Sept. 1982. |
| 197 | .SH BUGS |
| 198 | |