RCS stands for Revision Control System. Do a "man rcsintro" for the verbose description. Basically allows you to lock files so only one person edits them at a time. RCS is also a good way of checkpointing your own work. RCS effectively keeps a copy of every version you've ever checked in, so you can go back to older versions of your files. I use RCS even when I'm the only ones who will touch the files.
mkdir RCSIf you are sharing files with other members of your group, make sure that the RCS directory is group writeable. Next, invoke the check-in command
ci f.cThis command creates an RCS file in the RCS directory, stores f.c into it as revision 1.1, and deletes f.c. It also asks you for a description. The description should be a synopsis of the contents of the file. All later check-in commands will ask you for a log entry, which should summarize the changes that you made.
Files in the RCS directory are called RCS files; the others are called working files. To get back the working file f.c in the previous example, use the check-out command
co f.cThis command extracts the latest revision from the RCS file and writes it into f.c. If you want to edit f.c, you must lock it as you check it out with the command
co -l f.cYou can now edit f.c.
After you are done making revisions, you can check the file back in by invoking
ci -u f.cThis checks the file in by incrementing the revision number properly and leaves a read-only copy of the file in the currently directory.
rcs -nworks: RCS/*This tells RCS to associate a symbolic name, i.e., works, with all the current version of all the RCS files in the current directory. Why is this convenient? Well, let's say the you and your partner have just gotten the non-preemptive minithreads package working. Being cautious, you use this naming facility to mark all the current versions of your source files with a label, let's say np_working. Now in the process of writing the preemptive version, your partner checks in broken code. You can conveniently get the working version back by typing:
co -rworks RCS/*You can view the symbolic names associated with an RCS file along with other information by typing:
rlog f.cThis give you name associations and a list of all the revisions and the descriptions logged with each one for f.c.
To use RCS with Emacs, you should have a RCS
directory,
just as before.
If you like, you can use the menu bar entries under "Tools:Version Control". Or, if you prefer keyboard commands, the only command you need to know is ctrl-x v v ("v" for "version").
You're now ready to share files safely!