Using RCS to Manage Your Programming Projects

This article reminds you how to use RCS to manage the various versions of your script or other programming project.
There's a nice way to get around keeping myscript.old or myscript.bkp versions of your script.  

Save each revision of your script using RCS:

You will be prompted to give a log message describing the changes made in the version you're checking in.  Don't be tempted to enter 'asdf'!  Sooner or later you'll be very glad that you wrote actual descriptions.

The above command also works to save the FIRST version of your script.  The only difference is that the message you enter will not be a log message about the revision (it will remind you of this fact), but rather a short one-sentence description of the tool itself.  So, for example, you'd enter "Audits WiscNIC entries to see if the emails are in LDAP."

Be sure to check out the most recent revision prior to starting any new edits:

co -l 
myscript.pl

To get back an old version of your script:

co -p 
myscript.pl > newfilename.pl

Voila!  Your old version is now there for you to compare and contrast using diff:

diff 
myscript.pl newfilename.pl

You can skip the creation of the newfile and simply diff the current version with the last:

rcsdiff 
myscript.pl

If you want to roll back to an even older version of your script than the last one, simply provide the revision number:

co -p -r1.12 
myscript.pl > newfilename.pl

You can view your notes for each revision (assuming you weren't lazy and put in 'asdf') as follows:

rlog 
myscript.pl | less



Keywordsrcs, scripts, tools   Doc ID15254
OwnerMark T.GroupNetwork Services
Created2010-10-11 19:00:00Updated2018-03-01 15:16:27
SitesNetwork Services
Feedback  0   0