[comp.unix.questions] RCS: how do you freeze a configuration?

meyer@gorgo.ifi.unizh.ch (Urs Meyer) (03/26/90)

Hello,

I followed the recent discussion about rcs (and sccs), specifically the
symbolic revision numbers are of interest.  One question remains open in
my opinion.  Say, you have a collection of files, each with a (possibly)
different revision number.  In order to create a configuration ready to
be released, I'd like to assign the same symbolic name to the latest
revision of each file, s.t. the symbol is fixed to the latest revision
forever.

Walter Tichy mentioned in his paper (SW P&E) the rcsfreeze command which
"assigns the same symbolic revision number to a given revision in all 
RCS files. ..."  This seems to be what I am looking for.
But neither 4.3BSD nor IRIX 3.2 have rcsfreeze.  Where is it?
Are there any workarounds?

Urs Meyer ---------- meyer@ifi.unizh.ch, {uunet,...}!mcsun!cernvax!unizh!meyer
University of Zurich, Dept of Computer Science, Multimedia Lab, CH-8057 Zurich

runyan@hpcuhc.HP.COM (Mark Runyan) (03/28/90)

>/ meyer@gorgo.ifi.unizh.ch (Urs Meyer) /  7:34 am  Mar 26, 1990 /
>
>One question remains open in
>my opinion.  Say, you have a collection of files, each with a (possibly)
>different revision number.  In order to create a configuration ready to
>be released, I'd like to assign the same symbolic name to the latest
>revision of each file, s.t. the symbol is fixed to the latest revision
>forever.

A possible solution using existing RCS commands.

rcs -nSymbolName: *,v

Where "SymbolName" is a symbolic name that you wish to use to indicate
a particular revision, the ":" implies set "SymbolName" to top revision
of the file, and "*,v" means all the RCS files.

For instance, if I had 3 different directories, with RCS subdirectories,
and each directory had twelve files, whose top revision number varies
between 1.1 and 20.6, and I want to mark the top revision with one
symbol, I could do:

  rcs -nRel_A/B1/00: */RCS/*,v

and Rel_A/B1/00 would point (fixed) to the top revision of all those
files.  So Rel_A/B1/00 might point to 1.1 in fileA of the first directory,
but it could also point to 20.6 in fileN of the third directory.

The ":" without a number means point to the top most revision of the file.

Mark Runyan

hollen@megatek.UUCP (Dion Hollenbeck) (03/28/90)

From article <1990Mar26.153424.16557@gorgo.ifi.unizh.ch>, by meyer@gorgo.ifi.unizh.ch (Urs Meyer):
> Hello,
> 
> I followed the recent discussion about rcs (and sccs), specifically the
> symbolic revision numbers are of interest.  One question remains open in
> my opinion.  Say, you have a collection of files, each with a (possibly)
> different revision number.  In order to create a configuration ready to
> be released, I'd like to assign the same symbolic name to the latest
> revision of each file, s.t. the symbol is fixed to the latest revision
> forever.
> 
There are three flags which you need to know about.  "-m" will enter the
quoted log message of your choice.  "-n" will attach a symbolic name
to the highest existing revision of an RCS file, but will refuse with
an error message if this symbolic name has already been given to
another revision.  "-N" is the same, but it will force the highest
rev to get the symbolic name even if it was given before.  We use
"-N" so that after you have marked a release snapshot and then
find out that you need to change one file and re-mark it with the
same name, the override will apply.

Here is a sample shell script which we use.

---------------------------   cut here  -------------------------------
#!/bin/sh
#
#  NAME
#	rel	-  Check in for a new release
#
#  DESCRIPTION
#	This script checks out all the source and include files, then
#	checks them in again with the new release name.
#
for i in \
gc.c gc.h gc_misc.c \
gc_rb.c gc_rbovr.c gd.c gd_aaa.c gd_all.h gd_cb2.c gd_cb2.h \
gm.c gm.h os.c os.h

do
	echo $i:
	co -l $i
	ci -f -u -m"-- Release 2.0 --" -NRelease2_0 -sRel $i
done
--------------------   cut here    -------------------


Alternately, the "for i in file1 file2 file3...filen" could be
replaced with a wildcard expression to get all files:

for i in RCS/*,v      or   for i in *,v  or for i in RCS/*-- 
	Dion Hollenbeck             (619) 455-5590 x2814
	Megatek Corporation, 9645 Scranton Road, San Diego, CA  92121

        uunet!megatek!hollen       or  hollen@megatek.uucp