User Tools

Site Tools


rcs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rcs [2024/09/16 06:48] – an’ hc9rcs [2025/03/05 15:16] (current) – [Basic RCS usage:] zilog
Line 1: Line 1:
-====== RCS Revision Control System ======+===== RCS — A System for Version Control =====
  
-RCS is installed on SDF and is used for version control for the HTML tutorial system. Documentation (besides what's available through ‘man’) can be found here: https://www.gnu.org/software/rcs/manual/rcs.html+==== Intro and Background: ==== 
 +RCS was first released in 1982 by Walter Tichy at Purdue University making it one of the earliest version control systems (VCS) used for software development. Unlike modern VCS which are designed for distributed, concurrent development, RCS uses a centralized code repository where files are singularly checked in/out. Although largely supplanted RCS is still useful for small personal projects and is still natively included in the NetBSD operating system which SDF largely runs onRCS is still actively maintained as a GNU Project at https://www.gnu.org/software/rcs/ .
  
 +==== Why use RCS today? ====
 +Although largely supplanted by distributed systems like Git and Mercurial, RCS is still surprisingly useful for small personal projects as well as local scripts and configuration files.  In many ways RCS is easier to use with only a handful of commands to memorize, each with a short list of options that lend themselves to aliasing or script incorporation.
 +
 +==== Basic RCS usage: ====
 +There are several commands that come with RCS but the following are likely most useful:
 +
 +    * ''**ci(1)** - RCS file check-in''
 +    * ''**co(1)** - RCS file check-out''
 +    * ''**rlog(1)** - RCS change log''
 +    * ''**rcsdiff(1)** - RCS diff(1) generator''
 +
 +The ''**rcs(1)**'' command is also useful, sort of a multi-tool that duplicates some of the functionality of the above commands as well as extending them, i.e. deleting a range of revisions, editing informational text in the log, changing default locking modes, etc.
 +
 +=== RCS Setup ===
 +Not much preparation is needed to get started managing file revisions with RCS.  While not mandatory it is highly recommended that a ''RCS'' sub-directory be created in each working directory where, if present, RCS will store the ""//deltas//"" -- special files of the form ''fubar,v'' -- that store the differences (deltas) between revisions of a file under RCS management. If the ''RCS'' sub-directory is not present RCS simply stores those delta files in the working directory.
 +
 +=== Quick Start ===
 +The ''rcsintro(1)'' manpage covers much of the basics of RCS; below is a quick tour:
 +
 +    * create a working directory & RCS sub-dir:   ''$ mkdir -p ~/rcs_fun/RCS''
 +    * change to working dir & create a file:   ''$ cd ~/rcs_fun ; echo 'RCS is awesome!' > fubar''
 +    * make initial commit of test file:   ''$ ci -u fubar ''
 +    * check file back out & edit again:   ''$ co -l fubar && echo 'this file is fubar' >> fubar''
 +    * view diffs (working file vs last checked ver.):    ''$ rcsdiff fubar''
 +    * commit new revision of file:   ''$ ci -u fubar''
 +    * view log of changes:    ''$ rlog fubar''
 +
 +Specific revisions can be acted upon by passing them to the various commands in the form ''-r<start>[ -r<end>]'' ; by default RCS compares the working copy to the last checked in version.
 +
 +=== RCS by Example ===
 +While comprehensive coverage of all RCS can do is beyond the scope of this introductory tutorial, the basics can be grasped fairly easily and are perhaps best conveyed via an annotated [[RCS Sample Session]].
 +
 +==== RCS Quirks ====
 +    * no space allowed between options and arguments, i.e. use ''$ co -r1.3'' //not// ''$ co -r 1.3''
 +    * delta files (''fubar,v'') end up in the working directory if no ''../RCS'' directory is present
 +    * lock files when you check them //out//, unlock them when you check them //in//
 +    * don't use **-r** by itself with the ''ci(1)'' command -- it's a //reset// option
 +    
 +==== Documentation: ====
 +Aside from the ''man(1)'' and ''info(1)'' pages, Tichy's original 1985 paper((https://www.gnu.org/software/rcs/tichy-paper.pdf)) still provides an good introduction to using RCS.  For more in-depth coverage the following may prove helpful:
 +
 +    * //GNU RCS Manual// : https://www.gnu.org/software/rcs/manual/rcs.html
 +    * //RCS Handbook// by Brian O’Donovan (c) 1992, (unpublished) : https://www.compuphase.com/software/RCS_Handbook.pdf
 +    * //Applying RCS and SCCS// by Bolinger & Bronsoni, (c) 1995 O'Reilly Media : https://www.biblio.com/9781565921177 
 +
 +==== Misc: ====
 +How about a graphical RCS browser((https://www.compuphase.com/software_rcsbrowser.htm)) for Windows and Linux?
rcs.1726469324.txt.gz · Last modified: 2024/09/16 06:48 by hc9