lecture
in color
% mkdir RCSThis is a directory to hold revisions. This should be at the level of the file you are working on, say "foo".
% ci foo"Check in" the current contents of "foo" as a revision. You will be asked to comment on the revision. Revisions of "foo" are stored in the file "RCS/foo,v". foo IS DELETED by this command. Don't feel bad, just check it out as noted below.
% co foo"Check out" the most current copy of "foo" from "RCS/foo,v". This is a read-only version that you can compile but can't edit.
% co -l fooThis command `locks' the file so that only you can check it back in. You should edit it and then check it in so that others may edit it as well. To check it back in use the ci command.
% ci -l fooThis checks in the file and keeps it locked to you.
% rcs -u fooThis unlocks the file, sending mail to the offender who locked it.
% co -l fooThis checks the file out so you can edit it.
% rlog fooMake a listing of all revisions in "RCS/foo,v". This includes all comments given during updating.
% co -r2.3 foo "Check out" revision 2.3 of "foo" from "RCS/foo,v".Revision numbers are given in the output of rlog.
% rcs -l fooLock the CURRENT revision of foo.
% chmod u+w fooMake foo editable.
% ci fooMake the former revision the current one.
% rcsdiff -r1.2 foo | more
This is a test. This is another test. This is a third test. This is a fourth test.and file2 is
This is a test. This is another test. This is a dumb test. This is a fourth test. This is a fifth test.then
diff -c file1 file2produces
*** file1 Tue Feb 29 14:28:06 2000 --- file2 Tue Feb 29 14:28:19 2000 *************** *** 1,4 **** This is a test. This is another test. ! This is a third test. This is a fourth test. --- 1,5 ---- This is a test. This is another test. ! This is a dumb test. This is a fourth test. + This is a fifth test.
diff -e file1 file2produces:
4a This is a fifth test. . 3c This is a dumb test. .
diff -r -c old new >patch01
cd old patch -p 1 <patch01
cvs checkout <module>makes a private copy of the module for you to edit. cd there and then:
cvs updategets new changes from others.
cvs add fileadds a new file to the module in your private working tree.
cvs remove fileremoves a file from the module in your private working tree.
cvs commit filecopies a file from your private working tree to the master tree.
link /loc/fool/bin binlinks stuff into /bin in the root partition!
initial
/loc/adm/foo1.0/bin/foo -------> /local/new/bin
tested
-------> /local/bin
replaced
-------> /local/old/bin
lecture
in color