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