|
RCS: The Revision Control SystemWhat Is RCS?Using RCS
What Is RCS?RCS is the Revision Control System for managing multiple revisions of files. Muddcs staff keeps important system files under RCS for the following reasons:
Using RCSRCS works with two kinds of files. The first is the working file, or regular file. The second is an RCS file, which is a compilation of all the differences between various revisions of a file. The working file is the one you would view or edit. If your file is named FILE, the RCS file is named FILE,v (by default). The two most important RCS commands are ci, "check in", and co, "check out". ci puts a file under RCS and removes the working file, unless the -u flag (or certain others) is used. co gives you the working file back. Initial Check InInitial "check in" creates an RCS file. Here is a sample "check in" procedure for a file named FILE.
If nothing else in the directory has been checked in to RCS, you will
probably want to create a subdirectory named RCS, using
the mkdir command. If such a directory exists, the RCS
files will be located there, by default; otherwise, they are put in the
current directory (unless you tell RCS otherwise). In addition, if there
are others who will be editing the files, both the directory in which the
files are located and the RCS directory should have the setgid bit set
with the chmod g+s command, so that the files in the
directory get its group by default (rather than yours), which (especially
for the infosys pages) makes rcs happy.
KeywordsThese two useful keywords should be put in comments in a file for
identification purposes. If a file cannot be commented, DON'T put in
keywords. RCS automatically generates information
inserted after a keyword.
% ident FILE Here are typical results. $Header: /mnt/web/www/qref/RCS/rcs.html,v 1.12 2003/01/27 23:17:54 ben Exp $ $Log: rcs.html,v $ Revision 1.12 2003/01/27 23:17:54 ben fixed the reference to CVS. Revision 1.11 2001/05/23 16:37:13 ben fixed footer Revision 1.10 2001/05/18 00:38:24 timremoved unnecessary section (concerning what system files to RCS) and fixed another formatting problem. Revision 1.9 2001/05/18 00:36:04 tim fixed some formatting issues. Revision 1.8 2001/01/04 05:45:34 nick ssi change , Revision 1.7 2000/06/18 19:39:36 nhertl made it ssi style Revision 1.6 2000/06/05 21:34:46 aschoonm A few _more_ minor edits... Revision 1.5 2000/06/05 21:28:50 aschoonm A few more minor edits. Revision 1.4 2000/06/03 00:51:26 aschoonmAdded some info on making an RCS directory and setting the setgid bit so as to facilitate use by other people. Revision 1.3 2000/04/21 16:43:24 nhertl formating Revision 1.2 2000/04/18 19:57:21 dbeutel *** empty log message *** Revision 1.1 1999/11/15 23:35:48 tim Initial revisionTo see the log of a file named FILE, you must type: % rlog FILE or % rcs2log FILE There are many other keywords. For a full list, read the man page ident(1). MENU Editing Files Under RCSTo edit a file named FILE, follow these steps:
MENU Viewing Previous Versions of a FileRCS keeps track of all revisions of a file. You can view a previous version, say version 1.6, of a file (named FILE) by checking out the old version and redirecting it to standard output.% co -p -r1.6 FILE You can see the differences between revisions with the rcsdiff command. This example shows the differences between version 1.3 and 1.6. % rcsdiff -r1.3 -r1.6 MENU Mistakes To Avoid
More Information About RCSRCS man pages:
Copyright (c) HMC Computer Science Department.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with the no Invariant Sections, with no
Front-Cover Texts, and with no Back-Cover Texts.
A copy of the license is included in the section entitled ``GNU Free Documentation License.''
HMC Computer Science Department Contact Information |