RCS: how do you freeze a configuration?

Dion Hollenbeck hollen at megatek.UUCP
Wed Mar 28 06:53:51 AEST 1990


>From article <1990Mar26.153424.16557 at gorgo.ifi.unizh.ch>, by meyer at 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 at megatek.uucp



More information about the Comp.unix.questions mailing list