Maintaining releases (Re: XBBS version 7.82)

Piercarlo Grandi pcg at aber-cs.UUCP
Sat Jan 6 04:09:43 AEST 1990


In article <11683 at megatest.UUCP> palowoda at megatest.UUCP (Bob Palowoda) writes:
    
      One the same subject how does one go about makeing incremental patches
      to a large project with patch? i.e. How did they automate the patching
      of 'elm' with so many patches comeing in etc. Has anyone done script
      files to do this or in the makefile?

You just use RCS ci and co every time you modify a files, then you can
get all the patches by saying

	rcsdiff -c *,v >myownpatch 2>&1

My suggestion for using RCS: checkin the sources you receive at the
appropriate release level, then create branches for *your* upodates, and
keep the baseline trunk updated.

			AN EXTENDED EXAMPLE

For example, suppose that you want to work on files
in emacs18.54/src; when you receive it, you do:

	cd emacs18.54/src
	chmod a-w *			# No accidental modifications

Now you want to update emacs.c; you do:

	ci -l -u18.54 emacs.c		# Initial revision is 18.54

and then repeat, as often as you want:

	<editor> emacs.c		# Make your changes
	ci -l -u18.54.1 emacs.c		# Your first changes go in as 18.54.1.1

You may even create a new major sublevel, for example 18.54.2.1;
Suppose you have done modifications up to 18.54.2.4.

If you receive an "official" patch to release 18.55, you do:

	rcsdiff -c -r18.54 emacs.c >patch.54.2 2>&1 # Save your own patches

Having thus defined your own patches, you apply the "official" one to the
baseline:

	co -l -u18.54 emacs.c		# Retrieve baseline 18.54
	patch -c -N <patch.55		# Apply .55 patch to baseline
	ci -l -u18.55 emacs.c		# Define new baseline 18.55

then you apply on the new baseline your patches to the old baseline:

	patch -c -N <patch.54.2		# Try to reupdate .55 with your mods
	rm emacs.c~			# Previous version already RCS'ed...

Of course some of the code *you* modified may have been patched for .55, so
some of your patches will fail; in this case you have to manually resolve the
conflict, like this:

	<editor> emacs.c# emacs.c	# Manually resolve any conflicts.
	rm emacs.c#			# Delete the failed mods log

then finalize your mods to the new baseline level:

	ci -l -u18.55.1 emacs.c		# New branch 18.55.1.1

At this point you or may not want to close the 18.54.2.4 branch; see the
rcs(1) command on how to do this.
-- 
Piercarlo "Peter" Grandi           | ARPA: pcg%cs.aber.ac.uk at nsfnet-relay.ac.uk
Dept of CS, UCW Aberystwyth        | UUCP: ...!mcvax!ukc!aber-cs!pcg
Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg at cs.aber.ac.uk



More information about the Comp.unix.questions mailing list