Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Mar 1998 11:58:13 +0100
From:      pb@fasterix.frmug.org (Pierre Beyssac)
To:        Matthew.Thyer@dsto.defence.gov.au (Matthew Thyer)
Cc:        joelh@gnu.org, c5666305@comp.polyu.edu.hk, current@FreeBSD.ORG
Subject:   Re: Using CVSUP and CTM together (Was Re: Disk munging problem with current solved)
Message-ID:  <19980319115813.MB01769@mars.hsc.fr>
In-Reply-To: <35108C62.DDFB1544@dsto.defence.gov.au>; from Matthew Thyer on Mar 19, 1998 13:39:22 %2B1030
References:  <199803171142.TAA07037@cssolar85.COMP.HKP.HK> <350E643D.A47CB903@camtech.net.au> <199803182240.QAA07391@detlev.UUCP> <35106C23.64774CD9@dsto.defence.gov.au> <199803190244.UAA08131@detlev.UUCP> <35108C62.DDFB1544@dsto.defence.gov.au>

next in thread | previous in thread | raw e-mail | index | archive | help
According to Matthew Thyer:
> Also it would seem that CTM is not very useful for developers as
> they are required to update their tree before committing changes
> (in case what they were to change has been changed by others).

With CTM there are at least two solutions, as far as I know:

     A) Receive the CVS tree via CTM. It's expensive (you have to
	keep a whole source tree CVS repository PLUS a whole
	checked-out source tree). When you have local changes,
	you just "cvs update" to merge FreeBSD commits with your
	code. However, you can't commit your own changes even
	locally as this would desynchronize your CVS files from
	the FreeBSD repository, causing subsequent CTM patches
	to fail. In addition, this allows you to retrieve older
	versions of the files.

     B) Receive /usr/src via CTM. Update your tree locally, keep
	copies of the original files you modified. When CTM
	complains about a MD5 mismatch, copy the original file
	by adding a .ctm extension to it (CTM looks for these
	first). This allows you to extract the CTM patch. Then use
	diff3 to merge the changes back in your locally modified code.

	This goes someting like this (foobar.c is the locally modified
	file, foobar.c.ref is the "official" version) :

	1) copy the original file back with a name to please CTM:

		cp foobar.c.ref foobar.c.ctm

	2) extract CTM

		ctm_rmail ....

	3) merge with diff3; if I remember correctly this is something like:
		diff3 -A -m foobar.c foobar.c.ref foobar.c.ctm > foobar.c.new

	4) possibly resolve conflicts in foobar.c.new ('<<<<<' lines)

	5) replace the files:

		mv foobar.c.new foobar.c
		mv foobar.c.ctm foobar.c.ref

(A) is probably the easiest, but it's a bit heavy if you're short on
disk space. I've been using (B) for a week now on a large set of changes
(roughly 300 files changed) and it's fairly easy to manage after you've
written a few helper scripts to do the boring job for you (the hard
part is already written, it's diff3).

I'm considering trying (A) due to peer (and Guinness) pressure :-))).

The missing step here is that I haven't yet generated usable diffs
between the code I changed and -current (I will, as soon as my patches
are functional enough) In (A), you just need to "cvs diff". In (B), one
more helper script should do the trick.

BTW, the code is the INRIA IPv6 code I ported from the FreeBSD 2.2.5
version. I hope to be able to release it within less than a week now.
-- 
Pierre Beyssac        pb@fasterix.frmug.org pb@fasterix.freenix.org 
{Free,Net,Open}BSD, Linux : il y a moins bien, mais c'est plus cher
    Free domains: http://www.eu.org/ or mail dns-manager@EU.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980319115813.MB01769>