summaryrefslogtreecommitdiffstats
path: root/upstream/archlinux/man1/rcs.1
blob: 27c0b09758a85ab7453871b5cfe3c220d8605f35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
.ds Rv 5.10.1
.ds Dt 2022-02-03
.ds i \&\s-1ISO\s0
.ds r \&\s-1RCS\s0
.ds u \&\s-1UTC\s0
.ds o \*r file
.if n .ds - \%--
.if t .ds - \(em
.if !\n(.g \{\
.	if !\w|\*(lq| \{\
.		ds lq ``
.		if \w'\(lq' .ds lq "\(lq
.	\}
.	if !\w|\*(rq| \{\
.		ds rq ''
.		if \w'\(rq' .ds rq "\(rq
.	\}
.\}
.TH RCS 1 "\*(Dt" "GNU RCS \*(Rv"
.SH NAME
rcs \- change \*o attributes
.SH SYNOPSIS
.B rcs
.IR "options file " .\|.\|.
.SH DESCRIPTION
.B rcs
creates new \*os or changes attributes of existing ones.
An \*o contains multiple revisions of text,
an access list, a change log,
descriptive text,
and some control attributes.
For
.B rcs
to work, the caller's login name must be on the access list,
except if the access list is empty, the caller is the owner of the file
or the superuser, or
the
.B \-i
option is present.
.PP
Filenames matching an \*r suffix denote \*os;
all others denote working files.
Names are paired as explained in
.BR ci (1).
Revision numbers use the syntax described in
.BR ci (1).
.SH OPTIONS
.TP
.B \-i
Create and initialize a new \*o, but do not deposit any revision.
If the \*o name has no directory component, try to place it
first into the subdirectory
.BR ./RCS ,
and then into the current directory.
If the \*o
already exists, print an error message.
.TP
.BI \-a "logins"
Append the login names appearing in the comma-separated list
.I logins
to the access list of the \*o.
.TP
.BI \-A "oldfile"
Append the access list of
.I oldfile
to the access list of the \*o.
.TP
.BR \-e [\f2logins\fP]
Erase the login names appearing in the comma-separated list
.I logins
from the access list of the \*o.
If
.I logins
is omitted, erase the entire access list.
.TP
.BR \-b [\f2rev\fP]
Set the default branch to
.IR rev .
If
.I rev
is omitted, the default
branch is reset to the (dynamically) highest branch on the trunk.
.TP
.BI \-c string
Set the comment leader to
.IR string .
An initial
.BR ci ,
or an
.B "rcs\ \-i"
without
.BR \-c ,
guesses the comment leader from the suffix of the working file name.
.RS
.PP
This option is obsolescent, since \*r normally uses the preceding
.B $\&Log$
line's prefix when inserting log lines during checkout (see
.BR co (1)).
However, older versions of \*r use the comment leader instead of the
.B $\&Log$
line's prefix, so
if you plan to access a file with both old and new versions of \*r,
make sure its comment leader matches its
.B $\&Log$
line prefix.
.RE
.TP
.BI \-k subst
Set the default keyword substitution to
.IR subst .
The effect of keyword substitution is described in
.BR co (1).
Giving an explicit
.B \-k
option to
.BR co ,
.BR rcsdiff ,
and
.B rcsmerge
overrides this default.
Beware
.BR "rcs\ \-kv",
because
.B \-kv
is incompatible with
.BR "co\ \-l".
Use
.B "rcs\ \-kkv"
to restore the normal default keyword substitution.
.TP
.BR \-l [\f2rev\fP]
Lock the revision with number
.IR rev .
If a branch is given, lock the latest revision on that branch.
If
.I rev
is omitted, lock the latest revision on the default branch.
Locking prevents overlapping changes.
If someone else already holds the lock, the lock is broken as with
.B "rcs\ \-u"
(see below).
.TP
.BR \-u [\f2rev\fP]
Unlock the revision with number
.IR rev .
If a branch is given, unlock the latest revision on that branch.
If
.I rev
is omitted, remove the latest lock held by the caller.
Normally, only the locker of a revision can unlock it.
Somebody else unlocking a revision breaks the lock.
If RCS was configured
.BR "\-\-with-mailer" ,
then this causes a mail message to be sent to the original locker.
The message contains a commentary solicited from the breaker.
The commentary is terminated by end-of-file or by a line containing
.BR \&. "\ by"
itself.
.TP
.B \-L
Set locking to
.IR strict .
Strict locking means that the owner
of an \*o is not exempt from locking for checkin.
This option should be used for files that are shared.
.TP
.B \-U
Set locking to non-strict.  Non-strict locking means that the owner of
a file need not lock a revision for checkin.
This option should
.I not
be used for files that are shared.
Whether default locking is strict is determined by your system administrator,
but it is normally strict.
.TP
\f3\-m\fP\f2rev\fP\f3:\fP[\f2msg\fP]
Replace revision
.IR rev 's
log message with
.IR msg .
If
.I msg
is omitted, it defaults to "*** empty log message ***".
.TP
.B \-M
Do not send mail when breaking somebody else's lock.
This option is not meant for casual use;
it is meant for programs that warn users by other means, and invoke
.B "rcs\ \-u"
only as a low-level lock-breaking operation.
.TP
\f3\-n\fP\f2name\fP[\f3:\fP[\f2rev\fP]]
Associate the symbolic name
.I name
with the branch or
revision
.IR rev .
Delete the symbolic name if both
.B :
and
.I rev
are omitted; otherwise, print an error message if
.I name
is already associated with
another number.
If
.I rev
is symbolic, it is expanded before association.
A
.I rev
consisting of a branch number followed by a
.B .\&
stands for the current latest revision in the branch.
A
.B :
with an empty
.I rev
stands for the current latest revision on the default branch,
normally the trunk.
For example,
.BI "rcs\ \-n" name ":\ RCS/*"
associates
.I name
with the current latest revision of all the named \*os;
this contrasts with
.BI "rcs\ \-n" name ":$\ RCS/*"
which associates
.I name
with the revision numbers extracted from keyword strings
in the corresponding working files.
.TP
\f3\-N\fP\f2name\fP[\f3:\fP[\f2rev\fP]]
Act like
.BR \-n ,
except override any previous assignment of
.IR name .
.TP
.BI \-o range
deletes (\*(lqoutdates\*(rq) the revisions given by
.IR range .
A range consisting of a single revision number means that revision.
A range consisting of a branch number means the latest revision on that
branch.
A range of the form
.IB rev1 : rev2
means
revisions
.I rev1
to
.I rev2
on the same branch,
.BI : rev
means from the beginning of the branch containing
.I rev
up to and including
.IR rev ,
and
.IB rev :
means
from revision
.I rev
to the end of the branch containing
.IR rev .
None of the outdated revisions can have branches or locks.
.TP
.B \-q
Run quietly; do not print diagnostics.
.TP
.B \-I
Run interactively, even if the standard input is not a terminal.
.TP
.B \-s\f2state\fP\f1[\fP:\f2rev\fP\f1]\fP
Set the state attribute of the revision
.I rev
to
.IR state .
If
.I rev
is a branch number, assume the latest revision on that branch.
If
.I rev
is omitted, assume the latest revision on the default branch.
Any identifier is acceptable for
.IR state .
A useful set of states
is
.B Exp
(for experimental),
.B Stab
(for stable), and
.B Rel
(for
released).
By default,
.BR ci (1)
sets the state of a revision to
.BR Exp .
.TP
.BR \-t [\f2file\fP]
Write descriptive text from the contents of the named
.I file
into the \*o, deleting the existing text.
The
.IR file
name cannot begin with
.BR \- .
If
.I file
is omitted, obtain the text from standard input,
terminated by end-of-file or by a line containing
.BR \&. "\ by"
itself.
Prompt for the text if interaction is possible; see
.BR \-I .
With
.BR \-i ,
descriptive text is obtained
even if
.B \-t
is not given.
.TP
.BI \-t\- string
Write descriptive text from the
.I string
into the \*o, deleting the existing text.
.TP
.B \-T
Preserve the modification time on the \*o
unless a revision is removed.
This option can suppress extensive recompilation caused by a
.BR make (1)
dependency of some copy of the working file on the \*o.
Use this option with care; it can suppress recompilation even when it is needed,
i.e. when a change to the \*o
would mean a change to keyword strings in the working file.
.TP
.BI \-V
Print \*r's version number.
.TP
.BI \-V n
Emulate \*r version
.IR n .
See
.BR co (1)
for details.
.TP
.BI \-x "suffixes"
Use
.I suffixes
to characterize \*os.
See
.BR ci (1)
for details.
.TP
.BI \-z zone
Use
.I zone
as the default time zone.
This option has no effect;
it is present for compatibility with other \*r commands.
.PP
At least one explicit option must be given,
to ensure compatibility with future planned extensions
to the
.B rcs
command.
.SH COMPATIBILITY
The
.BI \-b rev
option generates an \*o that cannot be parsed by \*r version 3 or earlier.
.PP
The
.BI \-k subst
options (except
.BR \-kkv )
generate an \*o that cannot be parsed by \*r version 4 or earlier.
.PP
Use
.BI "rcs \-V" n
to make an \*o acceptable to \*r version
.I n
by discarding information that would confuse version
.IR n .
.PP
\*r version 5.5 and earlier does not support the
.B \-x
option, and requires a
.B ,v
suffix on an \*o name.
.SH FILES
.B rcs
accesses files much as
.BR ci (1)
does,
except that it uses the effective user for all accesses,
it does not write the working file or its directory,
and it does not even read the working file unless a revision number of
.B $
is specified.
.SH ENVIRONMENT
.TP
.B \s-1RCSINIT\s0
Options prepended to the argument list, separated by spaces.
A backslash escapes spaces within an option.
The
.B \s-1RCSINIT\s0
options are prepended to the argument lists of most \*r commands.
Useful
.B \s-1RCSINIT\s0
options include
.BR \-q ,
.BR \-V ,
.BR \-x ,
and
.BR \-z .
.TP
.B \s-1RCS_MEM_LIMIT\s0
Normally, for speed, commands either memory map or copy into memory
the \*o if its size is less than the
.IR memory-limit ,
currently defaulting to ``unlimited''.
Otherwise (or if the initially-tried speedy ways fail),
the commands fall back to using
standard i/o routines.
You can adjust the memory limit by setting
.B \s-1RCS_MEM_LIMIT\s0
to a numeric value
.IR lim
(measured in kilobytes).
An empty value is silently ignored.
As a side effect, specifying
.B \s-1RCS_MEM_LIMIT\s0
inhibits fall-back to slower routines.
.TP
.B \s-1TMPDIR\s0
Name of the temporary directory.
If not set, the environment variables
.B \s-1TMP\s0
and
.B \s-1TEMP\s0
are inspected instead and the first value found is taken;
if none of them are set,
a host-dependent default is used, typically
.BR /tmp .
.SH DIAGNOSTICS
The \*o name and the revisions outdated are written to
the diagnostic output.
The exit status is zero if and only if all operations were successful.
.ds EY 1990, 1991, 1992, 1993, 1994, 1995
.SH IDENTIFICATION
Author: Walter F. Tichy.
.br
Manual Page Revision: \*(Rv; Release Date: \*(Dt.
.br
Copyright \(co 2010-2022 Thien-Thi Nguyen.
.br
Copyright \(co \*(EY Paul Eggert.
.br
Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
.br
.SH "SEE ALSO"
.BR co (1),
.BR ci (1),
.BR ident (1),
.BR rcsclean (1),
.BR rcsdiff (1),
.BR rcsmerge (1),
.BR rlog (1),
.BR rcsfile (5).
.PP
Walter F. Tichy,
\*r\*-A System for Version Control,
.I "Software\*-Practice & Experience"
.BR 15 ,
7 (July 1985), 637-654.
.PP
The full documentation for \*r is maintained as a Texinfo manual.
If the
.BR info (1)
and \*r programs are properly installed at your site, the command
.IP
.B info rcs
.PP
should give you access to the complete manual.
Additionally, the \*r homepage:
.IP
.B http://www.gnu.org/software/rcs/
.PP
has news and links to the latest release, development site, etc.
.SH BUGS
A catastrophe (e.g. a system crash) can cause \*r to leave behind
a semaphore file that causes later invocations of \*r to claim
that the \*o is in use.
To fix this, remove the semaphore file.
A semaphore file's name typically begins with
.B ,
or ends with
.BR _ .
.PP
The separator for revision ranges in the
.B \-o
option used to be
.B \-
instead of
.BR : ,
but this leads to confusion when symbolic names contain
.BR \- .
For backwards compatibility
.B "rcs \-o"
still supports the old
.B \-
separator, but it warns about this obsolete use.
.PP
Symbolic names need not refer to existing revisions or branches.
For example, the
.B \-o
option does not remove symbolic names for the outdated revisions; you must use
.B \-n
to remove the names.
.br