From owner-freebsd-hackers Mon Nov 25 20:32:37 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id UAA07545 for hackers-outgoing; Mon, 25 Nov 1996 20:32:37 -0800 (PST) Received: from spinner.DIALix.COM (root@spinner.DIALix.COM [192.203.228.67]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id UAA07521 for ; Mon, 25 Nov 1996 20:32:23 -0800 (PST) Received: from spinner.DIALix.COM (peter@localhost.DIALix.oz.au [127.0.0.1]) by spinner.DIALix.COM (8.8.3/8.8.3) with ESMTP id MAA05157; Tue, 26 Nov 1996 12:31:42 +0800 (WST) Message-Id: <199611260431.MAA05157@spinner.DIALix.COM> To: Tom Samplonius cc: jdp@polstra.com, hackers@freebsd.org Subject: Re: Local CVS commits (and cvsup) In-reply-to: Your message of "Mon, 25 Nov 1996 20:17:34 PST." Date: Tue, 26 Nov 1996 12:31:41 +0800 From: Peter Wemm Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Tom Samplonius wrote: > > I have some questions about the CVS "Local Commit" feature. I > understand the basic idea of setting CVS_LOCAL_BRANCH_NUM, but not the > actual procedure. > > I assume something like the following is required: > > cvs co src > (edit a file) > setenv CVS_LOCAL_BRANCH_NUM 1000 > cvs commit (edited file) # commit is made on unique, new branch > > > But what is recommended way of hacking stuff in $CVSROOT/CVSROOT to > allow non-freefall committers? How would I "protect" local changes in > this directory from removal by cvsup? Since this directory is just book > keeping, and technically not part of the repository, cvsup's local commit > protection will not work on them will it, right? > > Tom I'm sure John Polstra can fill in some more details, but there's a couple of extra steps needed. Yes, you need to set CVS_LOCAL_BRANCH_NUM. But you also need to create a local branch on the files you want to edit... eg: setenv CVS_LOCAL_BRANCH_NUM 1000 cvs tag -b MY_BRANCH file.c cvs update -r MY_BRANCH file.c cvs commit file.c But beware, you will no longer see changes made in -current, you'll have to merge them in manually, and this can get quite messy since cvs has no way of remembering what you have merged so far.. 'cvs update -jHEAD' will produce the same merge conflicts over and over again, and create new ones as time goes by. Another option is to tag the HEAD revision each time you merge.. eg: cvs tag MERGE_BASE file.c cvs tag -b MY_BRANCH file.c ... edit, commit etc. .. cvsup, new deltas arrive that you want to integrate... cvs tag MERGE_1 file.c cvs update -j MERGE_BASE -j MERGE_1 file.c cvs commit -m 'merged changes from -current' file.c .. etc. Also, be aware of the 'cvs update -f' option, you use it like this: cvs update -f -r MY_BRANCH This causes you to use the -current version for everything but use your version for files that have a MY_BRANCH tag on them. You can tell cvsup to leave your CVSROOT/* alone by creating a sup//refuse file. I've done this before with cvsup but don't remember the details. Also, you need to modify your supfile a little.. I think you need to remove the "delete" keyword to stop cvsup trying to delete stuff that you've added. It can't tell the difference between things you've added and things that have been deleted on freefall, so you have to be very careful here, as you can end up with stray files. Cheers, -Peter