Yolinux.com Tutorial

RCS Intro - Revision Control System for Linux/UNIX

The RCS Revision Control System manages modifications to individual files. Files can be locked while checked out for change by a programmer to protect against poor coordination and comunications. Comparison with previous versions of the file and access to previous versions is also possible.

CM Tutorials:




Other YoLinux Tutorials:

°Software development tools

°Advanced VI

°Emacs and C/C++

°C++ Info, links

°MS/Visual C++ Practices

°C++ Memory corruption and leaks

°C++ String Class

°C++ STL vector, list

°Posix Threads

°Fork and Exec

°GDK Threads

°Clearcase Commands

°YoLinux Tutorials Index

Free Information Technology Magazines and Document Downloads
TradePub link image

Example use of RCS:

First step:

Pick a working directory and add a link to the RCS repository.
      cd working_directory
      mkdir RCS
      ln -s /home/Project/src/RCS RCS
This links your working directory to the RCS repository.


      co -l file.c
In this case, the latest version of the file "file.c" will be placed in your current working directory and "locked" from use by other programmers.

To checkout a particular (previous) version:

      co -r1.2 file.c

Check out for reading not updating and locking:

co -u file.c


To view file info:
      rlog -b file.c

Quit / Clean-up:

Cleanup, don't commit changes:

      rcsclean -u *.c 

Check-in / Commit:

When done editing the file, check-in (commit) your changes:

     ci file.c


      rcsdiff file.c 
This will compare the version of the file in your working directory with that of the original you checked out.

      rcsdiff -r1.2 file.c
Compare current working version with version 1.2.

The following will compare the two revisions of the file.

      rcsdiff -r 1.1 -r 1.2 file.c 

  • RCS Information - man pages on rcsintro, rcs, co, ci, ident, rcsclean, rcsdiff, rcsmerge, ident, rlog, merge.



        Bookmark and Share


    Copyright © 1999 by Greg Ippolito