You can do all of your source code maintenance from within emacs. It has integrated support for RCS. Actually, it supports RCS and a number of other version control systems. The emacs functions determine which system is in use and adapt to that.
There is a complete set of commands for version control located in the emacs
Control menu. If there is an RCS subdirectory in the directory where the
visited file exists the RCS
,v archive files will be placed there.
Otherwise, emacs will work with them in the current directory. To check in a
new file to RCS use the
Tools... Version Control... Register command.
The keyboard command sequence is
C-x v i. (Note: the keyboard
command prefix for all of the version control commands in emacs is
After registering the file, or if you are visiting a file that emacs has determined is under RCS control, the status line at the bottom of the visiting window will reflect the version control status of the file. For example, a java source file that was just registered had the following status line:
--:%% junk.java (Java RCS-1.1)--L1--All------------------------------
%% indicate the buffer is read-only. The
indicates that this file is under RCS control, not locked, and you are visiting revision
1.1 of the file. If you want to edit this file you will need to first check out the
file. Perform this operation using the
Tools... Version Control... Check
In/Out menu option. From the keyboard it is
C-x v v or
C-q. The status line will now reflect that the file has been checked out and
the buffer can be edited.
--:-- junk.java (Java RCS:1.1)--L1--All------------------------------
The removal of the
%% indicates that the buffer can be edited and the
shows that the file is locked. After making your changes to the file you can check
them back into RCS by again using
Tools... Version Control... Check In/Out.
When you do this a new emacs window opens in which you can enter the revision log
comments. Don't remember exactly what you changed in the file?
Version Control... Compare to Last Version will show you the differences between
the file being edited and the last version stored in the RCS archive file. You can
then enter the relevant comments for the revision log in the
When finished with the revision log exit that buffer using
The copy of the file being visited will be updated to the new version complete with
up-to-date Id and Log information.
This covers the main cycle that you use in working with files under RCS control.
There are several other RCS operations that can be performed from within emacs.
You can find these in the
Version Control submenu. Incorporating
the use of RCS directly with your editing process makes source code control second nature
and almost painless.