The Open Source Swiss Army Knife

/programmingToolBox/
/programmingToolBox/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /programmingToolBox 
Permalink: rcs.htm
Title: add
article options : please login   |  print view

rcs

  1. introduction
  2. ci: checking a file into the archive
  3. co: checking a file out of the archive
  4. rcs: various rcs level commands

introduction

rcs is a version management system, smaller than cvs but providing the same functionality.

the two most common commands needed to get started are 'ci' for 'check-in' and 'co' for 'check-out'

It's also best to mkdir RCS and then issue rcs -i name_of_work_file (from the RCS-MINIHOWTO). Note that the rcs machinery will automatically pull and put your files in the RCS directory.

versioning: use the command 'rlog work_file_name' to see the revisions of a file present in the RCS directory.

ci

Use ci to check a file back into the archive.

A lock held by somebody else can be broken with the rcs command.

using the ci command without creating a RCS directory first leads to the following:

[joe@www 6]$ ls
class.h  itse2331_pa6.html  Stu62331.txt
[joe@www 6]$ ci class.h
class.h,v  <--  class.h
enter description, terminated with single '.' or end of file:
NOTE: This is NOT the log message!
>> first version
>> .
initial revision: 1.1
done
[joe@www 6]$ ls
class.h,v  itse2331_pa6.html  Stu62331.txt

if a RCS directory is created the file will go in that directory on submission (with no flags).

co

without special arguments will only deliver a read-only copy: locking a revision prevents overlapping updates

[joe@www 6]$ co class.h
class.h,v  -->  class.h
revision 1.1
done
[joe@www 6]$ vi class.h
[joe@www 6]$ ls
class.h  class.h,v  itse2331_pa6.html  Stu62331.txt

however, unlike the above, you will need to prepend the -l flag to make your changes savable in the RCS machinery.

co -r 1 dastring.cpp
retrieves revision 1 (this file was only 1,1 and 1,2
will not be submittable unless co with -l option
co -l dastring.cpp
will check it out locked (means writable)
executing two co will create problem with multiple locks, and adding your revisions back to only one ofyour edis willb e hard. Will need to check in specifying the revision number. ci -r will say you have to specify the revision. I checked out versions 1.1 and 1.4. but doing ci -r1.4 filename only creates
co -l -r1.2 dastring.cpp
will verifiably check out revision 1.2 of dastring.cpp

rcs

The 'rcs' command itself is unnecessary can only need use ci and co. Just run 'man rcs' and get a description of its command-line stuff not itself as a program name.

rcs -i
creates an rcs file (the file with ,v appended)
rcs -L name_of_work_file
locks the multiple users into respecting others' checkouts
compare to rcs -U name_of_work_file
-kv
will fubar your rcs file. correct this mistake with -kkv

Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top