Short explanation of RCS
[ambient page updated 11 Oct 05]
...
[ home ]
...
[ garrett@umn.edu ]
To use RCS for version control of a file named "theFile":
(1) In the directory in which theFile lives, make a subdirectory
called RCS (The latter can be used for more than one file...)
(2) Do "rcs -i theFile". This can be done even before theFile
exists. (At this point the archive file RCS/theFile,v is created,
but it has none of the content of theFile in the case that theFile
already existed). Yes, the archive file has a comma in its name!!!
(3) To begin the archiving, do "ci theFile". ("ci" is "check
in"). This will remove theFile from the current directory, and put
its contents into the archiving file RCS/theFile,v.
(4) To simply _look_ at the current revision of theFile, but not edit
it, do "co theFile" ("co" is "check out"): this creates a
read-only copy of theFile. If you change the permissions and alter
this copy, such changes will NOT be reflected in the archived copy
(5) To _revise_ the archived copy, do "co -l theFile" (check-out with
lock). This creates a read-write copy of theFile. After it is
revised, do "ci theFile". This will update the archive, and remove
the read-write copy from the directory. If you do nothing else
than what's indicated here (e.g., don't have any _branching_...),
this will create an archive containing versions 1.1, 1.2, 1.3,
1.4, etc.
(6) To review the change logs for theFile, do "rlog theFile": this
writes to stdout the change logs from the archive. It tells times
and dates of modifications, etc.
(7) At any point, to clean up read-only copies of rcs-archived files
from the directory, do "rcsclean". This does NOT remove read-write
copies.
(8) To remove all read-write rcs files which are STILL IDENTICAL to
the archived copy, do "rcsclean -u". This will NOT remove any
read-write files which have been altered from the archived
version.
(9) To "check out" a version prior to the "current" one, for example
version 1.4 rather than a supposed current 1.7, do
"co -r1.4 theFile"
(10) If you _change_ a version prior to the "latest" one, the archive
will start a new "branch" of revisions. (Obviously want to try to
avoid this, but...)
######################################################################
Unless explicitly noted otherwise, everything here, work
by Paul Garrett, is licensed
under a Creative
Commons Attribution 3.0
Unported License.
...
[ garrett@umn.edu ]
The University of Minnesota explicitly requires that I
state that "The views and opinions expressed in this page are
strictly those of the page author. The contents of this page have not
been reviewed or approved by the University of Minnesota."