Why should one use RCS?
- Keep history of changes to program
so can revert to older versions and generate patches
- Arbitrate file usage between multiple users
Basic concepts
- RCS repository: either foo,v or RCS/foo,v
- Checking files in and out
- Locks
Basic commands
- ci
- checks in and removes existing copy
- ci -u
- checks in and releases lock (file
becomes read-only)
- ci -l
- checks in and retains lock (file is rw)
- co
- checks out with no lock (read-only)
- co -u
- checks out with no lock (read-only)
- co -l
- checks out and obtains exclusive lock
- rlog
- look at log
- rcsdiff
- compare revisions and create patches.
Example:
rcsdiff -r1.4 -u foo.c
- rcs -u
- break locks
- rcs
- do random things to rcs file
Lots of other options
- History trees
- Merging versions
- Symbolic version names
- For info, read man pages:
- rcsintro, rcsdiff, ci, co, rcs, rcsmerge
Logs and headers in files
- Put strings into files and RCS will expand them:
$