Backing Up Files
script tells you all the revision numbers that are
stored in an
What good is that?
Here are two examples.
when it's searching all revisions of an RCS file.
If you want to print all revisions, run a program across all revisions
to do some kind of check, and so on, rcsrevs
can give you the
revision numbers to use in a
The shell loop below gets all the revision numbers and stores them in
shell variable one by one; it runs
to send each revision to the
command for formatting with a custom header;
the output of the commands in the loop goes to the printer.
for revnum in `rcsrevs
co -p -r$revnum
| pr -h "
done | lpr
You'd like to compare the two most recent revisions of several RCS files
to see what the last change was.
But the revision numbers in each file are different.
(One file's latest revision might be 2.4, another file could be at 1.7,
to grab the two highest revision numbers from the rcsrevs
to reverse the order (put the older revision number first),
to make the revision numbers into a pair of -r
then run rcsdiff
to do the comparisons and
them to bigboss
foreach file (*.cc *.h Makefile)
set revs=`rcsrevs $f | head -2 | tail -r | sed 's/^/-r/'`
rcsdiff $revs $f | mail -s "changes to $file" bigboss
options to control what revisions are
So rcsrevs -r2 somefile
would list only revisions 2.0 and above,
would list the revisions in beta
and so on.