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
|
.\" $OpenBSD: rcsintro.7,v 1.4 2005/12/01 09:18:54 xsa Exp $
.\"
.\" Copyright (c) 2005 Xavier Santolaria <xsa@openbsd.org>
.\" All rights reserved.
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.Dd October 19, 2005
.Dt RCSINTRO 7
.Os
.Sh NAME
.Nm rcsintro
.Nd introdution to Revision Control System
.Sh DESCRIPTION
Revision Control System (RCS) is a software tool which lets people
manage multiple revisions of text that is revised frequently, such as
source code or documentation.
.Sh USING RCS TO TRACK FILE CHANGES
One of the most common uses of
.Xr rcs 1
is to track changes to a document containing source code.
.Pp
As an example,
we'll look at a user wishing to track source changes to a file
.Ar foo.c .
.Pp
If the
.Ar RCS
directory does not exist yet, create it as follows and invoke the
check-in command:
.Bd -literal -offset indent
$ mkdir RCS
$ ci foo.c
.Ed
.Pp
This command creates an RCS file
.Ar foo.c,v
in the
.Ar RCS
directory, stores
.Ar foo.c
into it as revision 1.1, and deletes
.Ar foo.c .
.Xr ci 1
will prompt for a description of the file to be entered.
Whenever a newly created (or updated) file is checked-in,
.Xr ci 1
will prompt for a log message to be entered which should summarize
the changes made to the file.
That log message will be added to the RCS file along with the new revision.
.Pp
The
.Xr co 1
command can now be used to obtain a copy of the checked-in
.Ar foo.c,v
file:
.Pp
.Dl $ co foo.c
.Pp
This command check the file out in shared, or unlocked mode.
If a user wants to have exclusive access to the file to make changes to it,
it needs to be checked out in locked mode using the
.Fl l
option of the
.Xr co 1
command.
Only one concurrent locked checkout of a revision is permitted.
.Pp
Once changes have been made to the
.Pa foo.c
file, and before checking the file in, the
.Xr rcsdiff 1
command can be used to view changes between the working file
and the most recently checked-in revision:
.Pp
.Dl $ rcsdiff -u foo.c
.Pp
The
.Fl u
option produces a unified diff.
See
.Xr diff 1
for more information.
.Sh SEE ALSO
.Xr ci 1 ,
.Xr co 1 ,
.Xr cvs 1 ,
.Xr ident 1 ,
.Xr rcs 1 ,
.Xr rcsclean 1 ,
.Xr rcsdiff 1 ,
.Xr rcsmerge 1 ,
.Xr rlog 1
.Sh HISTORY
The OpenRCS project is a BSD-licensed rewrite of the original
Revision Control System written by Jean-Francois Brousseau, Joris Vink,
Niall O'Higgins, and Xavier Santolaria.
The original RCS code was written in large parts by Walter F. Tichy,
and Paul Eggert.
|