From owner-freebsd-current Thu Mar 19 03:00:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA05758 for freebsd-current-outgoing; Thu, 19 Mar 1998 03:00:24 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from itesec.hsc.fr (root@itesec.hsc.fr [192.70.106.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA05736 for ; Thu, 19 Mar 1998 03:00:14 -0800 (PST) (envelope-from pb@hsc.fr) Received: from mars.hsc.fr (pb@mars.hsc.fr [192.70.106.44]) by itesec.hsc.fr (8.8.8/8.8.5/itesec-1.12-nospam) with ESMTP id LAA26040; Thu, 19 Mar 1998 11:59:24 +0100 (MET) Received: (from pb@localhost) by mars.hsc.fr (8.8.5/8.8.5/pb-19970301) id LAA28244; Thu, 19 Mar 1998 11:58:14 +0100 (MET) Message-ID: <19980319115813.MB01769@mars.hsc.fr> 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) 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> X-Mailer: Mutt 0.59.1e Mime-Version: 1.0 In-Reply-To: <35108C62.DDFB1544@dsto.defence.gov.au>; from Matthew Thyer on Mar 19, 1998 13:39:22 +1030 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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