From owner-cvs-all Fri Aug 28 22:19:12 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA12443 for cvs-all-outgoing; Fri, 28 Aug 1998 22:19:12 -0700 (PDT) (envelope-from owner-cvs-all) Received: from austin.polstra.com (austin.polstra.com [206.213.73.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA12421 for ; Fri, 28 Aug 1998 22:19:04 -0700 (PDT) (envelope-from jdp@austin.polstra.com) Received: from austin.polstra.com (jdp@localhost) by austin.polstra.com (8.8.8/8.8.8) with ESMTP id WAA14604 for ; Fri, 28 Aug 1998 22:18:10 -0700 (PDT) (envelope-from jdp) Message-Id: <199808290518.WAA14604@austin.polstra.com> To: committers@freebsd.org Subject: Re: make.conf In-Reply-To: <199808281849.SAA06317@dingo.cdrom.com> References: <199808281849.SAA06317@dingo.cdrom.com> Organization: Polstra & Co., Seattle, WA Date: Fri, 28 Aug 1998 22:18:09 -0700 From: John Polstra Sender: owner-cvs-all@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In article <199808281849.SAA06317@dingo.cdrom.com>, Mike Smith wrote: > Agreed. It's not *impossibly* hard to merge at least some of this > stuff; both rc.conf and make.conf are reasonably straightforward. > Don't we have any aspiring Perl5 or Tcl weenies out there that would > like to make their mark? 8) Pah, we don't need no stinkin' Perl5 or Tcl. You can get a good merge most of the time with a simple "diff3 -m". Joerg and I worked it out independently some time ago, though neither of us has followed through with it. The scheme is as follows, looking just at rc.conf for concreteness. In the steady state, we have both our customized version of the file (adopting the terminology of diff3, we'll call it "MINE") and a saved copy of the corresponding released version (which we'll call "OLDER"). Now we want to merge our customizations into a new released version (called "YOURS"). The merge is done by: diff3 -m MINE OLDER YOURS > NEW Then check for conflicts (the exit code of diff3 indicates that). If there are conflicts, invoke an editor for the user to manually resolve them. Once the conflicts are gone, get back to the steady state with: mv NEW MINE mv YOURS OLDER Repeat for the other customizable files. You can get a poor man's version of this if you keep a CVS repository around. Simply edit the files your checked-out source tree, and then copy them into /etc. To merge, all you have to do is a "cvs update". CVS does the same diff3 operation that I described above. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth